ESX Commands: esxcfg-vswif

The esxcfg-vswif command allows you to create and modify Service Console ports and their IP information. Many times I have to change stuff after the install process is complete and the only place is via the direct service console because network communication is not possible. This usually happens when the network team changes a vlan in the middle of the install or they change a subnet. Not to disparage network teams many times I am the network team and the virtualization team.
Create a new vswif:
#first add a port group with esxcfg-vswitch
esxcfg-vswitch -A "Service Console Test" vSwitch-Test
#then use esxcfg-vswif to create a new vswif
esxcfg-vswif -a -i 172.16.50.40 -n 255.255.255.0 -p "Service Console Test" vswif1
#List your vswifs
esxcfg-vswif - l
#Example:
[[email protected] root]# esxcfg-vswif -l
Name Port Group IP Address Netmask Broadcast Enabled DHCP
vswif0 Service Console 172.16.50.50 255.255.255.0 172.16.50.255 true false
vswif1 Service Console Test172.16.50.40 255.255.255.0 172.16.50.255 true false

Modify your Service Console network information:
esxcfg-vswif -i 172.16.50.41 -n 255.255.255.0 vswif1
#example
[[email protected] root]# esxcfg-vswif -i 172.16.50.41 -n 255.255.255.0 vswif1
Setting IP config
Nothing to flush.
[[email protected] root]# esxcfg-vswif -l
Name Port Group IP Address Netmask Broadcast Enabled DHCP
vswif0 Service Console 172.16.50.50 255.255.255.0 172.16.50.255 true false
vswif1 Service Console Test172.16.50.41 255.255.255.0 172.16.50.255 true false

Leave a Reply

Your email address will not be published. Required fields are marked *