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

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

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s