Friday, February 24, 2012

vSphere 5 virtual machine’s network adapter stuck with 2 port groups

I ran into an interesting issue today in a vSphere 5 / ESXi 5.0 environment with a few virtual machines that had 2 port groups listed in the network section of the properties:

image

What lead up to this was that the master image that was used to deploy XenDesktop 5.5 virtual desktops was assigned the incorrect port group and since there were 70 desktops, I went ahead and used PowerCLI to change all the NICs of the virtual desktops to the correct port group.  Shortly after that I noticed the master images and some (not all) virtual desktops which had Windows 7 or XP as the operating system were unable to obtain a DHCP lease.  Note that I know the screenshot above doesn’t show that the virtual machine has a 169.x.x.x IP address, the reason for this is because the virtual machine was shut off when I took the screenshot.

I took a few minutes to try and fiddle around with the network adapter’s port group by disconnected it, change the port group and changing it back then used PowerCLI commands to do the same and while changing the port group to a regular vSwitch network removed the dvSwitch port group, changing it back reverted it to the 2 port group being listed state.

image

I had little time to troubleshoot this and figured it was a bug so I got the client to give VMware a call and after spending a few minutes on the phone with the tech, he was asked to check for snapshots and if there were, delete it.  I’m not sure if this is supposed to be a surprise or not but deleting the snapshot fixed the port group issue:

imageimage

image

This didn’t explain why I had the same issue with a few of my virtual desktops that were deployed by Citrix XenDesktop 5.5 but by the time we got an answer from VMware, I had already deleted and redeployed the problematic desktops.

No comments: