VMWare and udev weirdness

If you’ve started using RHEL6-ish (Scientific in my case) releases with VMWare, you may run into this problem. Clone a VM from a template, boot it up and it’s network interface won’t light up. Well, we know that’s because of the hardware address mismatch in ifcfg-eth0. VMWare assigns the new VM a new hardware address automatically. What you may not have noticed, is udev renamed eth0 to eth1 and even after you fixed the problem in ifcfg-eth0, the interface still won’t light up. In order to fix this:

1. Edit /etc/udev/rules.d/70-persistent-net.rules
2. Change the end of the line, NAME=”eth1″ to NAME=”eth0″
3. Save and exit, then reboot.

Now the network interface should be up. Some people have suggested simply removing the file /etc/udev/rules.d/70-persistent-net.rules but that did not work, udev simply re-created it with the same values.

VMWare Tools install on a Linux VM

There are a couple methods to install the VMWare Tools bundle on VMWare virtual machines (when you don’t install a GUI).

1. Use the tarball which builds modules against the installed kernel.
2. Use the VMWare repo to install via yum.

The disadvantage of using the tarball is the necessity of updating the install each time a new kernel is installed.

To simplify the installation, use the method below:

1. Create a new file called vmware-tools.repo

name=VMware Tools

Modify this file based on the release of ESX you are running and the version of RHEL (or it’s clones). Uncomment the appropriate baseurl line and comment out the others.

2. Import the GPG keys for the repo

# rpm --import http://packages.vmware.com/tools/keys/VMWARE-PACKAGING-GPG-DSA-KEY.pub
# rpm --import http://packages.vmware.com/tools/keys/VMWARE-PACKAGING-GPG-RSA-KEY.pub

3. Specify the nox version of vmware tools

# yum install vmware-tools-nox

Or (for VMWare 5.x hosts)

# yum install vmware-tools-esx-nox

This will install the required rpm’s and anytime you invoke a yum update, these tools will also be updated.