Changing the IP address, default gateway, and hostname of the Service Console in ESX
Changing settings from the physical or remote console connection
Changing the IP for the Service Console must be done from the physical console or through a remote console session. If you make changes through a network connection such as SSH, network connectivity to the Service Console disconnects because the Service Console’s network interface changes.
- Run this command to set the IP address:
[root@server root]# esxcfg-vswif -i a.b.c.d -n w.x.y.z vswif0
a.b.c.dis the IP address and
w.x.y.zis the subnet mask.
Note: In this example,
vswif0is the Service Console adapter that is the interface to which you are applying the IP address change.
- Open the
/etc/hostsfile with a text editor and modify it so that it reflects the correct IP address and hostname.
Note: You are required to edit files on an ESX host. For more information, see Editing files on an ESX host using vi or nano (1020302).
Note: You may also need to verify and change the file /etc/vmware/esx.conf file for the hostname and IP address.
- To change the default gateway address and the hostname, edit the
/etc/sysconfig/networkfile and change the GATEWAY and HOSTNAME parameters to the proper values.
- For the changes to take effect, restart the network service with the command:
[root@server root]#service network restart
Note: If you are required to edit the hostname, then you must reboot the host.
Note: This command breaks any current network connections to the Service Console, but virtual machines continue to have network connection. If the ESX host is managed by VirtualCenter or vCenter Server, you may have to remove and re-add the host to the inventory. For more information, see ESX not working properly in VirtualCenter after IP address change (1005633).
Note: Making changes to IP and DNS server settings can have a negative impact on the normal operation of ESX/ESXi, particularly in HA clustered environments. For more information, see Identifying issues with and setting up name resolution on ESX/ESXi Server (1003735).
Note: If the changed IP does not persist across a reboot, try deleting and recreating the Service Console vswif management interface. For more information, see Recreating Service Console networking from the command line (1000266).