Search
StarWind is a hyperconverged (HCI) vendor with focus on Enterprise ROBO, SMB & Edge

What is a Hyper-V Quick Create VM gallery & how to create one?

  • March 5, 2019
  • 13 min read
IT and Virtualization Consultant. Dmitriy is specializing in Microsoft technologies, with a focus on storage, networking, and IT infrastructure architecture.
IT and Virtualization Consultant. Dmitriy is specializing in Microsoft technologies, with a focus on storage, networking, and IT infrastructure architecture.

INTRODUCTION

Windows 10 Creator Update introduced Quick Create to Hyper-V, the feature allowing to create a custom VM from a Hyper-V Quick Create gallery image. It is a handy tool for testing new software or OS features which developers and guys in QA may enjoy a lot. This being said, I describe today how to create a VM template and add it to a gallery.

WHERE CAN I FIND THE FEATURE?

To start the wizard, go to the Actions menu and select Quick Create… there.

Actions menu and select Quick Create

Usually, you deploy a VM and install the guest OS from an ISO file. If you do not want to tinker with the image, you can just use the gallery. Let’s see how that can be done.

HYPER-V QUICK CRETE VM GALLERY IN A NUTSHELL

Hyper-V Quick Create VM gallery contains a virtual disk image (that’s actually why you do not need an ISO file to create a VM from the gallery). Quick Create allows using several galleries that is very nice.

To understand how to quick-create a VM gallery, let’s break the whole process into components:

  • Creating a VM image (*.iso or *.vhdx file). To make it highly available, save that image on the web server or a network share.
  • Creating the gallery source (a *.json file).
  • Including a gallery source to the VM Gallery UI.

Gallery elements

Here’re things that you should do:

  1. Create a JSON file with the image description. Alternatively, you can download it from the official website: https://go.microsoft.com/fwlink/?linkid=851584. You can add a custom VM description to it.
  2. Add that file to the gallery.

While creating a JSON file, specify the description of a VM that is to be included in the gallery.

Below, find a quick example of file contents.

 

You also need to get the file hash SHA256 for associated files. I used the following PowerShell cmdlet for that purpose:

 

«xxxx.yyy» stands there for the name and file path.

name and file path

Here’s how my JSON file looks like:

 

Apart from a JSON file, the gallery directory may contain the following components:

  • VHDx file
  • Logo
  • Thumbnail
  • Screenshot

Of course, it is not a must to include them all to the Hyper-V gallery directory. Here are some that I added. I used Microsoft’s logo today (hope, they don’t mind :)).

Hyper-V gallery directory

Specify the path to the Hyper-V VM directory by modifying the registry. In particular, you need to add changes to the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Virtualization key. Here’s a bunch of methods of how you can do that.

Setting values with PowerShell

 

Administrator

 

Just modify the registry!

 

Modifying registry is quite simple. Specify the path to the JSON file in the GalleryLocations. If this key doesn’t exist, just create it!

GalleryLocations

If you need to apply changes on several computers on one domain, apply group policies.

INSTALLING A VM FROM THE GALLERY

After starting the wizard, you can create a VM using any of existing images (there were 3 images while I was writing this article).

create a VM

 

Create Virtual Machine wizard in a nutshell. 1 – available VM images, 2 – brief VM and OS description, 3 – interface for setting VM name and NIC, 4 – ISO file location

 

change instalation source

While deploying a VM from the gallery, its image is saved locally and gets subsequently deployed.

VM created successfully

Here are some things that you should know about the default VM configuration:

  • Generation 2
  • RAM 2 GB
  • DRAM is enabled
  • 4 x vCPU
  • vNIC is connected to the virtual switch.

Once the VM is created, you can either connect it or modify its settings.

VM is created

If you need to create a VM using the same settings, the already downloaded image can be used.

In this way, with Quick Create in place, VM deployment becomes a matter of just a few clicks. But, if you still need to fine-tune the VM after its creation, you should better do the whole job manually.

CONCLUSION

Where can you use Quick Create? It seems useful for developers and QA because it saves them like tons of time needed for creating VMs with particular settings. Hope, soon it will be available for Windows Server. In this article, I described the feature quite briefly as nobody would probably like a long read on that thing. For more info, check these links:

https://blogs.technet.microsoft.com/virtualization/2017/11/08/create-your-custom-quick-create-vm-gallery/

https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/user-guide/custom-gallery

Hey! Found Dmitriy’s insights useful? Looking for a cost-effective, high-performance, and easy-to-use hyperconverged platform?
Taras Shved
Taras Shved StarWind HCI Appliance Product Manager
Look no further! StarWind HCI Appliance (HCA) is a plug-and-play solution that combines compute, storage, networking, and virtualization software into a single easy-to-use hyperconverged platform. It's designed to significantly trim your IT costs and save valuable time. Interested in learning more? Book your StarWind HCA demo now to see it in action!