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 255.255.255.0 -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 192.168.1.22 -n 255.255.255.0 -b 192.168.1.255
- 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 🙂