Another quick post about ESXCLI basics. Here is a procedure how to quickly recover the Management Network functionality on your ESXi host.
- First, login through iLO or iDRAC or iRMC, whatever remote management solution your server is equipped with.
- Press F2 on Direct Console UI, provide the root password and enable ESXi Shell via Troubleshooting Options.
- Press ALT+F1 and log in.
- List vmkernel interfaces: # esxcli network ip interface list
- Remove vmkernel interface(s): # esxcli network ip interface remove –i vmkX (where X is the vmk# you want to remove)
- 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 vmnicX –v vSwitchX (where X is the uplink number and vSwitch number)
- Add new Management Network portgroup: # esxcli network vswitch standard portgroup add –p ‘Management Network’ –v vSwitchX
- Add new vmkernel interface: # esxcli network ip interface add –i vmk0 –p ‘Management Network’ –m 1500
- Configure the new vmkernel interface: # esxcli network ip interface ipv4 set –i vmk0 –I <IP_address> -N <Network_Mask> -t static
- Add vmnics: # esxcli network vswitch standard uplink add –u vmic0 –v vSwitch0
- Next, type: # exit
- Press ALT+F2 to return to DCUI and login if necessary.
- Disable ESXi Shell.
- Restart the Management Network.
- Logout.
Done! 🙂
Reconnect the host to vCenter Server to finalize the configuration.
Cheers!
– Marek.Z