VMware Cloud Community
spseabra
Contributor
Contributor
Jump to solution

Change Guest OS Name

Hi All,

I don't know if it's possible or not, but I'm looking for a way to change a guest OS name on the recovery site (Windows). I know that in order to change the IP's one can use the .csv input method. But so far I've been unable to find a way to change IP and OS name.

Maybe it's possible using some kind of pre or post script... As anyone done this successfully?

Thanks.

0 Kudos
1 Solution

Accepted Solutions
admin
Immortal
Immortal
Jump to solution

Invoke-vmscript does work with linux VMs.

As for the in-VM option, there is a way to have it only run on recovery, but i'm scatter-brained at the moment. You could copy to the VM (per your last comment), which is what I have done in the past - I build the CMD file on the fly based on environment variables that are passed to the SRM server on execution of the recovery plan then copy to the VM using the powercli cmdlet copy-vmguestfile (again avoiding the requirement for networking and using VIX).

-alex

View solution in original post

0 Kudos
7 Replies
admin
Immortal
Immortal
Jump to solution

Not using the customization tool. You will have to look at either using newsid or netdom (available on Windows 2008 or as a download for 2003) in a post power-on script. I'm sure you're aware of the implications this may introduce if you have dynamic DNS or for a system that is tied to its netbios name such as Exchange, AD, etc.

-alex

0 Kudos
spseabra
Contributor
Contributor
Jump to solution

Hi Alex,

Thanks for the reply. By customization tool I assume you're refering to the dr-ip-customizer, or is there another one?

Cheers,

0 Kudos
admin
Immortal
Immortal
Jump to solution

The dr-ip-customizer is what i'm referring to. Additionally if I were to try this I would take one of two approaches:

1. run a post power-on script on the SRM server using powershell and the invoke-vmscript cmdlet to issue the netdom command to the VM (uses VIX API and does not require network connectivity). This involves installing powershell and powercli on the SRM server and creating a powershell script to run the invoke-vmscript cmdlet with the approriate netdom.exe command to rename the VM.

2. Place a local script on the VM and run as a start-up script upon recovery to run the netdom.exe command.

I like option 1 since i can consolidate management of the scripts to one location vs having scripts on every VM.

-alex

spseabra
Contributor
Contributor
Jump to solution

I see. Very helpfull stuff, thanks.

About the start-up script inside the VM...Since the recovery VM's are replicas of the protected ones, won't I incur the risk of having the netdom script executing on the souce VM's if there is a reboot or something? Or is there the possibility of appending files to the protected site VM placeholders?

Last but not least, do you know if the invoke-vmscript cmdlet works with Nix guests also?

Thanks in advance.

Cheers,

0 Kudos
spseabra
Contributor
Contributor
Jump to solution

Hmm... I think my question about the startup script was a dumb one... I could always use the post-script to first copy the startup.bat or something to the VM and instruct it to reboot the guest OS, all in the same sequence...

Cheers,

0 Kudos
admin
Immortal
Immortal
Jump to solution

Invoke-vmscript does work with linux VMs.

As for the in-VM option, there is a way to have it only run on recovery, but i'm scatter-brained at the moment. You could copy to the VM (per your last comment), which is what I have done in the past - I build the CMD file on the fly based on environment variables that are passed to the SRM server on execution of the recovery plan then copy to the VM using the powercli cmdlet copy-vmguestfile (again avoiding the requirement for networking and using VIX).

-alex

0 Kudos
spseabra
Contributor
Contributor
Jump to solution

Thans Alex, that clears all my doubts.

Cheers,

0 Kudos