Changing Service Console IP Address in ESX 3.5

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 -n -b
      • 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.

Interesting news… If you change your Service Console IP and your a host managed by VirtualCenter, SVMotion could stop working. The resolution I found was to put your host(s) into maintenance mode, disconnect, remove and re-add them. This will re-install the VC Agent and reconnect verifying the new IP, and SVMotion will work again. ┬áDuncan Epping over at has also seen this and has a similar resolution listed on his website (, it also includes a change to the VC database, but we both did not need this step for it to work.

Created on September 12, 2008 by Rick Scherer

Posted under ESX 3.5 Tips, ESXi 3.5 Tips, Networking, VMware.

This blog has 110,122 views.

Tags: , , , , ,

1 Star2 Stars3 Stars4 Stars5 Stars (2 votes, average: 5.00 out of 5)

9 Comments so far

  1. Duncan
    6:15 am on October 25th, 2008

    It could indeed lead to svmotion not working, but also for instance cloning etc:

  2. Duncan
    11:04 am on October 25th, 2008

    thanks for the link!

  3. Behrouz
    2:58 am on December 10th, 2008

    I am very new in to vmware. I have recently removed Service Console vswif1 which I made it on another sub net then vswif0. I can’t now connect to esx 3.5 server and even tried to make it again. Is there any solution for this issue.
    Thanks at once
    Regards Behrouz

  4. Rick Scherer
    9:47 am on December 10th, 2008

    You must ensure that you are connecting vSwif# to a portgroup that is on a vSwitch that has connectivity to the subnet your attempting to contact. It is very easy to create portgroup’s and vSwif ports that lead to no-where. Double check your connections all the way through

    esxcfg-vswitch -l
    will show you your vSwitch’s along with the Port Groups assigned to them. Also make sure that if you are using VLAN tagging you assign the VLAN to the portgroup, this can be done with the esxcfg-vswitch command.

  5. Luuk G
    10:36 pm on March 24th, 2009

    @ Rick Scherer

    i’ve changed my console ip adresses of all my esxhosts with success. But after this I got an error connecting to host when I want to clone a guest. The sollution to this was to change the vpxa.cfg ( it containt the old ipadres ). I had to put my esx hosts again in maintenance mode en remove from the cluster and then add to the cluster. When you look now at your vpxa.cfg the correct ipadres is in place.

    Could change in the second line of your comment “Disconnect” to “remove”

    Greet Luuk

  6. vikash kumar roy
    5:52 am on June 3rd, 2009

    I usually change service console IP or host name by editing following file
    1. /etc/sysconfig/network-scripst/ifcfg-vswif0.
    2. /etc/sysconfig/network
    3. /etc/hosts
    What is the difference between your steps and mine? Which one is better to follow ?

  7. Sudhir Ghosh
    11:57 am on January 12th, 2010

    Login as root and run the following command
    esxcfg-vswif -i -n vswif#
    #=0,1,2… depending on the service console you want to amend
    eg :-
    esxcfg-vswif -i -n vswif0

    Dont forget to restart network services

    #service network restart

  8. Bry
    11:56 pm on December 21st, 2010

    Can this IP address service can change IP address every atleast 10 mins in Washington DC area? Thanks

  9. John Prock
    1:31 pm on January 25th, 2011

    can anyone help? i am running esx 3.5.

    a host suddenly lost connection in virtual center. if i connect via console as root i can ping itself but cannot ping the gateway or anything else.

    i did a “esxcfg-vswif -i -n” command and reset the ip’s. still nothing works. i am tempted to say it’s a bad nic but I checked the port on the cisco switch and everything checked out. I even moved to a new port and the light turned green and resolved.

    can anyone help with another suggestion?

    PS. I’ve also tried rebooting several times to no avail.


Leave a Comment

Name (required)

Email (required)



More Blog Post