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

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

An Azure Compute Gallery helps you build structure and system around your Azure resource, like 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 against zonal failures.
  • Premium storage support (Premium_LRS).
  • Sharing across subscriptions, and even between Agile Directory (AD) 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 arrangement. Resources tin can exist replicated to multiple regions, for quicker scaling of your deployments.

For more data virtually storing applications in an Azure Compute Gallery, see VM Applications

Image direction

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

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

When you use a gallery to store images, multiple resources types are created:

Resource Description
Image source This is a resource that can be used to create an image version in a gallery. An image 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 control who has access.
Epitome definition Image definitions are created within a gallery and they carry information about the image and whatever requirements for using it to create VMs. This includes whether the paradigm is Windows or Linux, release notes, and minimum and maximum retention requirements. It is a definition of a type of image.
Epitome version An image version is what y'all use to create a VM when using a gallery. You can have multiple versions of an image as needed for your environment. Like a managed image, when you apply 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.

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

Image definitions

Image definitions are a logical grouping for versions of an epitome. The image definition holds information nearly why the prototype was created, what OS information technology is for, and other information about using the image. An paradigm definition is like a plan for all of the details effectually creating a specific image. Yous 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 find a specific paradigm definition. You can have image versions that share 1 or two, simply not all iii values. For instance, here are three image definitions and their values:

Image 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 like to how you can currently specify publisher, offering, and SKU for Azure Market images in Azure PowerShell to get the latest version of a Marketplace image. Each image definition needs to have a unique set of these values.

The post-obit parameters decide which types of image versions they can incorporate:

  • Operating system state - Y'all tin can set the Os state to generalized or specialized. This field is required.
  • Operating system - can be either Windows or Linux. This field is required.
  • Hyper-Five generation - specify whether the image was created from a generation 1 or generation 2 Hyper-V VHD. Default is generation ane.

The following are other parameters that can be gear up on your image definition so that you tin can more than easily track your resources:

  • Description - utilize description to give more detailed information on why the image definition exists. For example, you might take an image definition for your front end-end server that has the awarding pre-installed.
  • Eula - tin can be used to indicate to an end-user license agreement specific to the paradigm definition.
  • Privacy Statement and Release notes - shop release notes and privacy statements in Azure storage and provide a URI for accessing them as part of the image definition.
  • Stop-of-life date - establish a default end-of-life dates for all image versions in the image definition. End-of-life dates are advisory; users will still be able to create VMs from images and versions past the end-of-life engagement.
  • Tag - you tin add tags when you create your image definition. For more information nearly tags, encounter Using tags to organize your resources
  • Minimum and maximum vCPU and retentivity recommendations - if your image has vCPU and memory recommendations, you lot can attach that information to your image definition.
  • Disallowed disk types - you tin provide data well-nigh the storage needs for your VM. For example, if the image isn't suited for standard HDD disks, y'all add together them to the disallow listing.
  • Purchase plan information for Marketplace images - -PurchasePlanPublisher, -PurchasePlanName, and -PurchasePlanProduct. For more than information almost purchase plan data, see Detect images in the Azure Market place and Supply Azure Market place purchase programme information when creating images.

Epitome versions

An epitome version is what you lot use to create a VM. Y'all tin have multiple versions of an image as needed for your environment. When you lot use an image version to create a VM, the paradigm 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 as the name of the image version. It is e'er in the format: MajorVersion.MinorVersion.Patch. When you lot specify to use latest when creating a VM, the latest image is called based on the highest MajorVersion, then MinorVersion, then Patch.
  • Source. The source tin be a VM, managed disk, snapshot, managed image, or some other image version.
  • Exclude from latest. You can go on a version from beingness used as the latest epitome version.
  • End of life date. Bespeak the terminate-of-life date for the epitome version. End-of-life dates are informational; users will still be able to create VMs from versions past the end-of-life appointment.

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 image has been generalized before taking the image. Generalizing is a process that removes machine and user specific information from the VM. For Windows, the Sysprep tool is used. For Linux, you can apply waagent -deprovision or -deprovision+user parameters.

Specialized VMs have non been through a procedure to remove machine specific information and accounts. Also, VMs created from specialized images do not have an osProfile associated with them. This ways that specialized images will take some limitations in improver to some benefits.

  • VMs and scale sets created from specialized images can be upward and running quicker. Because they are created from a source that has already been through first kick, VMs created from these images boot faster.
  • Accounts that could be used to log into the VM can as well be used on any VM created using the specialized epitome that is created from that VM.
  • VMs will have the Computer name of the VM the image was taken from. You lot should change the computer proper noun to avoid collisions.
  • The osProfile is how some sensitive information is passed to the VM, using secrets. This may cause bug using KeyVault, WinRM and other functionality that uses secrets in the osProfile. In some cases, you can use managed service identities (MSI) to piece of work around these limitations.

Regional Support

All public regions tin can be target regions, but certain regions require that customers go through a asking process in club to gain access. To request that a subscription is added to the allowlist for a region such as Australia Central or Australia Central 2, submit an access asking

Limits

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

  • 100 galleries, per subscription, per region
  • one,000 image definitions, per subscription, per region
  • ten,000 paradigm versions, per subscription, per region
  • x paradigm version replicas, per subscription, per region
  • Any deejay attached to the paradigm must exist less than or equal to 1TB in size

For more information, run across Check resource usage confronting limits for examples on how to bank check your electric current usage.

Scaling

Azure Compute Gallery allows y'all to specify the number of replicas you want Azure to keep of the images. This helps in multi-VM deployment scenarios as the VM deployments can be spread to unlike replicas reducing the chance of instance creation processing existence throttled due to overloading of a single replica.

With Azure Compute Gallery, y'all can now deploy upwards to a 1,000 VM instances in a virtual machine scale set (upwardly from 600 with managed images). Image replicas provide for better deployment operation, reliability and consistency.  Y'all can set a different replica count in each target region, based on the scale needs for the region. Since each replica is a deep re-create of your image, this helps scale your deployments linearly with each extra replica. While we understand no ii images or regions are the same, hither's our general guideline on how to use replicas in a region:

  • For not-Virtual Machine Scale Gear up deployments - For every xx VMs that you create concurrently, we recommend you keep 1 replica. For case, if y'all are creating 120 VMs meantime using the same paradigm in a region, we suggest you lot keep at least half dozen replicas of your image.
  • For Virtual Motorcar Scale Fix deployments - For each scale set you create concurrently, nosotros recommend you keep i replica.

We ever recommend you to overprovision the number of replicas due to factors like image size, content and Os blazon.

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 general availability of Azure Compute Gallery, you tin can choose to shop your images in ZRS accounts in regions with Availability Zones.

You tin can also cull the account blazon for each of the target regions. The default storage account type is Standard_LRS, merely you can cull Standard_ZRS for regions with Availability Zones. For more information on regional availability of ZRS, see Data redundancy.

Graphic showing ZRS

Replication

Azure Compute Gallery also allows you to replicate your images to other Azure regions automatically. Each image version can exist replicated to different regions depending on what makes sense for your organization. Ane example is to always replicate the latest image in multi-regions while all older versions are only available in i region. This tin aid relieve on storage costs for image versions.

The regions an prototype version is replicated to tin can be updated after creation fourth dimension. The time it takes to replicate to different regions depends on the amount of information existence copied and the number of regions the version is replicated to. This can accept a few hours in some cases. While the replication is happening, you can view the condition of replication per region. Once the prototype replication is consummate in a region, you lot can and so deploy a VM or scale-prepare using that paradigm version in the region.

Graphic showing how you can replicate images

Admission

As the Azure Compute Gallery, Image Definition, and Image version are all resources, they tin can be shared using the born native Azure RBAC controls. Using Azure RBAC yous can share these resources to other users, service principals, and groups. Yous tin fifty-fifty share access to individuals outside of the tenant they were created within. One time a user has access to the epitome version, they tin deploy a VM or a Virtual Automobile Scale Fix. Here is the sharing matrix that helps understand what the user gets admission to:

Shared with User Azure Compute Gallery Paradigm Definition Image version
Azure Compute Gallery Yes Yes Aye
Image Definition No Yes Yes

We recommend sharing at the Gallery level for the best feel. We do not recommend sharing private image versions. For more information about Azure RBAC, encounter Assign Azure roles.

Images can as well exist shared, at scale, even beyond tenants using a multi-tenant app registration. For more information about sharing images beyond tenants, run across "Share gallery VM images across Azure tenants" using the Azure CLI or PowerShell.

Billing

There is no extra charge for using the Azure Compute Gallery service. You will be charged for the post-obit resource:

  • Storage costs of storing each replica. The storage price is charged as a snapshot and is based on the occupied size of the image 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 first prototype version from the source region to the replicated regions. Subsequent replicas are handled within the region, and then there are no additional charges.

For case, let'due south say you have an image of a 127 GB Bone disk, that merely occupies 10GB of storage, and i empty 32 GB information disk. The occupied size of each prototype would simply be 10 GB. The image is replicated to 3 regions and each region has two replicas. There will exist six full snapshots, each using 10GB. You volition be charged the storage cost for each snapshot based on the occupied size of 10 GB. Yous will pay network egress charges for the first replica to be copied to the additional two regions. For more than data on the pricing of snapshots in each region, see Managed disks pricing. For more information on network egress, see Bandwidth pricing.

Updating resources

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

Azure Compute Gallery:

  • Description

Image definition:

  • Recommended vCPUs
  • Recommended retention
  • Description
  • End of life engagement

Prototype version:

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

SDK support

The following SDKs support creating Azure Compute Galleries:

  • .Internet
  • Java
  • Node.js
  • Python
  • Go

Templates

Yous can create Azure Compute Gallery resource using templates. There 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 tin can I list all the Azure Compute Gallery resources beyond subscriptions?
  • Can I motility my existing image to an Azure Compute Gallery?
  • Can I create an image version from a specialized disk?
  • Tin can I movement the Azure Compute Gallery resource to a different subscription after it has been created?
  • Can I replicate my image versions across clouds such as Azure Cathay 21Vianet, Azure Germany, or Azure Government Cloud?
  • Can I replicate my epitome versions across subscriptions?
  • Can I share image versions across Azure Advertizement tenants?
  • How long does it take to replicate paradigm versions across the target regions?
  • What is the difference between source region and target region?
  • How exercise 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?
  • Tin 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 use to create a VM or Virtual Machine Scale Gear up out of the epitome version?
  • Tin can I update my Virtual Automobile Calibration Set created using managed image to utilise Azure Compute Gallery images?

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

  1. Open up the Azure portal.
  2. Curlicue down the page and select All resources.
  3. Select all the subscriptions nether which you'd like to list all the resources.
  4. Look for resources of type Azure Compute Gallery, .

To listing all the Azure Compute Gallery resources, beyond subscriptions that you lot have permissions to, use the following command in the Azure CLI:

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

For more information, run across List, update, and delete paradigm resource.

Yes. There are 3 scenarios based on the types of images you may take.

Scenario 1: If yous take a managed image, so you can create an image definition and image version from information technology. For more information, see Create and image definition and an image version.

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

Scenario three: If you accept a VHD in your local file system, then you demand to upload the VHD to a managed paradigm, so yous can create an image definition and paradigm version from information technology.

  • 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 can I create an image version from a specialized disk?

Yes, can create a VM from a specialized image.

No, you tin can't move the gallery image resources to a different subscription. Y'all can replicate the image versions in the gallery to other regions or copy an epitome from some other gallery.

Tin I replicate my image versions across clouds such as Azure China 21Vianet or Azure Germany or Azure Authorities Cloud?

No, y'all 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 utilize it in other subscriptions through RBAC.

Yes, you can use RBAC to share to individuals across tenants. But, to share at scale, see "Share gallery images across Azure tenants" using PowerShell or CLI.

How long does it take to replicate paradigm versions beyond the target regions?

The paradigm version replication time is entirely dependent on the size of the prototype and the number of regions it is beingness replicated to. However, as a all-time do, it is recommended that you keep the image pocket-size, and the source and target regions close for best results. Y'all can cheque the status of the replication using the -ReplicationStatus flag.

What is the divergence between source region and target region?

Source region is the region in which your prototype version volition exist created, and target regions are the regions in which a copy of your image version will be stored. For each image version, y'all can only have one source region. Likewise, brand certain that you lot pass the source region location as one of the target regions when y'all create an image version.

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

While creating an image version, you lot can utilize 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 epitome to create the paradigm version is in the same location as the location in which you lot intend to create the image version. Likewise, make certain that you lot pass the source region location as one of the target regions when you create an image version.

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

There are ii ways you tin 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 want to create per region.
  2. The mutual replica count which is the default per region count in case regional replica count is not specified.

To specify the regional replica count, laissez passer the location along with the number of replicas you want to create in that region: "South Central Usa=2".

If regional replica count is not specified with each location, then the default number of replicas volition 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 image-version create command.

Yes, information technology is possible. Just, as a best exercise, we encourage you to keep the resource group, gallery, prototype definition, and paradigm version in the same location.

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

What API version should I employ when creating images?

To work with galleries, paradigm definitions, and paradigm versions, we recommend y'all use API version 2018-06-01. Zone Redundant Storage (ZRS) requires version 2019-03-01 or later on.

What API version should I utilise to create a VM or Virtual Machine Scale Set out of the image version?

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

Yep, y'all tin update the scale set image reference from a managed image to an Azure Compute Gallery paradigm, as long as the OS type, Hyper-V generation, and the information disk layout matches between the images.

Troubleshoot

If you accept issues with performing any operations on the gallery resources, consult the list of common errors in the troubleshooting guide.

In addition, 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.