09-11-2007 20:19 janiquec

Using Virtual Server 2005 R2 Differencing Disks with Ubuntu Server 7.04

Thought this might be useful to people trying to create Ubuntu Server 7.04 VMs using Virtual Server 2005 R2 and differencing disks. A blog reader reported having problems getting the virtual Ethernet network card to work after creating a new VM running Ubuntu Server 7.04 based on a differencing drive from a well-performing VM. Basically, the virtual Ethernet network card was not initializing, so he was left with a VM that could not communicate on the network.

Being curious about this problem, I decided to look into it and see what might be going on. After creating a Ubuntu Server 7.04 VM and using its VHD as the parent disk for a new VM based on a differencing disk, the problem was exactly as reported...the virtual Ethernet network card would not initialize in the differencing disk-based VM. Because it intuitively seemed like it might be a MAC address conflict, the easiest first test was to reset the MAC address of the differencing disk-based VM to the MAC address assigned to the original Ubuntu Server 7.04 VM. Sure enough, once this step was performed and the differencing disk-based VM was restarted, the Ethernet network card initialized and network was functional again.

In one of the Ubuntu forums, there is an older entry (https://bugs.launchpad.net/ubuntu/+source/udev/+bug/31188/comments/6) that describes a part of the Ubuntu installation process specific to the identification of networking cards. Basically, it appears that network cards with loaded drivers have the MAC address of each written to the /etc/iftab file of the installed system. Quoting directly from the Ubuntu forum entry, the /etc/iftab file contains the following type of information:

eth0 mac 01:23:45:67:89:ab
eth1 mac 99:88:77:66:55:44

In my test case, when the new Ubuntu Server 7.04 VM was created using a differencing drive, and a new, dynamic MAC address was assigned to the virtual Ethernet network card, the data contained in the /etc/iftab file was not updated and networking was not functional. Once the /etc/iftab data was manually updated with the new, dynamic MAC address assigned by Virtual Server 2005 R2, and the VM was restarted, the virtual Ethernet network card initialized and networking was restored.

If you intend to create differencing disk-based Ubuntu Server 7.04 VMs, you might want to set a static MAC address for these type of VMs. This will prevent a recurrence of the problem if you need to migrate or load balance differencing disk-based Ubuntu VMs between Virtual Server 2005 R2 hosts.

Share this article in del.icio.us | Digg | reddit

Filed under: , , , , ,

Leave a Comment

(required) 
(required) 
(optional)
(required)