Monday, June 16, 2008

ESX Networking from the CLI

11:30 PM Sunday night, tired and still trying to finish off a few tidy up jobs, in preparation for Dell / EMC engineer tomorrow (doing SAN install).

So there I am, trying to add a new port group for a management VLAN I'd created earlier on the pSwitches. However, instead of creating a port group I created a vSwitch, then tried to bind a pNic to it, which was already attached to another vSwitch.

Logic states that ESX shouldn't let me do that... but.... something weird happened.. POOF! The ESX server dropped off the face of the earth. No VM's attached to vSwitch0 had comms! I tested pinging a VM on another vSwitch, worked fine.. I also didn't have a service console on that vSwitch either.. My users based in United States would be waking up soon, so I decided to drive out to the data centre and troubleshoot it. :(

Since I couldn't rely on a nice GUI to manage ESX, I soon realised my ESX CLI knowledge is somewhat lacking! After a quick search I found this site, which saved my bacon:

http://www.petri.co.il/5-critical-vmware-esx-cli-network-commands.htm


This showed me that I had no pNics linked to vSwitch0
esxcfg-vswitch -l

This added the pNic onto vSwitch0 and thus got my service console back on the network. :)
esxcfg-vswitch -L vmnic0 vSwitch0

No comments: