Wednesday, May 18, 2011

Lost access to VM Network and Service Console when Playing with dvSwitch?

I tried adding the physical host to the dvSwitch and it blew up and I lost access to my vCenter VM (VM being the key issue here) because the box only has a single NIC (I also probably ignored a couple of warning dialog boxes as I was distracted doing something else (! pay attention to these things !)

The vCenter node was communicating over the VM Network to my client. which now couldn’t connect into the dvSwitch as I had moved the uplink to the dvSwitch there were no physical NICs to connect with so I was kind of stuck. Connecting directly to the physical ESX host using the VI client worked so I had service console access but it wouldn’t let me remove the pNIC from the dvSwitch and add it back to the traditional vSwitch as I only had a single pNIC. So in the end I had to break out the command line to get access back.

Unlink the pNIC from the dvSwitch: (your vmnic/PortID and dvSwitch names may be different)

esxcfg-vswitch –Q vmnic0 –V 265 dvSwitch

(note there is no -Q=vmnic as the help file would suggest on 1st glance, use a space and not an ‘=’ my esxcfg-* command line-fu was a bit rusty so that caught me out for a while :) )

Re-link it to a normal vSwitch

esxcfg-vswitch –L vmnic0 vSwitch0

within about 30 seconda all the VM networking came back so I could connect to the vCenter box again.

I then removed the dvSwitch entirely from the host; to do this I had to connect directly to the ESX host using the VI client as there are no options to do it via the UI when connected to vCenter.

No comments:

Post a Comment