Showing posts with label Azure. Show all posts
Showing posts with label Azure. Show all posts

Thursday, May 30, 2019

Azure VM is not accessible /proc/net/route contains no routes

Problem

Oversudden Azure VMs running Ubuntu 18LTS became unreachable (WestUS region)
/proc/net/route contains no routes


Solution

Connected to Azure VM via Console and got following running lines of error messages

2019/05/30 18:24:20.747552 ERROR ExtHandler /proc/net/route contains no routes

Restart waagent service produced the following:

INFO Daemon Azure Linux Agent Version:2.2.32.2
2019/05/30 18:24:18.242022 INFO Daemon OS: ubuntu 18.04
2019/05/30 18:24:18.246632 INFO Daemon Python: 3.6.7
2019/05/30 18:24:18.251476 INFO Daemon Add daemon process pid 2330 to walinuxagent systemd cgroup
2019/05/30 18:24:18.258645 INFO Daemon CGroups: ok
2019/05/30 18:24:18.263173 INFO Daemon Run daemon
2019/05/30 18:24:18.268142 INFO Daemon Clean protocol
2019/05/30 18:24:18.272685 INFO Daemon Provisioning already completed, skipping.
2019/05/30 18:24:18.277567 INFO Daemon RDMA capabilities are not enabled, skipping
2019/05/30 18:24:18.285862 INFO Daemon Determined Agent WALinuxAgent-2.2.40 to be the latest agent
2019/05/30 18:24:18.613217 INFO ExtHandler Agent WALinuxAgent-2.2.40 is running as the goal state agent
2019/05/30 18:24:18.635339 INFO ExtHandler Detect protocol endpoints
2019/05/30 18:24:18.642625 INFO ExtHandler Clean protocol
2019/05/30 18:24:18.651472 INFO ExtHandler WireServer endpoint is not found. Rerun dhcp handler
2019/05/30 18:24:18.658883 INFO ExtHandler Test for route to 168.63.129.16
2019/05/30 18:24:18.665334 WARNING ExtHandler No route exists to 168.63.129.16
2019/05/30 18:24:18.670932 INFO ExtHandler Checking for dhcp lease cache
2019/05/30 18:24:18.675843 INFO ExtHandler looking for leases in path [/var/lib/dhcp/dhclient.*.leases]
2019/05/30 18:24:18.684096 INFO ExtHandler cached endpoint not found
2019/05/30 18:24:18.690504 INFO ExtHandler Cache exists [False]
2019/05/30 18:24:18.695994 INFO ExtHandler Send dhcp request
2019/05/30 18:24:18.700569 INFO ExtHandler Examine /proc/net/route for primary interface
2019/05/30 18:24:18.705882 ERROR ExtHandler /proc/net/route contains no routes
2019/05/30 18:24:18.710763 WARNING ExtHandler Could not determine primary interface, please ensure /proc/net/route is correct
2019/05/30 18:24:18.717827 WARNING ExtHandler Contents of /proc/net/route:
Iface   Destination     Gateway         Flags   RefCnt  Use     Metric  Mask            MTU     Window  IRTT

2019/05/30 18:24:18.732775 WARNING ExtHandler Primary interface examination will retry silently
2019/05/30 18:24:20.747552 ERROR ExtHandler /proc/net/route contains no routes
2019/05/30 18:24:22.755975 ERROR ExtHandler /proc/net/route contains no routes

VM reboot didn't help, but VM instance stop/start helped.

References
https://bugs.launchpad.net/ubuntu/+source/linux-azure/+bug/1822133
https://github.com/Azure/WALinuxAgent/issues/980
https://github.com/Azure/WALinuxAgent/issues/1439

Wednesday, May 1, 2019

Install and configure Domain Controller in Microsoft Azure

Problem

Need to install and configure domain controller in MS Azure.

Solution

There is excellent article how to setup DC in Azure.
https://www.assistanz.com/steps-to-create-new-active-directory-forest-in-azure-portal/

Configure Azure Firewall ports required to join Domain Controller

Problem

There are two virtual networks, Network 1 (contains Domain Controller, Windows Server 2016) and Network 2 (contains workload VMs, Windows Server 2016). Traffic between them goes through Azure Firewall and User Defined Routes.

Solution

After some experiments came up with following categories of rules:

Name Proto Src Dest Ports
tcp-to-dc tcp * <dc server> 53,88,135,139,389,445,464,3268,3269,49152-64000
udp-to-dc udp * <dc server> 53,88,123,135,137,138,464,389,49152-64000


References
https://support.microsoft.com/en-us/help/179442/how-to-configure-a-firewall-for-domains-and-trusts
http://powershell365.com/2016/01/19/firewall-ports-required-to-join-ad-domain/

Tuesday, April 30, 2019

Azure icon sets

Problem

Need get PNG, SVG icons for Microsoft Azure services, components, etc. Who struggled with presentations, will understand..

Solution

Excellent article from Microsoft MVP Chris Pietschmann - Microsoft Azure Icon Set Download – Visio stencil, PowerPoint, PNG, SVG

Icon set can be found at: https://www.microsoft.com/en-us/download/details.aspx?id=41937

Wednesday, April 24, 2019

How to get external IP for Linux VMs on Azure

Problem

How to get external IP for Linux VMs on Azure

Solution

dig +short myip.opendns.com @resolver1.opendns.com 

Change mount point for /mnt folder in Ubuntu Linux on Azure

Problem

When provisioning Linux VMs on Azure, /mnt folder is automatically created and pointed to Resource Disk. In some case, we need to have more fine-grained control over /mnt folder (for instance for backward compatibility) and map Resource Disk to its sub-folder, e.g. /mnt/tmp

Solution

Azure provides fantastic support for Linux VMs called Microsoft Azure Linux Agent.

sudo service waagent restart
vi /etc/waagent.conf 
# Mount point for the resource disk
ResourceDisk.MountPoint=/mnt/resources 

 Restart waagent service

 sudo service waagent restart