VMware Cloud Community
daleallenc
Contributor
Contributor

Changing machine names of linked clones

The scenario: I work for a software company and need to deploy multiple VMs with Windows 2003 as the guest OS for sales demonstration purposes. I've been trying out the ghetto-esx-linked-clones.sh script for generating linked clones and like the way it quickly generates clones, but I do have some questions.

Is script supposed to change the machine name to the virtual machine name? If it is supposed to that, it's not working for me.

If the script is not supposed to change the machine name, are there any suggestions for making that happen through automation, like a post-installation script? I really do not want to have touch every VM to do that manually.

0 Kudos
3 Replies
lamw
Community Manager
Community Manager

It should be changing the VMs displayName to whatever you've provided as a naming convention. How are you executing the script and what params are you using? What are the names of the VMs you're seeing being assigned by the script?

I highly recommend posting questions/bugs on the actual VMTN doc, that way I'll get notified as I'm the author of the script Smiley Wink

=========================================================================

William Lam

VMware vExpert 2009

VMware ESX/ESXi scripts and resources at:

VMware Code Central - Scripts/Sample code for Developers and Administrators

VMware Developer Comuunity

Twitter: @lamw

If you find this information useful, please award points for "correct" or "helpful".

0 Kudos
daleallenc
Contributor
Contributor

The VM name is changed to what I've provided using the Default case. I'm executing the script from the ESX console without the use of any additional parameters.

For example:

./ghetto-esx-linked-clones.sh /vmfs/volumes/LocalStorage/MyWin2003/MyWin2003.vmx SalesDemo_ 1 5

And I'm getting five VMs named SalesDemo_1, SalesDemo_2, etc. However, the guest OS machine name is still MyWin2003. The creation of multiple VMs with the same machine name causes problems in a Windows Active Directory environment.

In case it matters, I'm using an underscore instead of a dash because I have to change a SQL Server instance name in the guest (with a post-installation script), to match the machine name, and SQL Server doesn't like dashes.

0 Kudos
lamw
Community Manager
Community Manager

ah 'guestOS' hostname .. yes you'll need create a script to update the actual hostname of the guest, especially before trying to join the domain. You can take a look at VMware VIX to help you update this and integrate with Linked Clones deployment script, VMware vCenter combats this by using Microsoft Sysprep when it does it's clones and this is available if you have vCenter and you can vSphere Linked Clones script: http://engineering.ucsb.edu/~duonglt/vmware/vGhettoLinkedClone.html to do so ... else you'll need to find your own way whether that's using VIX, WMI w/windows scripting, etc.

=========================================================================

William Lam

VMware vExpert 2009

VMware ESX/ESXi scripts and resources at:

VMware Code Central - Scripts/Sample code for Developers and Administrators

VMware Developer Comuunity

Twitter: @lamw

If you find this information useful, please award points for "correct" or "helpful".

0 Kudos