Create a Master VM image with Windows XP Professional, install VMware Tools and all applications that will be available on the Linked Clone VMs (including SAM registration and RGS Sender services). Ensure that the Master VM is set to automatically obtain an IP address via DHCP and that it is on the correct network that linked clones will be operating on.
Shutdown Master VM image.
Create Linked Clones using ghetto-esx-linked-clones.sh.
Create DHCP reservations on Windows DHCP server from the MAC address file that "ghetto-esx(i)-linked-clones.sh" creates using a custom .vbs DHCP IP reservation script.
Power on all newly created Linked Clones using VIClient if resources allow it.
Once powered on, a custom .vbs script utilizing WMI calls to request that the new Linked Clones join our Active Directory domain is executed from a Windows machine.
Once all VMs have been joined to the domain, the snap function of my-vmware-cmd.sh is run on these VMs. This is required to capture the pristine state of the system right after joining the domain.
At this point, the VMs are ready to be utilized by the available thinclients that have the HP SAM client installed on them. Changes that are made to the Linked Clones by users are discarded because the Linked Clones are refreshed every night using the revert function of my-vmware-cmd.sh that is scheduled with a crontab.
When an image needs to be rebuilt/upgraded, the Master VM image is cloned and worked on while the existing Linked Clones are online. Steps 1 through 7 are followed again on the new Master VM image and new Linked Clones are created with special attention towards disabling these new Linked Clones inside HP SAM.
The old inactive Linked Clones are disabled in HP SAM with old active Linked Clones left alone. The new Linked Clones are then enabled inside HP SAM. The old active Linked Clones will be manually disabled once the user logs out.
The purge function of my-vmware-cmd.sh is then used to destroy the old Linked Clones and all old Linked Clones are removed from HP SAM resources.
In Step 6, would you not have to sysprep all child VMs? Or would you recommend sysprep'ping the parent VM before "sealing" it?
Hi, sorry for the late reply. We do not employ sysprep here but have read a bit about how to implement it in an environment with physical PCs. The parent VM (the image that the link clones are based off of) is the one that should be sysprepp'd before running the linked clone script in step 3. Hope this helps.
Hi don't you run into networking and security issues if you don't use sysprep? I mean aren't all the child VMs identical following your procedure above? You say that you don't employ sysprep, so are you using some other tool or just leaving the child VMs as they are after they've been created?
Thanks
We're using some scripts/tools we've developed in house to do the 'magic' to customize all Linked Clones VM(s) so they're unique ... else they would cause conflicts and we would not be able to add them to AD.
And to add to this, when any system is joined to the domain, a new SID is generated for it.
VMware ESX 3.x and ESXi Scripts & Resources:
http://www.engr.ucsb.edu/~duonglt/vmware
Thank you both for you replies! If I'm going to do this in a workgroup environment (<5 virtual desktops) what is the recommended way to do the "magic"? To use sysprep? Do you perform the magic on the parent VM before making linked clones or after clones are created?
Also, in your lab environment you have setup the linked clones to be non-persistent by running a cronjob to revert any changes. I'm curious but how do you prevent the logged in users making any changes before this refresh? Do you somehow lock down the linked clones, so that all a user can do is access certain apps and their documents? Are you using anything fancy for this like Faronics Deep Freeze or something else?
Hi another question about your linked clones implementation.
I had a look through the ghetto-esx-linked-clones.sh to try and understand what it does to create the linked clones. Does it simply create new virtual machines without creating new disks and then point to the mastervm.vmdk? Or is the script doing something more complicated? The reason I'm asking is that I'm trying to understand how the child VMs are "linked clones". Are they "clones" because their .vmx files are the same (but different MAC and UUID)?
Are they "linked" because they use an existing vmdk of another vm?
This doc is definitely out of date but the concepts/definitions between a thick and linked clones still hold true and should help you understand the differences: http://www.vmware.com/support/ws5/doc/ws_clone_overview.html
Here's another great article on how Linked Clones work (this is how LC's work in VMware View VDI solution ) http://rodos.haywood.org/2008/12/storage-analysis-of-vmware-view.html
Forgot to mention, you can also find more scripts/resources located at:
http://engineering.ucsb.edu/~duonglt/vmware/