VMware Cloud Community
vDeepak
Enthusiast
Enthusiast
Jump to solution

Need to change ESX ip address from Static to Dynamic!

While doing some R and D over ESX server i provided my ESX box as static Ip through VC server....but it fails and process gets hanged..and now am not abe to connect to ESX box through VC server.

when it was Dynamic everythng was good..so i need to change ESX ip address from static to Dynamic...and only way am able to connect to box is by ILO..

Will you please suggest the command by which i can do it?

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
TomHowarth
Leadership
Leadership
Jump to solution

Read my blog post on the subject http://planetvm.net/blog/?p=423

If you found this or any other answer useful please consider the use of the Helpful or correct buttons to award points

Tom Howarth VCP / vExpert

VMware Communities User Moderator

Blog: www.planetvm.net

Contributing author for the upcoming book "[VMware vSphere and Virtual Infrastructure Security: Securing ESX and the Virtual Environment|http://my.safaribooksonline.com/9780136083214]”. Currently available on roughcuts

Tom Howarth VCP / VCAP / vExpert
VMware Communities User Moderator
Blog: http://www.planetvm.net
Contributing author on VMware vSphere and Virtual Infrastructure Security: Securing ESX and the Virtual Environment
Contributing author on VCP VMware Certified Professional on VSphere 4 Study Guide: Exam VCP-410

View solution in original post

0 Kudos
11 Replies
vDeepak
Enthusiast
Enthusiast
Jump to solution

any update?

0 Kudos
john23
Commander
Commander
Jump to solution

--Create a vswitch first

esxcfg-vswitch -a <vswitch name>

esxcfg-vswitch -L <uplink > <vswitch name?

esxcfg-vswitch -A <portgroup name> vSwitch

esxcfg-vswif -a vswif0 -a <portgroup name> -i DHCP

Thanks -A Read my blogs: www.openwriteup.com
0 Kudos
vDeepak
Enthusiast
Enthusiast
Jump to solution

i thnk there is somethng wrong in above command....its -a and -A i suppose in last line...

i created the switch and port group for service console and now need to assign that port group to DHCP..

Please suggest .

0 Kudos
RParker
Immortal
Immortal
Jump to solution

http://communities.vmware.com/message/437878

It would appear the best way to do it is simply delete the SC, and create a new one with a DHCP address.

0 Kudos
john23
Commander
Commander
Jump to solution

See the command help for option:

Esxcfg-vswitch

Description: Creates and updates virtual machine (vswitch) network settings

Syntax: esxcfg-vswitch <options> [vswitch[:ports]]

Options:

-a

Add a new virtual switch.

-d

Delete the virtual switch.

-l

List all the virtual switches.

-L <pnic>

Set pnic as an uplink for the vswitch.

-U <pnic>

Remove pnic from the uplinks for the vswitch.

-p <portgroup>

Specify a portgroup for operation. Use ALL for operation to work on all portgroups

-v <vlan id>

Set VLAN ID for portgroup specified by -p. 0 would disable the VLAN.

-c

Check to see if a virtual switch exists. Program outputs a 1 if it exists, 0 otherwise.

-A <name>

Add a new portgroup to the virtual switch.

-D <name>

Delete the portgroup from the virtual switch.

-C <name>

Check to see if a portgroup exists. Program outputs a 1 if it exists, 0 otherwise.

-r

Restore all virtual switches from the configuration file (Internal use only)

-h

Displays command help

Thanks -A Read my blogs: www.openwriteup.com
0 Kudos
vDeepak
Enthusiast
Enthusiast
Jump to solution

Parker: am going through the post suggested by you and will back to you shortly.

Amit: meanwhile am following the way suggested by you...i had deleted my all virtual switches over esx and now am logging to esx through ILO and created a new virtual switch with esxcfg-vswitch -a vswitch0 command and then i tried to create port group over this cirtual switch and i used esxcfg-vswitch -A "service console" vswitch0 command and am able to see that with esxcfg-vswitch -l command .

I hope that service console is created..but i dnt know how to provide the port group "service console " Ip address as to take frm DHCP.

As whn am trying to use command esxcfg-vswif -l comamnd am getting simply :

root--# esxcfg-vswif -l

name port group ip adress netmask broadcast enabled DHCP

and nothng below these names...its blank..so i suppose smthg more to configure.

Apart from this will you please also answer my another question:

1. whats diff. between creating service console port by command : esxcfg-vswitch -A "service console" vswitch0 and esxcfg-vswitch -p "Service Console" vSwitch0 ?

2. Whats diff. between esxcfg-vswitch and vswif?

Also output of command :

esxcfg-vswitch -p "Service Console" vSwitch0 gives bad command in this scenario!

i had just started doing all through command prompt..so new is this arena

0 Kudos
vDeepak
Enthusiast
Enthusiast
Jump to solution

First delete all your vswitches and vswif with these commands:

esxcfg-vswif -d vswif0

and then...

esxcfg-vswitch -d <vswitch name>

and then create the new one and new port group as follows:

My problem is solved now...

i followed following steps:

sxcfg-vswitch -a <vswitch name>

esxcfg-vswitch -L <uplink NIC name> <vswitch name

esxcfg-vswitch -A <portgroup name> vSwitch

esxcfg-vswif -a vswif0 -p <portgroup name > -i DHCP

This above method is cent percent perfect and it resolved my issue Smiley Happy

0 Kudos
vDeepak
Enthusiast
Enthusiast
Jump to solution

my problem is yet solved but still am looking for answer:

whats the diff between vswif and vswitch...as far i knw vswif is for creating service console port...will you guys put more stress over it?

Also whats the diff between creating the service console port group and creating new vswif?

also the diff between creating service console with -p and -A command

0 Kudos
TomHowarth
Leadership
Leadership
Jump to solution

Read my blog post on the subject http://planetvm.net/blog/?p=423

If you found this or any other answer useful please consider the use of the Helpful or correct buttons to award points

Tom Howarth VCP / vExpert

VMware Communities User Moderator

Blog: www.planetvm.net

Contributing author for the upcoming book "[VMware vSphere and Virtual Infrastructure Security: Securing ESX and the Virtual Environment|http://my.safaribooksonline.com/9780136083214]”. Currently available on roughcuts

Tom Howarth VCP / VCAP / vExpert
VMware Communities User Moderator
Blog: http://www.planetvm.net
Contributing author on VMware vSphere and Virtual Infrastructure Security: Securing ESX and the Virtual Environment
Contributing author on VCP VMware Certified Professional on VSphere 4 Study Guide: Exam VCP-410
0 Kudos
TomHowarth
Leadership
Leadership
Jump to solution

a vSwitch is a switch and vswif is a effectively a portgroup on that switch.

If you found this or any other answer useful please consider the use of the Helpful or correct buttons to award points

Tom Howarth VCP / vExpert

VMware Communities User Moderator

Blog: www.planetvm.net

Contributing author for the upcoming book "[VMware vSphere and Virtual Infrastructure Security: Securing ESX and the Virtual Environment|http://my.safaribooksonline.com/9780136083214]”. Currently available on roughcuts

Tom Howarth VCP / VCAP / vExpert
VMware Communities User Moderator
Blog: http://www.planetvm.net
Contributing author on VMware vSphere and Virtual Infrastructure Security: Securing ESX and the Virtual Environment
Contributing author on VCP VMware Certified Professional on VSphere 4 Study Guide: Exam VCP-410
0 Kudos
vDeepak
Enthusiast
Enthusiast
Jump to solution

Thanks Tom!

0 Kudos