Can't connect to Azure Linux VM through network


The primary interface on an Azure Linux virtual machine (VM) is eth0. If eth0 isn't configured, the VM is not accessible over a network connection even when other tools indicate the VM is up.

When the issue occurs, the Secure Shell (SSH) connection that has correct permissions may start to connect to the VM. However, it ultimately cannot access the VM because of the network issue.

The networking errors are typically logged in the serial console log. Specifically, you may see the following errors.

Errors in the serial console log

CentOS Linux distribution errors
SuSE Linux distribution errors


For CentOS
For SuSE Linux
For Ubuntu

Resolve the issue on a customized Linux operating system

If the VM that has the networking issue uses your uploaded VHD, you can try to configure the network based on a working gallery image. To do this, attach the problematic disk as a data disk to the gallery VM, and then run the following commands.
fdisk -ldf -hmount /dev/sdc1 /temporarydf -hcd /temporary/etc/udev/rules.dls -ltrmv 70-persistent-net.rules /temporary/root/cd ../../network lsmv interfaces interfaces.orgls -ltr

Copy to the current folder files from the working VM:
cp /etc/network/interfaces .   cp -R /etc/network/interfacescp -R /etc/network/interfaces.d .cp -R /etc/network/interfaces.dynamic.d .ls -ltrcd ..cdumount /mnt

Reference: network files for operating systems

Network card configuration 
Hostname configuration
DNS Configuration Files
Configuration files for Default GATEWAY
Static routes
Firewall rules


Article ID: 4010059 - Last Review: 2017, ഫെബ്രു 10 - Revision: 43

Microsoft Azure Virtual Machine running Linux