Changing ESX IP Address via Service Console

If you need to change the ESX (3.5 or 4.0) Service Console IP address but can not connect to it via the vSphere (or VI) Client then it can be changed from the console.

Access one of the virtual terminals, for example by pressing Alt-F1.
Login as root
Find out what virtual switch interface (vswif) the Service Console is on and what the port group is called, by defaulty vswif=vswif0 and port group=”Service Console” by issuing the command

esxcfg-vswif -l

to list the virtual switch interfaces. The output will be similar to

untitled1

In the above example the vswif name is vswif0 and the port group is “Service Console”. The current IP address is 192.168.35.166, to change it issue the command

esxcfg-vswif <swif name> -p <port group> -i <new ip address> -n <network mask> -b <broadcast address>

e.g. to change it to 192.168.25.151, netmask 255.255.255.0 broadcast 192.168.25.255 enter

esxcfg-vswif vswif0 -p “Service Console” -i 192.168.25.166 -n 255.255.255.0 -b 192.168.25.255

You might also need to change the default gateway. To do this edit /etc/sysconfig/network (with something like vi) and change the GATEWAY setting, once you have edited /etc/sysconfig/network you will need to restart networking with /etc/ini.d/network restart

This entry was posted in VMware, vSphere. Bookmark the permalink.

Leave a Reply

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