VMware Cloud Community
snowfresh
Contributor
Contributor

How to change IP of ESX box

I want to move my ESX 3.0 server from test to production.

How can I change the IP address of the ESX box?

I am not using VC

regards

Snow

Reply
0 Kudos
15 Replies
virtech
Expert
Expert

From the console use the following command :

esxcfg-vswif -i xx.xx.xx.xx vswif0

Message was edited by:

Mooihoek

Reply
0 Kudos
vangoge
Hot Shot
Hot Shot

You can do this also via the VI Client.

Connect to the server

Go to the config tab

Select netwxorking

go in to the properties of the vSwitch where the Service console is located You can change all except the ip address.

if you want to change the ipaddress yyou need to create a second Service Console port with the new ip.

reconnect via vi to the new service console ip address

remove the old service console port on the virtual switch.

Greetings

gERT

Reply
0 Kudos
phenrichs
Enthusiast
Enthusiast

I installed with the default options and the path to the file is

/etc/sysconfig/network-scripts

use an editor like vi to change the ip in the ifcfg-eth<#> file # being the adapter that you need to change. Mine was eth0

Message was edited by:

phenrichs

Reply
0 Kudos
virtech
Expert
Expert

You should use esxcfg-vswif -i xx.xx.xx.xx vswif0 , From the testing I did changing the ifcfg-eth made no difference

Reply
0 Kudos
cln
Contributor
Contributor

Can I do this without a reboot of the ESX host?

Reply
0 Kudos
virtech
Expert
Expert

I think from memory a reboot was required.

Reply
0 Kudos
admin
Immortal
Immortal

Editing the ifcfg-ethX files will have no effect when booted into the VMkernel.

Use esxcfg-vswif -i to change the IP, there is more going on there than just editing config files. You can do this without a reboot.

Reply
0 Kudos
JBP0007
Contributor
Contributor

You can use all the process but you need to restart the service.

Reply
0 Kudos
Quiggley
Contributor
Contributor

Does this all work for ESX2 also?

Reply
0 Kudos
sachinmali17
Contributor
Contributor

Hello I have 10.70.x.x ip address & I want to chang it 10.72.x.x in

/etc/sysconfig/network-script/ifcfg-vswif0

but after rebooting it doesnt show anything in vmnic0

so how I can change the Ip of my esxserver 3.0

Reply
0 Kudos
sfonten
Contributor
Contributor

the way you show your ip is from root prompt type

cat /etc/sysconfig/network-scripts/ifcfg-vswif0

is this what you are looking for?

if you want to change the ip

from root issue

esxcfg-vswif vswif0 -1 10.70.xx.xxx(ip address) -n 255.255.x.x (subnet mask)

Message was edited by:

sfonten

Reply
0 Kudos
dploth
Contributor
Contributor

When running this command: esxcfg-vswif vswif0 -1 10.70.xx.xxx(ip address) -n 255.255.x.x (subnet mask)

Get an error command not found with a - bash. Does this mean you have to be logged in as root?

Reply
0 Kudos
sfonten
Contributor
Contributor

no

you are putting in the wron cmd its not -1 its -i

sorry i missed typed it in the previous response

Message was edited by:

sfonten

Reply
0 Kudos
dploth
Contributor
Contributor

Thank you for response. I did what you said and was able to change IP. thanks .

Reply
0 Kudos
dreamgear
Contributor
Contributor

I changed my ip using the esxcfg-vswif command, but now I can't start any of my VMs. There's no error message - the start button is grayed out.

Reply
0 Kudos