Thursday, January 28, 2010

Changing Service Console IP Address in ESX 3.5

This is very useful want.

Changing Service Console IP Address in ESX 3.5

In case you will need to change the physical network card association (change to the network card that used by Service Console), here's the command:

esxcfg-vswitch -U vmnic# vSwitch#
e.g. esxcfg-vswitch -U vmnic0 vSwitch0
--> Unlink the existing network card

esxcfg-vswitch -L vmnic# vSwitch#
e.g. esxcfg-vswitch -U vmnic1 vSwitch0
--> Link the correct network card

How you can confirm you link the correct network card to the Service Console?

-> Until you can browse to http://esxhostname (subsitute esxhostname with your ESX host name)

Actually this is not that difficult, but remember you will require console access to the server. Be sure to put the machine in Maintenance Mode then Disconnect it from Virtual Center. Then connect to the console of the ESX host;

  1. First we need to remove the old IP, the easiest way is to delete the vswif interface
    • esxcfg-vswif -d vswif0
      • replace vswif0 with the interface you’d like to remove
  2. Then we need to create a new vswif interface with our new IP address
    • esxcfg-vswif -a vswif0 -p Service\ Console -i 10.1.1.1 -n 255.255.255.0 -b 10.1.1.255
      • replace vswif0 with the interface you’d like to use
      • replace Service\ Console with the name of your Service Console portgroup (this is the default)
      • -i reflects your new IP
      • -n reflects your subnet
      • -b reflects your broadcast
  3. Now we need to update our default gateway
    • This is a simple change to the /etc/sysconfig/network file
  4. One last thing you’ll want to do after changing your gateway is reset the vswif interface, this will ensure it is connected as well as generate the new default gateway.
    • esxcfg-vswif -s vswif0 (this will disable the vswif0 interface)
    • esxcfg-vswif -e vswif0 (this will enable the vswif0 interface)

That’s it…. Now do NOT forget to update DNS and your HOSTS files, then I would suggest doing a ipconfig /flushdns on your VirtualCenter server before you attempt to re-connect the Host in VirtualCenter.

http://vmwaretips.com/wp/2008/09/12/changing-service-console-ip-address-in-esx-35/

No comments: