Changing the VLAN ID of a ESX Service Console using Command Line
A good amount of ESX admins ask on dialy basis how to change the VMware ESX Service Console Vlan using command line. As I decided to save time by writing the steps for these kind of questions to send it to others when asked. I will document these commands in here:
First of all check which vSwitch the Service Console is on (and the name of the Service Console) with esxcfg-vswitch -l (Note: The default service Console switch is vSwitch0 & default name is “Service Console”.)
To set a vlan id on the service console use:
esxcfg-vswitch vSwitch0 -v X -p “Service Console” (Replace X with the desired VLAN number)
To remove the vlan id completely, you will need to set it to 0 using the following command:
esxcfg-vswitch vSwitch0 -v 0 -p “Service Console”
Please note both commands above had assumed the name of your service console & switch are “Service Console” & vSwitch0 as they more probably are as these are the default values. If you have changed them, please replace these with your values.
I hope this tip will help many of you out there. If I had gave you the link to fix your problem as a friend or a customer, then I hope it save you the cost of an engineer trip to your place
. Please leave your feedback & comments as these are highly appreciated
.

July 31st, 2009 at 1:58 pm
Hi Eiad,
Thank you for good explanation,
I was confused with the command line syntax until I come across your post and removed vlan as you recommended here.
Thanks again!
Alex
August 11th, 2009 at 12:23 pm
Thanks for the help.
October 7th, 2009 at 4:31 am
Perfect explanation!Thanks a LOT!