VMware

This Question is Possibly Answered

1 "correct" answer available (10 pts) 2 "helpful" answers available (6 pts)
8 Replies Last post: Jul 25, 2008 8:45 AM by rolandt  

Changing IP address posted: Jul 22, 2008 2:35 PM

Click to view chgarcia's profile Novice 9 posts since
Jun 21, 2006
Would i be able to change the IP address of a VM that is powered off using powershell?

Re: Changing IP address

1. Jul 23, 2008 1:33 AM in response to: chgarcia
Click to view LucD's profile Champion 2,445 posts since
Oct 31, 2005
Not that I know of.
The IP address is defined in the OS that runs on the VM.

There are ways of changing/defining the IP address but it would always require starting the VM.

Re: Changing IP address

2. Jul 23, 2008 8:47 AM in response to: chgarcia
Click to view LucD's profile Champion 2,445 posts since
Oct 31, 2005
Not that I know of.
The IP address is defined in the OS that runs on the VM.
It will always require at least starting the VM.

Sorry about the duplicate.
We're still having problems with access to the communities in my neck of the woods.


Message was edited by: LucD

Re: Changing IP address

3. Jul 23, 2008 10:00 AM in response to: chgarcia
Click to view c_shanklin's profile Master 763 posts since
Dec 3, 2007

This is possible, using guest customization. Unfortunately I don't have an example ATM but we're working on one.

For reference, this is how VMware Site Recovery Manager works. It's not a very pretty process (we'll have a much better one when we hook up VIX a bit more than it is today) but it does work.

Re: Changing IP address

4. Jul 23, 2008 10:28 AM in response to: c_shanklin
Click to view LucD's profile Champion 2,445 posts since
Oct 31, 2005
Carter, now you made me very curious. ;-)
If that is possible for a powered off guest (Windows or Linux) some of our problems would be solved.

In fact we have been following a recent discussion on SRM and changing IP addresses on the Dell Inside IT blog.
It boiled down to this:
  • use a " customization wizard" similar to what we now do when we clone a guest or create a new one from a template
  • but for the actual change (hostname, IP addr...) the guest needs to be powered on

And during the SRM Deep Dive session last February we got a similar view.

Re: Changing IP address

6. Jul 23, 2008 11:03 AM in response to: LucD
Click to view c_shanklin's profile Master 763 posts since
Dec 3, 2007

Luc,

I just spoke with someone very knowledgable of SRM and he said we don't have any built in way for doing it with powered off VMs.

That being said, you could use a tool like the VDDK to edit the files of an offline VM, which you could use to change Linux IP addresses, and I believe they are also going to add the ability to do this with offline registry hives at some point, which would cover Windows.

Obviously this would be rather ugly, but if anyone goes down this route, please let us all know.

Re: Changing IP address

7. Jul 23, 2008 3:12 PM in response to: chgarcia
Click to view c_shanklin's profile Master 763 posts since
Dec 3, 2007
There is an entry for this in our FAQ (search for IP address), has anyone tried it?

Re: Changing IP address

8. Jul 25, 2008 8:45 AM in response to: c_shanklin
Click to view rolandt's profile Novice 19 posts since
Aug 26, 2005

I attempted to use the "change IP address in a VM" code snippet from the FAQ unsuccessfully. After some tweaking here and there I got the got code to execute but it did not change the IP addr. Since (for this particular situation) all of the VMs that I needed to do this address change in are MS W2K3, as a work-around I am using psexec to remote execute netsh.

It would be really nice if the toolkit customization method would really work because I will have to do this same thing with linux VMs very soon.

Note, do not know if it had anything to do with the code snippet not working but in this development testbed we do not have any VC OS Customization entries.

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