If you have forgotten to enter the VLAN ID during the VMWare ESX or VSphere installed or you have entered the wrong VLAN ID you will find you will be unable to manage the VMWare host remotely, the only way to resolve this is to change the VLAN ID via the command line shell.
First you will need to log on locally to the server, the username will be root and you will have had to enter a password as part of hte install.
You will then need a couple of bits of information
- The name of the virtual switch where the Service Console is connected, the default will be vSwitch0
- The name of the Service Console, the default will be Service Console
- The correct VLAN ID, I can help you with ths one if you are unsure check with your network administrator
To retrieve the first to bits of information you can use the command;
Which will give you an output similar to the below;
The command to use to change the VLAN ID Is;
esxcfg-vswitch v_Switch_Name -v VLAN_ID -p “Service_Console_Name”
Using the the above image as a reference I want to change the VLAN ID of the Service Console to the 100 VLAN because I entered the wrong one during the install
esxcfg-vswitch vSwitch0 -v 100 -p “Service Console”
Using the the above image as a reference I want to remove the VLAN ID completly as I am connected to a none trunked port.
Set the VLAN ID to 0 (zero)
esxcfg-vswitch vSwitch0 -v 0 -p “Service Console”
Once you are finished run esxcfg-vswitch -l again to check the results.
esxcfg-vswitch can be used to change the VLAN ID on any of you port groups, but as long as the Service Console is up you are probably better off in the GUI