Sie sind auf Seite 1von 7

How to change IP address of your ESX Server

There is a time when you need to change the IP adress your ESX host. You cant do it in the VI client Graphical User Interface. The only thing you can do is to go to the ESX server console. 1.) First of all , you must have physical access to the console. 2.) Put your ESX host in Maintenance Mode and disconect it from Virtual Center. 3.) Now you can connect to the console of your ESX host. 4.) Remove the old IP adress (by deleting the vswif interface) esxcfg-vswif -d vswif0 (vsfif0 is your interface to remove. Otherwise use the number you need)

5.) Create a new vswif interface with the New IP adress esxcfg-vswif -a vswif0 -p Service Console -i 192.168.0.100 -n 255.255.255.0 -b 192.168.0.255 (vsfif0 is your interface you work with. Otherwise use the number you need). If you need, replace Service Console with the name of your Service Console portgroup (this one is the default value) -i is the new IP adresse -n is your new subnet -b is your broadcast 6.) Update the default gateway. Open nano nano /etc/sysconfig/network file

Press CTRL+O and ENTER then CTRL+Q to quit 7.) Then you need to restart the interfac. Do a esxcfg-vswif -s vswif0 (this will disable the vswif0 interface) and esxcfg-vswif -e vswif0 (this will enable the vswif0 interface)

8.) You should now update update DNS and your HOSTS files. Also what I would do is a ipconfig /flushdns and ipconfig /registerdns on your Virtual Center server. Only after you should reconect your ESX server host in the Virtual Center.

You can change the DNS information, hostname from the VI client GUI:
01.) Open the VI client and highlight the ESX Server host and click on the Configuration tab. 02.) Click DNS and Routing.

03.) Click Properties. 04.) If you want to change the hostname, domain, and DNS servers, click the DNS Configuration tab and enter the appropriate values.

05.) To change the default gateway, click the Routing tab and enter the appropriate values.

06.) Then you can restart the ESX server from the GUI interface of your VI client for the changes to take an effect

So after the reboot you get this : (I just changed my DNS info from vladanseget.com to vladan.fr as an example

If you found this website useful and want to comeback for more, consider subscribing for FREE via RSS. If you dont know what is RSS, dont worry, I wrote a little guide what is RSS and how it saves your daily time. Read more: http://www.vladan.fr/how-to-change-ip-address-of-the-esx-serverconsole/#ixzz1sUeqAgoI

Changing the IP address, default gateway, and hostname of the Service Console in ESX Details
This article provides steps to change the Service Console IP address, gateway address, and hostname on an ESX 3.x and 4.x host.

Solution
Note: ESX 4.0 Update 2 introduces a new tool that simplifies the process of creating or restoring networking in the ESX service console. For more information, see Configuring or restoring networking from the ESX service console using console-setup (1022078). Note: To change the IP network information on an ESXi host, see Management Network from the direct console (1006710) . Configuring the ESXi

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.

1. Run this command to set the IP address:


[root@server root]# esxcfg-vswif -i a.b.c.d -n w.x.y.z vswif0

where a.b.c.d is the IP address and w.x.y.z is the subnet mask. Note: In this example, vswif0 is the Service Console adapter that is the interface to which you are applying the IP address change. 2. Open the /etc/hosts file with a text editor and modify it so that it reflects the correct IP address and hostname. Note: You may also need to verify and change the file /etc/vmware/esx.conf file for the hostname and IP address. 3. To change the default gateway address and the hostname, edit the /etc/sysconfig/network file and change the GATEWAY and HOSTNAME parameters to the proper values. 4. For the changes to take place, 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 readd 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).

Changing the hostname without rebooting


To dynamically change the hostname, run the command:
[root@server root]# hostname newname

Note: This command creates a temporary hostname change. This change is lost when the system is rebooted.

Changing the DNS server settings


To change the DNS server settings, update the nameserver IPs and search domain in the /etc/resolv.conf file.

Changing settings in VMware vSphere or Infrastructure Client


To change the hostname, domain, DNS servers, and default gateway in VMware vSphere or Infrastructure Client: 1. 2. 3. 4. Highlight the ESX host and click 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. Note: Disable VMware High Availability if you do not want virtual machines to failover during the hostname IP change. 5. To change the default gateway, click the Routing tab and enter the appropriate value. 6. Reboot the ESX host for the changes to take effect . 7. Reconnect the ESX host to vCenter Server with the new IP address.

Generating new certificates for the ESX host


The ESX host generates certificates the first time the system is started. Under certain circumstances, it might be required to force the host to generate new certificates. Typically new certificates only need to be generated if the hostname has been changed or the certificates have been deleted accidentally. Each time you restart the vmware-hostd process, the mgmt-vmware script searches for existing certificate files ( rui.crt and rui.key). If the files cannot be found, new certificate files are generated. To generate new certificates: 1. Put the host into Maintenance Mode. 2. In the directory /etc/vmware/ssl, back up any existing certificates by renaming them with these commands:
[root@server root]# mv /etc/vmware/ssl/rui.crt /etc/vmware/ssl/orig.rui.crt [root@server root]# mv /etc/vmware/ssl/rui.key /etc/vmware/ssl/orig.rui.key

Note: If you are regenerating certificates because you accidentally deleted them, you do not have to rename them. 3. Reboot your host to allow it to begin using the new certificate, or restart the host services: a. Restart hostd, using this command:
service mgmt-vmware restart

b. Restart vmkauthd, using this command:


service vmware-vmkauthd restart

4. Exit Maintenance Mode. 5. Confirm that the ESX host successfully generated new certificates by running this command and comparing the time stamps of the new certificate files with orig.rui.crt and orig.rui.key:
[root@server root]# ls -la /etc/vmware/ssl/rui*

Notes:

Disable VMware High Availability if you do not want virtual machines to failover during the hostname IP change. If you are using vSphere 4.x you can just disable host monitoring in the HA settings. For related information, see Verifying ESX host networking configuration on the service console (1003796). You may be required to regenerate your SSL certificate. For more information, see Replacing or Regenerating an SSL Certificate for the Management Interface (1843). 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). For information on replacing VirtualCenter Server certificates, see:
o o

Replacing VirtualCenter Server Certificates in Virtual Infrastructure 3 Replacing VirtualCenter Server Certificates in vSphere 4

The iSCSI Qualified Name used for iSCSI storage configuration is based on the hostname of the ESX host. If you change the hostname of the ESX host, ensure to review your iSCSI software initiator configuration. For more information on iSCSI troubleshooting, see Configuring and troubleshooting basic software iSCSI setup (1008083). For more information on changing the hostname, see Changing the name of an ESX or ESXi host (1010821).

Das könnte Ihnen auch gefallen