recently asked me to change an ESX 3.5 host our production VLAN to another VLAN. This change implies a change of IP addresses portgroups Service Console and the vmkernel. Initially, this task could be viewed as a simple task, to log into the ESX host and change the IP physically, but this change is more hidden implications that could lead to serious problems such as losing the HA or VMotion capabilities in the affected host.
Change Service Console IP is quite simple and the procedure looks like (based on the information based on this great post ):
- List the port
- actuales groups of service console: esxcfg-vswitch -l This command will return it Configuración current vSwitch, something like:
- interfazvirtual port associated with that group, you have to have a name like vswif
where n is the number of the interface virtual, and will be returned by the command esxcfg-vswif -l, plus all the IP settings associated with each virtual interface: - Once we have located the virtual interface associated with our Service Console, the only way to change the IP settings is to delete the virtual interface and create a new interface virtual target range. The steps to perform the procedure are:
- Clear virtual interface: esxcfg-vswif -d vswif0
- Create a new virtual interface associates with our port of the service group called console Service console: esxcfg-vswif
-a-p "Service Console" -i <new IP Address> -n <netmask> vswif0
- También deberíamos modificar la puerta de enlace por defecto asociada con la interfaz virtual modificando /etc/sysconfig/network-scripts/ifcfg-vswif0 y añadiendo GATEWAY=ggg.ggg.ggg.ggg en el fichero.
- Este paso es bastante importante si quieres ahorrarte un montón de dolores de cabeza. Modifica la entrada correspondiente en el fichero /etc/hosts
- At this point you have two options, reboot the ESX host and enable or disable vswif l interface. If you choose to disable and enable the interface vswif should do the following:
- To disable the interface vswif: esxcfg-vswif -s vswif0
- To enable vswif interface: esxcfg-vswif -e vswif0
Once you have completed all these steps, just look for the ESX affected in VirtualCenter, Disconnect them and reconnect. This process will uninstall the agent vpxa isntalado the ESX host and reinstalled during the reconnection process .
If after this you still tienendo connection problems / VMotion / HA checks the ESX host entry in the VirtualCenter database. Duncan Epping has a great post on Yellow-Bricks that record should be checked and changed http://www.yellow-bricks.com/2008/09/29/storage-vmotion-fails-after-service-console -ip-change /
is time to change the IP address of the VMkernel. This change can be conducted via vClient, or can be made directly from the Service Console. Changing the IP address of the VMkernel through vClient is quite easy, so I will focus on how to make this change manually.
As we saw with the method for changing the IP of the Service Console, this procedure depends on vmknic hit delete and create a new one.
| Switch Name | a Ports Used Ports | | Configured Ports MTU | | Uplinks | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| vSwitch0 | | 64 13 64 | | 1500 | vmnic0, vmnic2 | ||||||||||||
| |||||||||||||||||
| Switch Name | Num Ports | Used Ports | Configured Ports | MTU | Uplinks | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| vSwitch0 | 64 | 13 | 64 | 1500 | vmnic1,vmnic3 | ||||||||
| |||||||||||||
so you can find the name of port group in your Service Console, in our example the one in bold. We seek
| Name | | Port Group IP Address | | Netmask Broadcast Enabled | | DHCP |
|---|---|---|---|---|---|---|
| vswif0 | Service Console | | xxx.xxx.xxx.xxx nnn.nnn.nnn.nnn | bbb.bbb.bbb.bbb | | true false |
- Again, the recommended first step is to list all available vmknics your ESX host. This can be done using the command esxcfg-vmknic -l will produce output similar to this:
- Then let's clear the affected vmknic (which is bold in our example). We also need the associated port group: esxcfg- vmknic-d-p VMkernel vmk0
- Finally, we construct the desired configuration vmknic and associate with the correct port group. Remember that this procedure will generate a new MAC address: esxcfg-vmknic VMkernel-a-p-i-n mmm.mmm.mmm.mmm vmk0 yyy.yyy.yyy.yyy
| Interface | Port Group | IP Address | Netmask | Broadcast | MAC Address | MTU | TSO MSS | Enabled |
|---|---|---|---|---|---|---|---|---|
| vmk0 | VMkernel | xxx.xxx.xxx.xxx | nnn.nnn.nnn.nnn | bbb.bbb.bbb.bbb | 00:50:56:aa:bb:cc | | 1500 40960 | true |
- Note that these proceedings are valid only for Standard vSwitch, and the need for a slight modification to suit the Distributed vSwitch available on ESX 4. But that's another story.
- I have based this post on my personal experience and information gathered from:
- http://vmwaretips.com/wp/2008/09/12/changing-service-console-ip-address-in-esx -35 /
- http://www.yellow-bricks.com/2008/09/29/storage-vmotion-fails-after-service-console-ip-change/
- http://www .yellow-bricks.com/2008/06/04/changing-the-ip-address-of-an-esx-host-and-ha /
I hope this post can help someone.