How to change ESX service console IP
To change the IP address of the ESX 3.x host, you need to change the configuration of the vswif. By default this is
vswif0 and this is assumed in this document. Login to the service console with root permissions, either by using root or doing a su - to get the permissions.
- Maintenance Mode then Disconnect it from Virtual Center, if applicable. Then connect to the console of the ESX host (PuTTY also works).
- Once in the service console run the command: This command deletes the existing vswif0. Don't worry if you get a message about nothing to flush.
- Then you need to run the command to change the ip address, subnet mask and broadcast address. They are also specified in that order when the command is given. An example command is below.
esxcfg-vswif -a vswif0 -p Service\ Console -i 10.1.1.1 -n 255.255.255.0 -b 10.1.1.255
- In this command the -a switch is to add a vswif, the \ in the Service\ Console is deliberate, the -i is the ip address, the -n is the netmask and the -b is the broadcast address.
- You now need to change your default gateway, you can do this by editing the network file located at /etc/sysconfig/network. To do this at the command prompt, by editing the file /etc/sysconfig/network file and correcting the "GATEWAY" line written there.
- One last thing you’ll want to do after changing your gateway is reset the vswif interface, this will ensure it is connected as well as generate the new default gateway:
esxcfg-vswif -s vswif0 (this will disable the vswif0 interface)
esxcfg-vswif -e vswif0 (this will enable the vswif0 interface)
- It is also recommended to restart the VMWare server.
Links
http://www.ozvms.com/index.php?option=com_content&view=article&id=349:changing-the-ip-address-of-service-console-in-esx-3x&catid=45:copy-of-tech-tips&Itemid=47
Tags: