How-To Sys Admin

Missing Network Interfaces in Ubuntu Under VMware ESXi

Every now and again I clone a VM and add it to another host. ESXi prompts you for a new UID when you start the VM and I always remove the virtual network card(s) from the machine and re-add them later. I do this to make sure I don’t have two machines with the same MAC addresses on the network. But if you do this with Ubuntu, the new NIC(s) don’t get picked up by the OS. This is almost certainly not specific to VMware or their ESXi product, it’s just the environment I’m using.

This problem seems to be caused by a lack of automatic hardware probing at boot, probably for a good reason but I’m no Linux kernel guru so won’t make a judgement there. The root of the issue is located in the file /etc/udev/rules.d/70-persistent-net.rules where you’ll see the old interfaces still listed alongside the new ones. Simply remove the old NIC(s) and ensure the new ones have the MAC addresses you expect and the correct ethx labels. Give the system a reboot and you should be happy.

Steps to resolve a missing network interface in Ubuntu 10.04 Lucid Lynx (and possibly earlier):

  1. sudo nano /etc/udev/rules.d/70-persistent-net.rules
  2. Delete the lines with the old interfaces after comparing with your VMs newly assigned MAC addresses.
  3. Confirm the interface names are what you expect at the end of each line.
  4. Ctrl-X to save and exit.
  5. sudo shutdown -r now
  6. Run ifconfig to confirm the interfaces are up with the correct IPs.
  7. If the interfaces are up, check your /etc/network/interfaces config to adjust IP settingsĀ as required.
Sys Admin

Upgrading to VMware Server 2 on Ubuntu 8.04

After downloading the latest Windows 7 RC I loaded it into VMware Server 1.06 that I installed on Ubuntu Server a while back. All going well until the Windows 7 installer wouldn’t see the disk I had created. It seems that Windows 7 doesn’t like the SCSI virtual disk, so I removed that and created an IDE virtual disk and restarted the install.

Things were much better until it came time to install the VMware Tools and nothing happened. Things weren’t exactly snappy and without the tools installed, they weren’t going to get any better. It was time to make the upgrade from VMware 1.06 to 2.0 and as it turns out, is much easier than previous VMware installs.

Overall I followed the instructions from the LinuxGazette website and things worked flawlessly, but there were a couple of extras due to the upgrade.

Firstly (and fairly obviously), make sure you stop your current VMware daemon/service before starting the install. The VMware installer is pretty good, but I’m sure that your virtual machines would appreciate being offline before things get messed up.

sudo /etc/init.d/vmware stop

If you’re upgrading from VMware Server 1.06 the installer will also complain about the vmnet and vmmon modules being left from a previous version. So we need to get rid of those – using the correct kernel version. You can get that with “uname -r”.

sudo rm /lib/modules/2.6.24-22-server/misc/vmnet.o
sudo rm /lib/modules/2.6.24-22-server/misc/vmnet.ko
sudo rm /lib/modules/2.6.24-22-server/misc/vmmon.o
sudo rm /lib/modules/2.6.24-22-server/misc/vmmon.ko

After that it’s plain sailing. Just follow the instructions to untar your VMware download and run the installer. Assuming you used the default locations in the previous install, your virtual machines will be untouched and start happily under VMware Server 2.0

One of the final things to note in the install is that the new client interface is all browser based. To log into your VMware server requires a password and the Ubuntu root user does not have one by default. So on your server be sure to run,

sudo passwd root

and set a nice secure password for when you head to http://servername:8222. Firefox users will need to give the site security certificate the OK and all browsers will need to install the plugin to use the console to view your machines.

Hooray – Windows 7 now installs the VMware Tools properly and runs pretty well. At the moment I have no sound and the limited graphics under VMware don’t allow Aero fanciness, but I can now test and develop in the Windows world while meeting all license requirements. The Windows 7 RC license is valid until June 2010 although don’t wait that long as it’ll start making life hard for you in March 2010. That’s almost a year of free OS from Microsoft!

Interesting Stuff Sys Admin

Installing VMware Server 1.06 on Linux

Installing the free VMware Server is a common but slightly tricky process on some newer Linux systems. Having had to go through it again recently I thought I’d write some of it down. Of course if you are using Ubuntu 7.10 then the simple option is to enable the Canonical Partner repository and just use Synaptic to select and install VMware Server.

For the others in the audience that are installing on Ubuntu 8.04 or another Linux system that doesn’t have packages, you should have a working VMware Server install with web interface and a client console by the bottom of the page.