Can't connect to a specialized Debian Linux VM that is migrated from VMware to Azure

Applies to: ✔️ Linux VMs

Original KB number:   4056276

Symptoms

After creating a specialized Debian 9.1 (Stretch) virtual machine (VM) and then migrate that VM from VMware to Microsoft Azure, you can't connect to the VM.

Cause

This issue occurs because the NIC card name was listed as 'ens33p0' instead of 'eth0' on the virtual machine. In fact, 'eth0' is the default NIC card requirement per the Azure Linux network configurations settings.

Workaround

Debian now uses "ens33" (or "ens33p0") interface names instead of "eth0." To work around this change, adjust the GRUB file, and then manually configure the " eth0" ethernet adapter as DHCP. To do this, follow these steps:

  1. Change the GRUB file to include both the Azure requirements and "eth0" requirements. To do this, run the following command:

    GRUB_CMDLINE_LINUX="console=tty0 console=ttyS0,115200 earlyprintk=ttyS0,115200 rootdelay=30 net.ifnames=0 biosdevname=0"
    
  2. Manually update the /etc/network/interfaces file by removing the ens33 entry and then adding auto eth0 and iface inet eth0 dhcp.

Contact us for help

If you have questions or need help, create a support request, or ask Azure community support. You can also submit product feedback to Azure feedback community.