Hyper-V Cloning a VM in 4.1.2

In NOS 4.1.2 we introduced an easy way to clone VMs from Powershell.  There's a couple of advantages of using our cmdlet:


  1. No need for SCVMM.  No more messing around with libraries and ODX!
  2. Since we have native access to the data, we can very quickly clone VMs
  3. Better space utilization.  Once again, since we have native access to the VMs we don't need to replicate everything, only keep track of the changes.  In VMware this is known as a VAAI clone

When I say very quickly, I mean QUICKLY.  I'm talking 100 VMs in 2 minutes.


Here's the command we used (pulled from the docs)


New-VMClone -VM vm_name -CloneNamePrefix  clone_name_prefix`
-CloneNameSuffixBegin clone_name_suffix_begin -NCopies n_copies`
-ComputerName computer_name -DestinationUncPath destination_unc_path -PowerOn`
-Credential prism_credential -MaxConcurrency max_concurrency

So as a test, I took a windows 2012 machine, and then ran:

New-VMClone -VM clone-base -CloneNamePrefix  clone -CloneNameSuffixBegin 1 -NCopies 100 -ComputerName cbms-1 -PowerOn -MaxConcurrency 10

It then popped up a window asking for my prism creds.  I logged in and off it went!  10 copies were made at a time, and after 2 minutes I had 100 VMs running!  Other advantage of this?  The VMs were perfectly deduped so all 100 VMs used up hardly any more then the space of a single windows install.

Next step?  Properly sysprep the VM and see how long it takes to get my VMs running at that point.  I'll even record it so keep an eye out here!