Today one of my friends accidentally deleted the “Management Network” Port Group on a ESXi. Here’s what I did to restore the network connectivity to the ESXi host:
- Login to the DCUI of the ESXi host in question
- In the DCUI go to “Troubleshooting Options” and “Enable ESXi Shell”
- Press “Alt + F1” for logging in via the ESXi Shell
- After Logging in execute the following commands to restore the connectivity.
In our case the “Management Network” Port Group, was deleted so first we have to recreate the “Management Network” Port Group:
esxcfg-vswitch -A "Management Network" vSwitch0
After the “Management Network” is recreated, add a VMKernel Interface to the just created “Management Network” Port Group:
esxcfg-vmknic -a -i 10.20.30.x -n 255.255.255.0 "Management Network"
Logout from the shell. Go back to DCUI [Alt + F2]. Logout from DCUI and Relogin and test “Management Network” connectivity.