howto change the ipaddress of an ESX server from the server console

from the service console

  • login with or su to root
  • esxcfg-vswif -d vswif0
    this will delete the existing vswif0, will give an error about nothing to flush
  • esxcfg-vswif -a vswif0 -p Service\ Console -i xx.xx.xx.xx -n -b xx.xx.xx.255
    replace the xx after -i with the new ipaddress, and the xx after -b with the broadcast address.  So not the default gateway, but the broadcast address!
    example: esxcfg-vswif -a vswif0 -p Service\ Console -i -n -b
  • for the default gateway
    edit the file /etc/sysconfig/network .  You can edit this file with vi or nano (I prefer nano).
  • after that, reboot the ESX.  You can already connect to the ESX without rebooting, but virtual center reacts funny without a reboot.  Or connect to virtual center and check the network configuration 🙂

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s