Hyper-V has a Quick Create feature, which allows users to create virtual machines from a VHD repository, using virtual hard disks with preinstalled Windows. We covered that earlier here at Win10.guru in this story: Hyper-V Online Gallery: Create a VHD repository
But, what if you want to start from scratch, with a new virtual machine in an empty VHD, and all settings preset? I use Hyper-V quite extensively to test Windows Insider builds, and create new virtual machines several times for each new build for multiple editions and languages. I wanted to access a VM repository, from where I can just pick a preset VM with an empty VHD, add an ISO to install the OS, and get the whole thing up and running faster and easier than using the New Virtual Machine Wizard for each new VM.
Most typical Insider VMs I use share the following settings:
– Generation 2
– 4 GB RAM
– 4 vCPU
– Default 127 GB VHD
– Secure Boot disabled
– External virtual switch
– Automatic Checkpoints disabled
– Production Checkpoints
Generation, RAM and the number of vCPUs might vary, based on the specific purpose for which the VM is intended. All other settings remain the same. I have a folder called Hyper-V Export\VM Store on an external HDD, where I have 12 preset virtual machines with empty virtual hard disks. I have created each VM in Hyper-V, then exported them to this storage folder on an external USB drive. These 12 VMs cover all my needs. They provide empty “shell” VMs for both Generation 1 and 2, both sets with 4, 6 or 8 GB RAM and 4 or 8 vCPU. I label these shells so that each one’s name tells me clearly its settings. Thus, for instance, VM 2G-4GB-8VCPU is a second generation VM with 4 GB of RAM and 8 vCPU:
Now it’s easy to create a new VM using the Hyper-V Import Virtual Machine feature. Importing any of these empty VMs is extremely fast, and finishes in seconds. Here, I import the 2G-4GB-8VCPU VM to my default VM location, in a new folder 19028, because this VM is my build 19028 test VM:
The only thing missing is to add install media (#1 in screenshot), in this case the build 19028 ISO, and to give VM a new name (#2) to replace the original (#3):
I basically do not use the New Virtual Machine Wizard anymore, and instead create my empty virtual machines in my VM Store folder. Because they cover all my VM needs, it is easy, and as I said, fast, to import one whenever I need a new VM. If you use a lot of VMs as I do, you may find this technique useful.
Author: Kari Finn
A former Windows Insider MVP, Kari started in computing in the mid 80’s writing code for VAX / VMS systems. Since then, he’s worked in a variety of IT positions. He specializes in Windows image capture, customization, repair and deployment as well as Hyper-V virtualization. Kari is a proud Team Member at number #1 Windows site TenForums.com.