defaultzlq

How to create a Hyper-V VM template without VMM

quickly deploy new VM’s from, without having to install and patch them each time.

  1. First, create a VM, install the operating system and patch it.

  2. On your template VM browse to C:WindowsSystem32Sysprep folder, and run Sysprep. Select the option to Generalize, and select Shutdown from the drop down menu.

  3. In the Hyper-V Manager export the VM, right click your template VM and select Export.

leave the original virtual machine template in Hyper-V Manager, as every few months after more patches have been released you will want to update it and create a new template.

how to deploy a new virtual machine from the template. It’s not just a case of selecting Import in the Hyper-V Manager, because the exported virtual machine and it’s disks still exist and when you import a VM you don’t have the option to rename them.

  1. Create new VM without the disks, select New then choose Virtual Machine, configure the machine, selecting the same generation as the template you created, but CPU, memory and networking settings can be different. When you get to the Connect Virtual Hard Disk option, select Attach a virtual hard disk later, click Next and Finish.

  2. Browse to your template VM folder (D:TemplatesWin 2012 R2 G2Virtual Hard Disks) and copy the VHDX file locally.

  3. Rename the copied VHDX to be the same as the virtual machine you have just created

  4. Cut and paste the disk into the default location on your Hyper-V server for your VHDX files.

  5. In Hyper-V Manager, right click the new VM you have deployed and select Settings, then select the SCSI Controller option (for Generation 1 virtual machines, select the IDE Controller 0). Highlight Hard Drive and click Add.

  6. Browse to D:Hyper-VVirtual Hard Disks and select the VHDX file you cut and pasted earlier in step 4. Click Apply.

  7. Now go to the Firmware option, select the hard drive you have just added and click Move Up, so it is the first boot entry. Click Apply. Click OK.