ESXi 6 Configure Management Network Greyed out
The other day when playing around “rather hard” with distributed switches and NSX, I broke my distributed switch implementation on one of my lab ESXi 6 hosts. ย I couldn’t ping the host, and also even worse, couldn’t get to the the configure management network options in the DCUI on the host itself. ย The root cause analysis of this issue which I will explain later could have been avoided in my lab environment, however, let’s first see how to get back from being in the catch 22 of not being able to configure a management network that is broken – at least from a GUI perspective. ย If you run into the situation of ESXi 6 configure management network greyed out, then your only option is the command line.
As you can see below the “Configure Management Network” as well as other network options are greyed out.
ESXi 6 Configure Management Network Greyed out
To get to the command line of your DCUI interface which you need to do since network connectivity is broken, you simply log into the DCUI, go toย Troubleshooting Optionsย then select theย Enable ESXi Shell. ย This will enable the direct command line on the ESXi host. ย All we need to do at that point is use theย ALT+F1 key sequence and we will be taken to the command line shell. ย Simply login and begin entering commands.
Typically if something goes wrong with the management network with dvSwitches usually it isn’t as easy to recover from as with standard vSwitches. ย In my case, as I explained earlier the root cause related to promiscuous mode not being enabled on my vSwitch of the parent ESXi physical lab host. ย I had forgotten to enable promiscuous mode on a new vSwitch I had created for a particular ESXi host nested as a VM. ย When I added the dvSwitch configuration on the particular nested host then migrated physical interfaces and vmkernel ports over, the management network became hosed leaving me in the state described above.
Resolution
First we need to drop vmnic0ย from the dvSwitch that it is being used by so we can then add the vmnic back to the standard management port. ย To do that, we need to see which distributed switch ID we need to remove the nic from. ย To do that, run the following command:
esxcli network vswitch dvs vmware list
Now we need to remove the vmnic from the dvSwitch:
esxcfg-vswitch -Q vmnic0 -V <port ID> <dvSwitch name> example: esxcfg-vswitch -Q vmnic0 -V 56 DSwitch01
Then, add the vmnic0 back to your vSwitch0 switch:
esxcli network vswitch standard uplink add --uplink-name=vmnic0 --vswitch-name=vSwitch0
However, after doing this and restarting the management agents, I still had a greyed out management network.
There still must be an issue with the standard switch. ย There is a great post on “default reasoning” that shows the command line process to rebuild your standard switch.
A breakdown of those steps:
- Get a list of your vmkernel interfacesย –ย esxcli network ip interface list
- Remove vmkernel interface(s) –ย esxcli network ip interface remove โi vmk0 (typically vmk0 for management)
- List portgroups –ย esxcli network vswitch standard portgroup list
- Remove Management Network portgroup –ย esxcli network vswitch standard portgroup remove โp โManagement Networkโ โv vSwitchXย (where X is the vSwitch number)
- Remove vmnics:ย # esxcli network vswitch standard uplink remove โu vmnic0 โv vSwitch0ย (replace your uplink and vSwitch number accordingly)
- Add new Management Network portgroup ย –ย esxcli network vswitch standard portgroup add โp โManagement Networkโ โv vSwitch0
- Add new vmkernel interface –ย esxcli network ip interface add โi vmk0 โp โManagement Networkโ โm 1500
- Addย the new vmkernel IP interface –ย esxcli network ip interface ipv4 set โi vmk0 โI <IP_address> -N <Network_Mask> -t static
- Add your vmnics to the vSwitch –ย esxcli network vswitch standard uplink add โu vmic0 โv vSwitch0
- Restart management agents – you can do this by typingย services.sh restart
- Return to the DCUI by typingย ALT+F2
At the point above where you have restarted your management agents, you should once again have access to the management network options and not have any options greyed out.
Final Thoughts
Especially when playing around in a lab environment with distributed virtual switches, you ARE going to break something at some point. ย The above steps are handy to have around when you do. ย The vSphere or DCUI interface will leave you in the lurch when you are trying to get network connectivity established back to your ESXi host, however, the shell command line saves the day here. ย If you run into the situation ofย ESXi 6 Configure Management Network Greyed out, hopefully the steps listed above will help you get back up and running.