Create a gallery for storing and sharing resources
An Azure Compute Gallery (formerly known as Shared Image Gallery) simplifies sharing resources, like images and application packages, across your organization.
The Azure Compute Gallery lets you share custom VM images and application packages with others in your organization, within or across regions, within a tenant. Choose what you want to share, which regions you want to make them available in, and who you want to share them with. You can create multiple galleries so that you can logically group resources.
The gallery is a top-level resource that can be shared in multiple ways:
|Specific people, groups, or service principals||Role-based access control (RBAC) lets you share resources to specific people, groups, or service principals on a granular level.|
|Subscriptions or tenants||Direct shared gallery (preview) lets you share to everyone in a subscription or tenant.|
|Everyone||Community gallery (preview) lets you share your entire gallery publicly, to all Azure users.|
Allowed characters for gallery name are uppercase (A-Z) and lowercase (a-z) letters, digits (0-9), dots (or periods)
., and underscores
_. The gallery name can't contain dashes
-. Gallery names must be unique within your subscription.
Create a private gallery
- Sign in to the Azure portal at https://portal.azure.com.
- Type Azure Compute Gallery in the search box and select Azure Compute Gallery in the results.
- In the Azure Compute Gallery page, click Add.
- On the Create Azure Compute Gallery page, select the correct subscription.
- In Resource group, select a resource group from the drop-down or select Create new and type a name for the new resource group.
- In Name, type a name for the name of the gallery.
- Select a Region from the drop-down.
- You can type a short description of the gallery, like My gallery for testing. and then click Review + create.
- After validation passes, select Create.
- When the deployment is finished, select Go to resource.
Create a direct shared gallery
Azure Compute Gallery – direct shared gallery is currently in PREVIEW and subject to the Preview Terms for Azure Compute Gallery.
During the preview, you need to create a new gallery, with the property
sharingProfile.permissions set to
Groups. When using the CLI to create a gallery, use the
--permissions groups parameter. You can't use an existing gallery, the property can't currently be updated.
You can't currently create a Flexible virtual machine scale set from an image shared to you by another tenant.
Sign in to the Azure portal at https://portal.azure.com.
Type Azure Compute Gallery in the search box and select Azure Compute Gallery in the results.
In the Azure Compute Gallery page, click Add.
On the Create Azure Compute Gallery page, select the correct subscription.
Complete all of the details on the page.
At the bottom of the page, select Next: Sharing method.
On the Sharing tab, select RBAC + share directly.
When you are done, select Review + create.
After validation passes, select Create.
When the deployment is finished, select Go to resource.
To start sharing the gallery with a subscription or tenant, see Share a gallery with a subscription or tenant.
To start sharing the gallery with a subscription or tenant, use see Share a gallery with a subscription or tenant.
Create a community gallery
A community gallery is shared publicly with everyone. To create a community gallery, you create the gallery first, then enable it for sharing. The name of public instance of your gallery will be the prefix you provide, plus a unique GUID.
During the preview, make sure that you create your gallery, image definitions, and image versions in the same region in order to share your gallery publicly.
Azure Compute Gallery – community galleries is currently in PREVIEW and subject to the Preview Terms for Azure Compute Gallery - community gallery.
To publish a community gallery, you need to register for the preview at https://aka.ms/communitygallery-preview. Creating VMs from the community gallery is open to all Azure users.
When creating an image to share with the community, you'll need to provide contact information. This information will be shown publicly, so be careful when providing:
- Community gallery prefix
- Publisher support email
- Publisher URL
- Legal agreement URL
Information from your image definitions will also be publicly available, like what you provide for Publisher, Offer, and SKU.
Only the owner of a subscription, or a user or service principal assigned to the
Compute Gallery Sharing Admin role at the subscription or gallery level, can enable a gallery to go public to the community. To assign a role to a user, group, service principal or managed identity, see Steps to assign an Azure role.
--public-name-prefix value is used to create a name for the public version of your gallery. The
--public-name-prefix will be the first part of the public name, and the last part will be a GUID, created by the platform, that is unique to your gallery.
location=westus galleryName=contosoGallery resourceGroup=myCGRG publisherUri=https://www.contoso.com publisherEmailemail@example.com eulaLink=https://www.contoso.com/eula prefix=ContosoImages az group create --name $resourceGroup --location $location az sig create \ --gallery-name $galleryName \ --permissions community \ --resource-group $resourceGroup \ --publisher-uri $publisherUri \ --publisher-email $publisherEmail \ --eula $eulaLink \ --public-name-prefix $prefix
The output of this command will give you the public name for your community gallery in the
sharingProfile section, under
To start sharing the gallery to all Azure users, see Share images using a community gallery.