In this tutorial we will deploy a VM from an existing VM VHDX.
Now let's deploy a VM based on template.
-
In the Hyper-V Manager screen Click Newà Virtual Machine
-
Select a name for the VM.
-
Select the amount of memory for the server or Use Dynamic Memory for this virtual machine.
-
Select the virtual switch for the virtual machine.
-
Do not attach a disk. Select attach a virtual hard disk later.
-
Press Finish
-
Right click the VM and select Settings.
-
Click IDE Controller 0 à Hard Drive à Add.
-
Click New.
-
Select the appropriate format. VHDX is the default format in Windows 2012/Hyper-V 2012.
-
Select Differencing and press Next.
-
Select the location and name for the new disk then press Next.
-
Select the location for the Template VHDX.
-
Press Finish.
-
Press OK.
-
Right Click on the VM and press Start, then Right Click the VM again and connect.
-
The virtual machine will start and will go thru a mini setup for the VM. Your VM will be up and running in less time that installing the OS from DVD.
-
By deploying the VM from Image your Lab will share a common set of binaries. You will save 10 – 12G for the OS deployment every time for every VM that share the template.
can I delete the template after deploy the new vm?
No,
this is not a template but a minimal shared base (the parent) and you have several limits.
1) if you use the same base for a few of vms the I/O and general performances go down because all the vms access to the common part
2) you cannot touch the base. if you make it you destroy all the vms differenced
3) you can use the differencing on a relation 1:1. If you want create a template of a server with three disk you must difference the first witj the first parent, the second with the second parent, the third with the third parent manually.
4) if you want update by automatic update you must update every vm differenced one to one.
if you want a real separate template create the base
exporting it
importing with the option to generate a full copy.
good work