Applies to: ✔️ Linux VMs ✔️ Windows VMs ✔️ Flexible scale sets ✔️ Uniform scale sets

Azure Compute Gallery now includes the existing Shared Image Gallery service and the new VM Applications features and capabilities.

An Azure Compute Gallery helps you build structure and organization effectually your Azure resources, similar images and applications. An Azure Compute Gallery provides:

  • Global replication.
  • Versioning and grouping of resources for easier management.
  • Highly available resources with Zone Redundant Storage (ZRS) accounts in regions that support Availability Zones. ZRS offers amend resilience confronting zonal failures.
  • Premium storage support (Premium_LRS).
  • Sharing across subscriptions, and even between Active Directory (Advertizing) tenants, using Azure RBAC.
  • Scaling your deployments with resource replicas in each region.

With a gallery, you can share your resources to unlike users, service principals, or AD groups within your system. Resources can be replicated to multiple regions, for quicker scaling of your deployments.

For more information about storing applications in an Azure Compute Gallery, meet VM Applications

Image direction

An prototype is a re-create of either a total VM (including any attached information disks) or only the OS disk, depending on how it is created. When y'all create a VM from the image, a copy of the VHDs in the image are used to create the disks for the new VM. The image remains in storage and can be used over and over once again to create new VMs.

If yous have a large number of images that yous need to maintain, and would like to make them available throughout your company, you can use an Azure Compute Gallery as a repository.

When y'all utilise a gallery to store images, multiple resource types are created:

Resource Description
Image source This is a resource that can be used to create an image version in a gallery. An paradigm source can be an existing Azure VM that is either generalized or specialized, a managed image, a snapshot, a VHD or an image version in another gallery.
Gallery Like the Azure Marketplace, a gallery is a repository for managing and sharing images and other resources, but you command who has access.
Paradigm definition Image definitions are created within a gallery and they carry information near the image and any requirements for using it to create VMs. This includes whether the epitome is Windows or Linux, release notes, and minimum and maximum memory requirements. Information technology is a definition of a blazon of image.
Paradigm version An image version is what yous use to create a VM when using a gallery. You tin have multiple versions of an paradigm every bit needed for your surround. Like a managed image, when you use an image version to create a VM, the epitome version is used to create new disks for the VM. Image versions can exist used multiple times.

Graphic showing how you can have multiple versions of an image in your gallery

Image definitions

Image definitions are a logical group for versions of an image. The image definition holds information nigh why the image was created, what OS it is for, and other information about using the prototype. An image definition is like a plan for all of the details around creating a specific epitome. You don't deploy a VM from an paradigm definition, but from the image versions created from the definition.

There are three parameters for each image definition that are used in combination - Publisher, Offering and SKU. These are used to observe a specific prototype definition. Yous can have epitome versions that share one or ii, but not all iii values. For example, here are iii image definitions and their values:

Paradigm Definition Publisher Offer Sku
myImage1 Contoso Finance Backend
myImage2 Contoso Finance Frontend
myImage3 Testing Finance Frontend

All three of these have unique sets of values. The format is similar to how you can currently specify publisher, offering, and SKU for Azure Marketplace images in Azure PowerShell to go the latest version of a Marketplace image. Each image definition needs to have a unique set of these values.

The following parameters decide which types of epitome versions they can contain:

  • Operating system state - You can prepare the Bone country to generalized or specialized. This field is required.
  • Operating system - can be either Windows or Linux. This field is required.
  • Hyper-V generation - specify whether the image was created from a generation ane or generation 2 Hyper-V VHD. Default is generation 1.

The following are other parameters that can be assault your image definition so that you lot can more easily runway your resources:

  • Description - utilise description to requite more than detailed information on why the epitome definition exists. For instance, you lot might have an image definition for your front-end server that has the awarding pre-installed.
  • Eula - can exist used to point to an end-user license agreement specific to the image definition.
  • Privacy Argument and Release notes - store release notes and privacy statements in Azure storage and provide a URI for accessing them as part of the image definition.
  • Finish-of-life date - found a default end-of-life dates for all image versions in the prototype definition. End-of-life dates are advisory; users will still be able to create VMs from images and versions past the end-of-life date.
  • Tag - you can add together tags when yous create your prototype definition. For more data about tags, meet Using tags to organize your resources
  • Minimum and maximum vCPU and memory recommendations - if your image has vCPU and memory recommendations, you can attach that information to your image definition.
  • Disallowed disk types - yous can provide information nigh the storage needs for your VM. For example, if the paradigm isn't suited for standard HDD disks, you add them to the disallow list.
  • Purchase plan data for Marketplace images - -PurchasePlanPublisher, -PurchasePlanName, and -PurchasePlanProduct. For more information most purchase program information, see Find images in the Azure Marketplace and Supply Azure Marketplace buy plan data when creating images.

Image versions

An image version is what you use to create a VM. You can have multiple versions of an image equally needed for your environment. When you use an image version to create a VM, the epitome version is used to create new disks for the VM. Image versions can be used multiple times.

The properties of an image version are:

  • Version number. This is used equally the name of the prototype version. It is always in the format: MajorVersion.MinorVersion.Patch. When you specify to use latest when creating a VM, the latest image is chosen based on the highest MajorVersion, then MinorVersion, and then Patch.
  • Source. The source can be a VM, managed disk, snapshot, managed image, or another paradigm version.
  • Exclude from latest. Yous can go on a version from beingness used as the latest image version.
  • Finish of life date. Indicate the terminate-of-life date for the epitome version. End-of-life dates are informational; users will however be able to create VMs from versions past the end-of-life date.

Generalized and specialized images

There are ii operating system states supported by Azure Compute Gallery. Typically images require that the VM used to create the epitome has been generalized earlier taking the image. Generalizing is a process that removes automobile and user specific information from the VM. For Windows, the Sysprep tool is used. For Linux, you lot can utilize waagent -deprovision or -deprovision+user parameters.

Specialized VMs have not been through a process to remove automobile specific data and accounts. Also, VMs created from specialized images practise not have an osProfile associated with them. This ways that specialized images will accept some limitations in addition to some benefits.

  • VMs and scale sets created from specialized images tin exist up and running quicker. Because they are created from a source that has already been through outset boot, VMs created from these images kick faster.
  • Accounts that could be used to log into the VM can also be used on any VM created using the specialized prototype that is created from that VM.
  • VMs will take the Computer name of the VM the image was taken from. Yous should change the reckoner name to avert collisions.
  • The osProfile is how some sensitive information is passed to the VM, using secrets. This may cause problems using KeyVault, WinRM and other functionality that uses secrets in the osProfile. In some cases, you tin use managed service identities (MSI) to piece of work effectually these limitations.

Regional Back up

All public regions can be target regions, merely certain regions require that customers go through a request process in order to proceeds access. To asking that a subscription is added to the allowlist for a region such every bit Australia Central or Australia Central 2, submit an access request

Limits

There are limits, per subscription, for deploying resource using Azure Compute Galleries:

  • 100 galleries, per subscription, per region
  • 1,000 paradigm definitions, per subscription, per region
  • 10,000 prototype versions, per subscription, per region
  • 10 prototype version replicas, per subscription, per region
  • Whatever deejay attached to the image must be less than or equal to 1TB in size

For more information, see Bank check resource usage against limits for examples on how to check your electric current usage.

Scaling

Azure Compute Gallery allows you to specify the number of replicas you want Azure to keep of the images. This helps in multi-VM deployment scenarios every bit the VM deployments tin exist spread to unlike replicas reducing the run a risk of example creation processing being throttled due to overloading of a single replica.

With Azure Compute Gallery, you lot can at present deploy up to a ane,000 VM instances in a virtual machine scale ready (up from 600 with managed images). Image replicas provide for ameliorate deployment performance, reliability and consistency.  You can set up a different replica count in each target region, based on the scale needs for the region. Since each replica is a deep copy of your image, this helps calibration your deployments linearly with each extra replica. While nosotros understand no two images or regions are the aforementioned, hither's our full general guideline on how to utilise replicas in a region:

  • For non-Virtual Car Scale Set deployments - For every twenty VMs that you create concurrently, nosotros recommend you keep 1 replica. For example, if y'all are creating 120 VMs concurrently using the same image in a region, we suggest you keep at to the lowest degree half dozen replicas of your image.
  • For Virtual Machine Scale Set deployments - For each calibration set you create meantime, we recommend you keep one replica.

We always recommend y'all to overprovision the number of replicas due to factors similar paradigm size, content and OS type.

Graphic showing how you can scale images

Make your images highly available

Azure Zone Redundant Storage (ZRS) provides resilience against an Availability Zone failure in the region. With the full general availability of Azure Compute Gallery, you can choose to store your images in ZRS accounts in regions with Availability Zones.

You can also choose the business relationship type for each of the target regions. The default storage account type is Standard_LRS, but you can choose Standard_ZRS for regions with Availability Zones. For more data on regional availability of ZRS, run into Data redundancy.

Graphic showing ZRS

Replication

Azure Compute Gallery also allows you to replicate your images to other Azure regions automatically. Each paradigm version can be replicated to dissimilar regions depending on what makes sense for your system. I example is to ever replicate the latest image in multi-regions while all older versions are merely bachelor in 1 region. This tin assist salvage on storage costs for image versions.

The regions an prototype version is replicated to can exist updated after cosmos time. The time it takes to replicate to different regions depends on the amount of data existence copied and the number of regions the version is replicated to. This can take a few hours in some cases. While the replication is happening, y'all can view the status of replication per region. In one case the image replication is complete in a region, you can then deploy a VM or scale-set using that image version in the region.

Graphic showing how you can replicate images

Access

Every bit the Azure Compute Gallery, Epitome Definition, and Image version are all resources, they can be shared using the born native Azure RBAC controls. Using Azure RBAC you lot tin share these resources to other users, service principals, and groups. You tin even share admission to individuals outside of the tenant they were created within. Once a user has access to the epitome version, they tin deploy a VM or a Virtual Machine Scale Set. Here is the sharing matrix that helps understand what the user gets access to:

Shared with User Azure Compute Gallery Image Definition Image version
Azure Compute Gallery Yep Yeah Yes
Prototype Definition No Yes Yes

We recommend sharing at the Gallery level for the best experience. We exercise not recommend sharing individual image versions. For more information about Azure RBAC, see Assign Azure roles.

Images can also be shared, at scale, even beyond tenants using a multi-tenant app registration. For more information most sharing images across tenants, see "Share gallery VM images beyond Azure tenants" using the Azure CLI or PowerShell.

Billing

There is no actress charge for using the Azure Compute Gallery service. Y'all will exist charged for the post-obit resources:

  • Storage costs of storing each replica. The storage cost is charged every bit a snapshot and is based on the occupied size of the paradigm version, the number of replicas of the prototype version and the number of regions the version is replicated to.
  • Network egress charges for replication of the beginning epitome version from the source region to the replicated regions. Subsequent replicas are handled within the region, so there are no additional charges.

For example, let'due south say y'all have an image of a 127 GB Os deejay, that only occupies 10GB of storage, and one empty 32 GB information deejay. The occupied size of each image would only exist 10 GB. The image is replicated to 3 regions and each region has two replicas. There will be six total snapshots, each using 10GB. You will be charged the storage toll for each snapshot based on the occupied size of ten GB. You will pay network egress charges for the showtime replica to exist copied to the additional two regions. For more information on the pricing of snapshots in each region, see Managed disks pricing. For more data on network egress, encounter Bandwidth pricing.

Updating resource

Once created, you can make some changes to the gallery resources. These are limited to:

Azure Compute Gallery:

  • Description

Image definition:

  • Recommended vCPUs
  • Recommended memory
  • Description
  • End of life date

Image version:

  • Regional replica count
  • Target regions
  • Exclude from latest
  • End of life engagement

SDK support

The following SDKs support creating Azure Compute Galleries:

  • .Net
  • Java
  • Node.js
  • Python
  • Go

Templates

You can create Azure Compute Gallery resources using templates. At that place are several Azure Quickstart Templates available:

  • Create a gallery
  • Create an image definition in a gallery
  • Create an paradigm version in a gallery

Frequently asked questions

  • How can I list all the Azure Compute Gallery resource across subscriptions?
  • Tin I move my existing image to an Azure Compute Gallery?
  • Can I create an prototype version from a specialized disk?
  • Tin I movement the Azure Compute Gallery resource to a different subscription after information technology has been created?
  • Tin can I replicate my image versions across clouds such as Azure Prc 21Vianet, Azure Frg, or Azure Authorities Cloud?
  • Can I replicate my image versions across subscriptions?
  • Can I share prototype versions beyond Azure Advertising tenants?
  • How long does it take to replicate image versions across the target regions?
  • What is the deviation between source region and target region?
  • How do I specify the source region while creating the image version?
  • How do I specify the number of image version replicas to be created in each region?
  • Can I create the gallery in a different location than the one for the image definition and image version?
  • What are the charges for using an Azure Compute Gallery?
  • What API version should I use when creating images?
  • What API version should I utilise to create a VM or Virtual Automobile Scale Ready out of the image version?
  • Can I update my Virtual Machine Scale Set created using managed prototype to use Azure Compute Gallery images?

To list all the Azure Compute Gallery resources across subscriptions that you accept access to on the Azure portal, follow the steps below:

  1. Open the Azure portal.
  2. Scroll down the folio and select All resource.
  3. Select all the subscriptions under which you'd like to list all the resources.
  4. Look for resources of blazon Azure Compute Gallery, .

To list all the Azure Compute Gallery resources, across subscriptions that yous have permissions to, utilize the post-obit control in the Azure CLI:

                              az account list -otsv --query "[].id" | xargs -n one az sig list --subscription                          

For more information, come across List, update, and delete paradigm resources.

Yes. There are iii scenarios based on the types of images y'all may take.

Scenario 1: If you have a managed paradigm, then you can create an image definition and image version from it. For more than information, see Create and image definition and an paradigm version.

Scenario ii: If you have an unmanaged image, yous can create a managed image from information technology, and so create an paradigm definition and prototype version from it.

Scenario 3: If you take a VHD in your local file system, then y'all demand to upload the VHD to a managed image, then you can create an image definition and image version from it.

  • If the VHD is of a Windows VM, see Upload a VHD.
  • If the VHD is for a Linux VM, see Upload a VHD

Tin I create an paradigm version from a specialized disk?

Yes, tin can create a VM from a specialized image.

No, y'all can't movement the gallery image resource to a different subscription. Y'all tin replicate the image versions in the gallery to other regions or re-create an epitome from another gallery.

Can I replicate my image versions across clouds such as Azure Mainland china 21Vianet or Azure Germany or Azure Authorities Deject?

No, you cannot replicate image versions across clouds.

Can I replicate my image versions across subscriptions?

No, you may replicate the image versions across regions in a subscription and utilise information technology in other subscriptions through RBAC.

Aye, y'all tin utilize RBAC to share to individuals across tenants. Simply, to share at calibration, see "Share gallery images across Azure tenants" using PowerShell or CLI.

How long does information technology have to replicate paradigm versions across the target regions?

The image version replication fourth dimension is entirely dependent on the size of the image and the number of regions it is being replicated to. Withal, equally a best practice, it is recommended that you keep the image small, and the source and target regions close for best results. You lot can cheque the status of the replication using the -ReplicationStatus flag.

What is the difference betwixt source region and target region?

Source region is the region in which your image version will be created, and target regions are the regions in which a copy of your image version will be stored. For each paradigm version, you tin can only have 1 source region. Also, brand certain that you pass the source region location as one of the target regions when you create an paradigm version.

How do I specify the source region while creating the image version?

While creating an epitome version, you can use the --location tag in CLI and the -Location tag in PowerShell to specify the source region. Please ensure the managed image that you are using as the base of operations image to create the prototype version is in the same location as the location in which you lot intend to create the image version. Too, make sure that y'all pass the source region location equally one of the target regions when you create an paradigm version.

How practise I specify the number of image version replicas to exist created in each region?

In that location are two ways you tin can specify the number of image version replicas to be created in each region:

  1. The regional replica count which specifies the number of replicas you lot desire to create per region.
  2. The common replica count which is the default per region count in instance regional replica count is not specified.

To specify the regional replica count, pass the location forth with the number of replicas you want to create in that region: "South Central US=2".

If regional replica count is not specified with each location, so the default number of replicas will be the common replica count that you specified.

To specify the common replica count in CLI, use the --replica-count statement in the az sig epitome-version create command.

Yes, it is possible. Just, as a best practice, we encourage you to keep the resources group, gallery, image definition, and prototype version in the same location.

At that place are no charges for using an Azure Compute Gallery, except the storage charges for storing the image versions and network egress charges for replicating the image versions from source region to target regions.

What API version should I utilize when creating images?

To piece of work with galleries, image definitions, and prototype versions, we recommend you lot use API version 2018-06-01. Zone Redundant Storage (ZRS) requires version 2019-03-01 or afterward.

What API version should I use to create a VM or Virtual Machine Calibration Gear up out of the image version?

For VM and Virtual Machine Scale Set deployments using an image version, we recommend you use API version 2018-04-01 or higher.

Yes, you tin can update the calibration set image reference from a managed image to an Azure Compute Gallery paradigm, every bit long equally the OS type, Hyper-V generation, and the data disk layout matches between the images.

Troubleshoot

If yous have issues with performing any operations on the gallery resource, consult the list of common errors in the troubleshooting guide.

In add-on, you can post and tag your question with azure-virtual-machines-images at Q&A.

Next steps

Learn how to deploy images using the Azure Compute Gallery.