VMWare Server… My Current Love
January 28th, 2009OS: Ubuntu Server 8.10
VMWare Server 2.0
Having spent time shoe-horning a couple of virtual servers into an Xenserver environment whose license preceded my current employment, I finally gave up and tried VMWare Server. What a relief! I think we originally spent about $3000 on Xenserver for a couple of perpetual licenses.
VMWare Server was free and worked almost immediately out of the box. It had a few hiccups. The largest was in cloning virtual machines. It’s not supported natively. After a lot of trial and error with manually editing files I finally found a script that did most of the work for me with just one major exception: it didn’t provide my newly created clones with a working network card.
I downloaded the scripts to clone and copy (I rely on the cloning script only) here. I don’t recall what search string finally got me there but I sure was happy to find it.
Here are the files in case the link above fails:
change_name.sh (1.1 K)
clone_vm.sh (1.2 K)
A few things about the VMWare Server install should be noted. I first installed Ubuntu Server 8.10 for my host. Then after I downloaded VMWare Server, I couldn’t get it to install until I issued:
apt-get install linux-headers-`uname -r` build-essential xinetd
Until then, I kept getting compile errors. After I had VMWare Server installed it was pretty straight forward to install virtual machines. But what about cloning?!!
I successfully cloned a virtual machine with from a directory inside the host machine (the host machine is what I installed the VMWare Server in):
sh clone_vm.sh alpha beta
I was then able add a virtual machine to my inventory from the VMWare Server Infrastructure Web Access Page. But even after doing this I couldn’t get my second server, the one that I had cloned from the first, to start a functioning network card. The issue was due to MAC addresses. To fix this issue I did the following:
1. Edit the Network Adapter in the VMware Server console so that it has a manual MAC address
2. Edit the following file in your virtual environment so that the mac addresses your manual MAC address from above
#nano /etc/udev/rules.d/70-persistent-net.rules
3. Edit the following file so that ethernet0.generatedAddress = “manual address from step 1″
#nano /var/lib/vmware/Virtual Machines/new_virtual_machine/clone.vmx
4. Edit your network interface in the virtual environment if you want a static ip (you can use DHCP)
After I restarted the network from within my new cloned virtual environment I had a totally accessible copy of my first hardened virtual machine. Saved me tons of time setting up new virtual environments.
Note: One my next try after posting this, I had to reboot the Virtual Machine to get these setting to stick.
