Tuesday, 15 September 2009

Moving ESX Service Console using CLI

Today a NIC in one of our ESX (3.5) Servers failed. Unfortunately, the NIC that failed was running a few Virtual Machines, and the Service Console (I know, I know...) Luckily (because I wouldn't have it any other way), the server had a DRAC card and we still had access to the console, so all was not lost.
We were able to move the Service Console to the other vSwitch using the following commands:

esxcfg-vswif -d vswif0
esxcfg-vswitch -D "Service Console" vSwitch0
esxcfg-vswif -A "Service Console" vSwitch1
esxcfg-vswif -a vswif0 -p "Service Console" -i 192.168.3.53 -n 255.255.255.0

Once we had restored access to the Service Console, we could move the VM's to the other vSwitch using the viclient.

Thanks to the following websites for guidence:
http://www.petri.co.il/forums/showthread.php?t=32229
http://vmware-land.com/esxcfg-help.html