How to change IP address at VMWare ESX 3
March 26, 2009Do this from console
First remove the vswif0 object using esxcfg-vswif -d vswif0
Then run
Esxcfg-vswif -a vswif0- p Service\ Console -i 192.168.1.3 -n 255.255.255.0 -b 192.168.1.255 (or whatever your ip scheme is)
Then restart the service by running
/etc/init.d/mgmt-vmware restart
These settings can be changed using the Virtual Infrastructure Client or from the physical or a remote console connection (ILO, RSA, DRAC, etc).
See the following sections for details on each method.
From the Virtual Infrastructure Client
-
Highlight the ESX Server host and click on the Configuration tab.
-
Click DNS and Routing.
-
Click Properties.
-
To change the hostname, domain, and DNS servers, click the DNS Configuration tab and enter the appropriate values.
-
To change the default gateway, click the Routing tab and enter the appropriate values.
Note: Hostname and domain changes through the Virtual Infrastructure Client do not take place until the ESX host is rebooted.
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.
For this example, it is assumed that vswif0 is the Service Console adapter that is the interface to which you are applying the IP address change. Running the following command sets the IP address to the value substituted for a.b.c.d and the subnet mask to the value substituted for w.x.y.z:
[root@server root]# esxcfg-vswif -i a.b.c.d -n w.x.y.z vswif0
After running this command, edit the /etc/hosts file with an editor (such as nano or vi), and modify it so that it reflects the proper IP address and hostname.
To change the default gateway address and the hostname for the Service Console edit the /etc/sysconfig/network file and change the GATEWAY and HOSTNAME parameters to the proper values.
After you edit these files, you must reboot the host or restart the network service using the following command:
[root@server root]# service network restart
Note: This command breaks any current network connections to the service console.
You can also dynamically change the hostname using the command:
[root@server root]# hostname newname
Note: This command creates a temporary hostname change. This change is lost when the system is rebooted.
To change the DNS server settings, edit the /etc/resolv.conf file, update the nameserver IPs, and search domain if applicable.
Also see Verifying ESX Server host networking configuration on the service console (1003796).
All comments are moderated. Your comments will not appear here unless approved by the blog owner. Thank you.
Add a comment


