Friday, 9 November 2012

vCloud Usage Meter Network Error After Adding New NIC


Today one of our cloud hosts failed which was running vCloud Usage Meter. HA triggered and the VM was restarted on another host but vNIC isn't connected !!!  Tried many ways to get it up and running with no luck and finally decided to delete the vNIC first and add new one.

Now I got it connected but another issue came in. The new vNIC was added as eth1 (although I removed first then added new one). For some reason usage meter is hardcoded to use eth0 to connect to network (probably done by VMware developers).


After doing a research, I found the following:


This occurs because adding new vNIC creates a new MAC address for it. The Guest OS (linux) detects a new network adapter but before adding it to its devices it will check udev persistent network interface rules. Those rules will include all NICs assigned to the server and their MAC addresses. Even delete NICs will be listed with those rules.

Now since its a new MAC which isn't matching the MAC of old eth0 listed with the rules, the guest OS will add the devices with new name.

Resolution

1.  Delete the file /etc/udev/rules.d/70-persistent-net.rules and reboot the VM. It’ll rebuild the rules during the next boot, based on the current state of the host, and you’ll get eth0 back.
2. Edit the file /etc/udev/rules.d/70-persistent-net.rules and modify the MAC of eht0 to the MAC of your new NIC.

1 comment:

  1. On the off chance that an essayist uses any sort of relieving data or actualities, then it prompts put a negative impression to client's mind. It allows to others to raise question on your composition ability. So keep your written work far from questions. Windows Server Datacenter

    ReplyDelete