Changing Service Console IP is quite simple and the procedure looks something like (based on information found in this great post):
- List current Service Console port groups: esxcfg-vswitch -l this command will retrieve current vSwitches configuration, something like:
- We are looking for the virtual interface associated with that PortGroup, witch will be named something like vswif<n>, where n is the instance number of virtual interface, and will be retrieved by the esxcfg-vswif -l, aside all IP configuration associated with each virtual interface:
- Once we've located our Service Console's associated virtual interface the only way for changing IP configuration is delete that virtual interface and create a new virtual interface with the new desired parameters. Steps to perform that procedure are:
- Delete virtual interface with esxcfg-vswif -d vswif0
- Create new virtual interface and associate it with our service console port group called Service Console:
esxcfg-vswif -a -p "Service Console" -i <new IP Address> -n <netmask> vswif0
- Delete virtual interface with esxcfg-vswif -d vswif0
- We also should modify the default gateway associated with the virtual interface modifying /etc/sysconfig/network-scripts/ifcfg-vswif0 and adding GATEWAY=ggg.ggg.ggg.ggg in the file.
- This step it's quite important if you want to save a lot of headaches. Modify the corresponding in the /etc/hosts file
- At this point you have two options, reboot the ESX host or disable and enable the vswif interface. If your choice was disabling and enabling the vswif interface you should perform the following procedure:
- To disable a vswif interface: esxcfg-vswif -s vswif0
- To enable a vswif interface: esxcfg-vswif -e vswif0
- To disable a vswif interface: esxcfg-vswif -s vswif0
Switch Name | Num 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 | ||||||||
|
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 |
If after all you still have connections/vMotion/HA problems check ESX host's entry in the VirtualCenter database. Duncan has a great post at Yellow-Bricks that explains what registry should be checked and modified: http://www.yellow-bricks.com/2008/09/29/storage-vmotion-fails-after-service-console-ip-change/
Now it's time to change VMkernel IP address. This change can be done via vClient, or can be done directly from Service Console. Changing VMkernel IP address through vClient it's quite simple, so I'll focus on making this change manually.
As we saw with the method for change the Service Console IP, this procedure depends on deleting the affected vmknic and creating a new one.
- Again, the first recommended step it's to list all vmknics available on your ESX host. That could be done using the esxcfg-vmknic -l command that will produce an output like this:
- Next, we are going to delete the affected vmknic (the bold one in our example). We'll also need the associated port group:
esxcfg-vmknic -d -p VMkernel vmk0
- Finally, we create a new vmknic with the desired configuration and we associate it with the correct port group. Remember that this procedure will generate a new MAC Address:
esxcfg-vmknic -a -p VMkernel -i yyy.yyy.yyy.yyy -n mmm.mmm.mmm.mmm vmk0
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 |
Keep in mind that these procedures are valid only for Standard vSwitches, and it's necesary slight modification to adapt it to Distributed vSwitches availables in ESX 4. But that's another history.
I based this post in my personal experience and the information recollected 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 could help somebody
No hay comentarios:
Publicar un comentario