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

Azure Shared Image Gallery

  • June 4, 2020
  • 6 min read
IT and Virtualization Consultant. Romain is specializing in Microsoft technologies such as Hyper-V, System Center, storage, networking, and MS Azure. He is a Microsoft MVP and MCSE in Server Infrastructure and Private Cloud.
IT and Virtualization Consultant. Romain is specializing in Microsoft technologies such as Hyper-V, System Center, storage, networking, and MS Azure. He is a Microsoft MVP and MCSE in Server Infrastructure and Private Cloud.


Azure shared image gallery is a feature that helps you to manage VM images and deploy them across the world. This service enables you to do versioning and grouping of images. Moreover, image stored in shared image gallery can be shared across subscriptions and even between Active Directory. In this topic, we will see how to leverage Azure shared image gallery.

Create a VM image

First, you need a VM image. To create this image, we need to deploy an Azure VM. To do so, open the marketplace and create an Azure VM with the operating system of your choice. In my example, I selected Windows Server 2019. As usual, fill the field with your settings such as the resource group, the VM name, region and so on.

Create a VM

Do not forget to specify the network configuration especially if you want to customize your image before the capture:

Specify the network configuration

Once the VM is created, connect to that VM to make the customization, the updates and so on.

Connect to that VM to make the customization

Once you have finished your customization you can run sysprep. Open a command prompt and run the following command:

C:\windows\system32\sysprep\sysprep.exe /oobe /shutdown /generalize /mode:VM

Now go back in the Azure Portal and open VM overview. Now you can capture your VM:

Azure Portal and open VM overview

Then provide name for the image. I selected also to delete virtual machine after the image is created.

Provide name for the image

Now, you have VM image and we can integrate it into Azure shared image gallery.

Azure shared image gallery

Create an Azure shared image gallery

To open the service, just type shared image gallery in the search bar in Azure Portal.

Search bar in Azure Portal

Now click on Create shared image gallery.

Create shared image gallery

Specify the name, the region and the resource group where belong this new shared image gallery.

Specify the name

Once the shared image gallery is created, you should retrieve it in the previous window:

Image gallery is created

Add image to azure shared gallery

Open the gallery and click on Add new image definition:

Add new image definition

Then specify a region, an operating system, a VM generation the state of the OS, a publisher an offer and a SKU.

Add new image definition

In version screen, first specify a version name. Then choose the source image that is the one we have captured previously from the Azure VM. You can specify an end of life date for the image and the target region. As you can see, you can easily distribute your VM image across Azure region.

Distribute your VM image across Azure region

In the next screen, you can specify publishing meta data and VM size recommendation.

Specify publishing meta data

It can take a while to distribute VM image across region. Once it is distributed, the image is available in the gallery.

The image is available in the gallery

Now you can click on Create VM button from the gallery. Then you get the same screen as usual when you want to create an Azure VM excepted in Image field. Now you can select the image from your gallery.

Select the image

Conclusion

As you have seen, the deployment and configuration of Azure Shared Galleries is easy. It can help you to manage your VM images and distribute them across Azure region. Thanks to this feature, you can have streamlined VMs in Azure.

Hey! Found Romain’s article helpful? Looking to deploy a new, easy-to-manage, and cost-effective hyperconverged infrastructure?
Alex Bykovskyi
Alex Bykovskyi StarWind Virtual HCI Appliance Product Manager
Well, we can help you with this one! Building a new hyperconverged environment is a breeze with StarWind Virtual HCI Appliance (VHCA). It’s a complete hyperconverged infrastructure solution that combines hypervisor (vSphere, Hyper-V, Proxmox, or our custom version of KVM), software-defined storage (StarWind VSAN), and streamlined management tools. Interested in diving deeper into VHCA’s capabilities and features? Book your StarWind Virtual HCI Appliance demo today!