VMware

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.

networkgrey02

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.

networkgrey05
networkgrey06

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

networkgrey07

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.

networkgrey04

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.

Subscribe to VirtualizationHowto via Email 🔔

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Brandon Lee

Brandon Lee is the Senior Writer, Engineer and owner at Virtualizationhowto.com and has over two decades of experience in Information Technology. Having worked for numerous Fortune 500 companies as well as in various industries, Brandon has extensive experience in various IT segments and is a strong advocate for open source technologies. Brandon holds many industry certifications, loves the outdoors and spending time with family.

Related Articles

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.