jmacdonagh
Contributor
Contributor

Cloning from a delta disk

Hello,

My project requires cloning multiple VMs from a single template (that is obviously powered off). The problem is, even if the templates have only 4GB disks, the cloning process takes quite a while.

Is it possible to clone delta disks, the way that Lab Manager does it? I understand the performance penalty, but luckily these VMs won't live for very long.

Thanks,

Johann

0 Kudos
1 Reply
jmacdonagh
Contributor
Contributor

So, I think I may have found a solution. Hopefully someone will find this if they do a Google search on the same subject.

To get quick clones of a template from VirtualCenter, we can:

1. Use the CreateVM method to create a new virtual machine. Set up the same hardware as the template, but point the disk file to the source disk's .vmdk file. The VM will be created very quickly, but both the source and the destination VM will be sharing the same disk image.

2. Before powering on the newly created VM, create a snapshot. This snapshot will be created very quickly. Now, any changes to the disk on the newly created VM will show up on the snapshot file, not the original disk.

3. Run CustomizeVM to get the same customization effects that CloneVM would have given you.

The only issue is that you can't power up the original template unless all VMs that were created from it are deleted first. For our situation, this works great.

I haven't 100% tested this yet, but I have set up 3 new VMs that were running concurrently and using the same disk image (together with a unique snapshot for each). No change made in one VM showed up in the others.

Super quick "clones" here I come!

0 Kudos