VMware

This Question is Answered

2 "helpful" answers available (6 pts)
11 Replies Last post: Jul 3, 2009 1:12 AM by vDeepak  

Need to change ESX ip address from Static to Dynamic! posted: Jun 26, 2009 11:40 AM

Click to view vDeepak's profile Hot Shot 121 posts since
May 31, 2009

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?

Click to view @m!t's profile Enthusiast 53 posts since
Apr 8, 2008

--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

-@m!t

Click to view RParker's profile Champion 5,270 posts since
Dec 6, 2006
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.
Click to view @m!t's profile Enthusiast 53 posts since
Apr 8, 2008

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

Click to view tom howarth's profile Guru 7,351 posts since
Jul 25, 2005
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”. Currently available on roughcuts

Click to view tom howarth's profile Guru 7,351 posts since
Jul 25, 2005
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”. Currently available on roughcuts

VMware Developer

SDKs, APIs, Videos, Learn and much more in the Developer community.

Learn More

Developer Sample Code

Increase your developer productivity with VMware API sample code.

Learn More

VMworld Sessions & Labs

Online access to the latest VMworld Sessions & Labs and online services.

Learn more

Purchase PSO Credits Online

Purchase credits to redeem training and consulting services online.

Buy Now

Community Hardware Software

View reported configurations or report your own.

Learn More

VMware vSphere

Come witness the next giant leap in virtualization.

Register Today

Communities