VMware Cloud Community
Stuarty1874
Contributor
Contributor

Cloning Virtual Machines Script

Guys, I'm looking to clone multiple Virtual Machines and was wondering if there was a script that will take care of this?

Reply
0 Kudos
3 Replies
wila
Immortal
Immortal

Hi,

Check this site:

http://www.vmware-land.com/Vmware_Links.html#Cloning

--

Wil

| Author of Vimalin. The virtual machine Backup app for VMware Fusion, VMware Workstation and Player |
| More info at vimalin.com | Twitter @wilva
Reply
0 Kudos
petedr
Virtuoso
Virtuoso

Another link you could check out

http://vmetc.com/2007/12/29/use-vmclonepl-script-to-clone-virtual-machines/

www.thevirtualheadline.com www.liquidwarelabs.com
Reply
0 Kudos
rossb2b
Hot Shot
Hot Shot

If you have the (VI) Perl Toolkit installed you can customize the following examples to clone VMs. The perl scipt is installed when you install the toolkit, just search for vmclone.pl

Making a clone without any customization::

perl vmclone.pl --username username --password mypassword --operation clone

--vmhost 192.168.111.2 --vmname DVM1 --vmname_destination DVM99

--url https://192.168.111.52/sdk/vimServiceIf datastore is given:

perl vmclone.pl --username username --password mypassword --operation clone

--vmhost 192.168.111.2 --vmname DVM1 --vmname_destination DVM99

--url https://192.168.111.52/sdk/vimService --datastore storage1Making a clone and customizing the VM

perl vmclone.pl --username myusername --password mypassword --operation clone

--vmhost 192.168.111.2 --vmname DVM1 --vmname_destination Clone_VM

--url https://192.168.111.52/sdk/vimService --customize_vm yes

--filename clone_vm.xml --schema clone_schema.xsdAll the parameters which are to customized are writtend in the xml file in this format:

Making a clone and customizing both guestos and VM

perl vmclone.pl --username myuser --password mypassword --operation clone

--vmhost 192.168.111.2 --vmname DVM1 --vmname_destination DVM99

--url https://192.168.111.52/sdk/vimService --customize_guest yes --customize_vm yes

--filename clone_vm.xml --schema clone_schema.xsd

Reply
0 Kudos