Tuesday, December 14, 2010

Strange VMware vSphere 4.1 Issue

I ran into a weird issue over the past couple of days while trying to deploy a couple of CentOS 5.5 virtual machines onto my vSphere 4.1 server.

I created a VM to serve as my template for future VMs, then exported it as an OVF template to my laptop.  (I do not yet have a vCenter management server, so I'm stuck running the vSphere Client inside an XP VM running in VirtualBox on my MacBook Pro).  Probably due to our network, the export took a couple of hours.

I then deployed two VMs from the OVF file.  Import went much more quickly than the export, thankfully.  When I ran the "system-config-network" tool to configure the IP address, subnet mask, gateway, hostname, and DNS settings, I noticed there was a duplicate of eth0.  The dupe wasn't present in my original VM.  If the dupe was not removed, running /sbin/ifconfig displayed that eth0 had all the correct info, but the machine could not reach the network.

Through trial and error, I discovered a workaround.  Upon running system-config-network, if a duplicate eth0 is present, select it.  Then blank out all values, save and quit.  Next, reboot the VM and once again run system-config-network, and configure eth0.  After doing all this networking worked properly and I was able to SSH into the VM from my laptop.

Once we get a vCenter Server I shouldn't have jump through these hoops.  vCenter includes the ability to clone a VM without doing an export and import, so setting up new VMs should be much simpler and faster.

No comments: