Linux Migration Issue with Azure Migrate

Linux Migration Issue with Azure Migrate “Device eth0 does not seem to be present, delaying initialization”

We were recently migrating an on-premises Linux (CentOS 6) virtual machine to Azure using Azure Migrate. The Virtual Machine migrated with no issues; however we couldn’t connect to it and on closer inspection of the boot diagnostic logs we found the below error:

Error:

Bringing up interface eth0:

Device eth0 does not seem to be present, delaying initialization.

[FAILED]

The issue we were facing is that within Linux there is a process named persistent net rules which get generated on each restart. Essentially the first time you attach a network adapter to the VM that is assigned to eth0 and the mac address is stored and linked inside the following   file/etc/udev/rules.d/70-persistent-net.rules. The issue was that as we’d now migrated the VM to Azure and It was a new NIC and it didn’t match the existing eth0 MAC address, it got assigned as eth1.

Which is what caused us the above error. In order to resolve this issue, we did try and remove the /etc/udev/rules.d/70-persistent-net.rules file, which worked on the first reboot. However as soon as we changed this IP within Azure from dynamics to static on the NIC, a new MAC address was generated, and we were back to square one.

After much research we came across the below resolution in Step 6 of the following article https://docs.microsoft.com/en-us/azure/virtual-machines/linux/create-upload-centos

We ran the below commands which stopped the static rules of an adaptor being assigned to a specific MAC address:

Resolution

Run the below commands from the terminal:

sudo ln -s /dev/null /etc/udev/rules.d/75-persistent-net-generator.rules

sudo rm -f /etc/udev/rules.d/70-persistent-net.rules

After this we had no further issues with the VM!

About the author