Add Custom Images to Hyper-V Gallery
How to use Hyper-V's VM gallery and why modern alternatives like eryph genepool work better
The Hyper-V gallery provides a convenient way to access pre-built VM images directly from Hyper-V Manager. While useful for quick deployments, understanding both its capabilities and limitations helps you choose the right VM management strategy for your needs.
What is the Hyper-V Gallery?
The Hyper-V gallery is Microsoft's built-in collection of basic VM templates accessible through Hyper-V Manager. While called a "gallery," it offers only a limited selection of standard images rather than a true marketplace experience.
You can access it through the "Quick Create" option in Hyper-V Manager. The selection is quite basic:
- Windows 11 development environment
- Ubuntu (limited versions)
- A few other Linux distributions
- Windows Sandbox templates
It's nowhere near what you'd expect from a modern VM marketplace. The gallery automatically downloads and configures VMs with appropriate settings for your Hyper-V environment, which saves some setup time for basic scenarios.
Adding Custom Images to the Gallery
While Microsoft maintains the official gallery, you can extend it with custom images for organizational use. This gets technical quickly, but it's doable if you have specific standardization needs.
Your custom images need to be in VHD or VHDX format, properly generalized (sysprep for Windows, standard Linux prep), and optimized for Hyper-V with Integration Services installed.
Custom Gallery Requirements
You'll need to host your VHD files on accessible web storage and create JSON metadata files describing the images. This typically means running your own web server or using cloud storage with the right access policies.
The metadata structure looks like this:
{
"images": [
{
"name": "Custom Ubuntu Server",
"version": "22.04.3",
"locale": "en-US",
"architecture": "x64",
"checksum": {
"sha256": "abc123..."
},
"disk": {
"uri": "https://your-storage/ubuntu-server.vhdx",
"sizeInBytes": 2147483648
},
"logo": "https://your-storage/ubuntu-logo.png"
}
]
}
Implementation Process
Setting up custom gallery images involves three main phases:
Prepare Custom Images Build VMs with your standard configurations, install necessary software and apply security policies, then generalize the VMs (sysprep for Windows, standard Linux prep) and export as VHD/VHDX files.
Host Images Upload VHD files to accessible web storage, create JSON metadata file describing images, and host both files on internal web server or cloud storage.
Configure Gallery Source Modify Hyper-V Manager configuration (registry/group policy), add custom gallery URL to available sources, and test image availability through Quick Create.
Why Nobody Actually Uses Custom Gallery Images
Custom gallery images sound great in theory, but few teams bother with them in practice. The setup is complex - you need web servers, metadata files, registry modifications. Every security update means rebuilding and redistributing multi-gigabyte files.
The operational overhead often outweighs the benefits. You start with good intentions about standardizing VM images, but end up maintaining more infrastructure than you're actually using.
Recognizing this problem, we built a different solution for eryph - the genepool. Instead of fighting with custom gallery maintenance, you get access to professionally maintained base images plus the ability to extend them with your own configurations.
The eryph Genepool
eryph's genepool is essentially a modern gallery for Hyper-V VMs, but hosted in the cloud like Docker Hub. Like the Hyper-V gallery, it hosts complete VM templates (called "base catlets"), but with a much larger selection - dozens of different operating systems, versions, and variants instead of just the basic few that Microsoft provides.
Most importantly, you don't have to prepare, upload, or manage any of these base images yourself. They're already built, tested, and maintained by the eryph community. eryph-zero downloads them automatically when you need them.
The real advantage comes after you download a base catlet. Unlike static Hyper-V gallery images, eryph lets you extend and customize these base VMs using "genes" - reusable configuration pieces. You can take a base Ubuntu catlet and add nginx configuration, SSL certificates, monitoring setup, and your application stack by composing genes together.
Traditional Gallery vs. eryph Genepool
Compare maintaining a traditional custom Ubuntu image with eryph's composable method:
Custom Ubuntu Image
├── Ubuntu 22.04 base
├── Docker pre-installed
├── Nginx configured
├── SSL certificates
├── Monitoring agents
└── Your app (probably outdated)
version: "1.0"
name: web-server
parent: dbosoft/ubuntu-22.04/starter # Base catlet
fodder:
- source: gene:community/docker-ce # Docker installation
- source: gene:community/nginx-config # Nginx setup
- source: gene:myorg/ssl-certs # SSL configuration
- source: gene:myorg/monitoring # Monitoring setup
- source: gene:myorg/app-stack # Current app version
With eryph, you get modular updates - change the nginx configuration across all VMs by updating one gene. Teams can share proven configurations without duplicating entire VMs. Each gene has proper versioning, dependencies, and rollback capabilities. You share configuration recipes, not multi-gigabyte VM files.
Most importantly, configurations improve over time as teams contribute improvements. With gallery images, knowledge gets trapped in static files. With genes, knowledge evolves and spreads.
When to Use Each Option
The built-in Hyper-V gallery makes sense if you want to avoid third-party tools entirely and only need basic VM templates. It's simple, integrated into Windows, and requires no additional setup.
But if you need more than Microsoft's limited selection, or you want to build anything beyond basic VMs, the genepool provides a much better experience. You get access to dozens of professionally maintained base images plus the ability to compose them with reusable configuration pieces.
The custom gallery route? Skip it. The maintenance overhead isn't worth it when better alternatives exist.
Learn more about eryph's gene system at eryph.io/platform/genes or explore the public genepool at genepool.eryph.io.