dvs

vCenter lost DVS configuration – Fixing the hosts

So I hit an interesting issue whilst performing a VMware upgrade from 4.0 to 5.5. There was a legacy issue left where vCenter had lost its knowledge/configuration of the DVS Setup.

Im not entirely sure what happened or when, as it was an existing environment, I only know I had to fix it. (Many thanks to the help from my good friend over at www.vmtechy.com for refreshing me on the ESX 4.0 command line to fix this).

The Symptoms

Within the vCenter Client, on the host summary tabs.

2014-11-19_17-01-30

When looking at the Virtual Machine settings.

2014-11-19_18-25-35

Note: when there is available networking that vCenter knows about, i.e on a VSS switch, it will appear and let you change it.

When looking at the networking, you can see the DVS name, but no VM’s or NIC’s attached;

2014-11-19_18-26-03

However if you look at the Network Adapters section, you can see that the physical NICs are registered against the DVS.

2014-11-19_18-26-08

What doesn’t fix it

So trying to add the VMNICs into the DVS, as if to reset it, or push down the configuration again, you can see that the NICs show as in use, however you can force this to override, but it fails also.

2014-11-19_18-26-28 2014-11-19_18-26-56

The Fix – You have to use the CLI

Log into your host using your favoured SSH Client.

And the commands you need are;

esxcfg-vswitch -l

Take down the DVPort ID of the VMNIC you want to remove from the DVS Switch.

esxcfg-vswitch -Q "vmnic(No.)" -V "DVPort ID" "DVS Switch Name"

Example;
esxcfg-vswitch -Q vmnic2 -V 1 dv_inside_switch

2014-11-19_19-41-35

This then puts the port into an unused state, which means you can use vCenter to re-assign it to a new set of networking. Once you’ve done this for all your NIC’s, changed your VM’s over the new network assignment, the broken DVS should disappear within vCenter. If you log onto the ESX host using vSphere client, you may have to remove it manually within this view/connection.

Regards

Dean


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.