Create a virtual machine using your own image

This article describes how to publish a virtual machine (VM) image that you built on your premises.

Bring your image into Azure

Upload your VHD to an Azure Compute Gallery (formerly know as Shared Image Gallery).

  1. On the Azure portal, search for Azure Compute Galleries.
  2. Create or use an existing Azure Compute Gallery. We suggest you create a separate Azure Compute Gallery for images being published to the Marketplace.
  3. Create or use an existing image definition.
  4. Select Create a version.
  5. Choose the region and image version.
  6. If your VHD is not yet uploaded to Azure portal, choose Storage blobs (VHDs) as the Source, then Browse. You can create a storage account and storage container if you haven’t created one before. Upload your VHD.
  7. Select Review + create. Once validation finishes, select Create.


Publisher account must have “Owner” access to publish the Azure Compute Gallery Image. If required, follow the steps in the following section, Set the right permissions, to grant access.

Set the right permissions

If your Partner Center account is the owner of the subscription hosting Azure Compute Gallery, nothing further is needed for permissions.

If you only have read access to the subscription, use one of the following two options.

Option one – Ask the owner to grant owner permission

Steps for the owner to grant owner permission:

  1. Go to the Azure Compute Gallery.
  2. Select Access control (IAM) on the left panel.
  3. Select Add, then Add role assignment.
    The add role assignment window is shown.
  4. For Role, select Owner.
  5. For Assign access to, select User, group, or service principal.
  6. For Select, enter the Azure email of the person who will publish the image.
  7. Select Save.

Option Two – Run a command

Ask the owner to run either one of these commands (in either case, use the SusbscriptionId of the subscription where you created the Azure Compute Gallery).

az login
az provider register --namespace Microsoft.PartnerCenterIngestion --subscription {subscriptionId}
Select-AzSubscription -SubscriptionId {subscriptionId}
Register-AzResourceProvider -ProviderNamespace Microsoft.PartnerCenterIngestion


You don’t need to generate SAS URIs as you can now publish an Azure Compute Gallery Image on Partner Center, without using APIs.

If you are publishing using APIs, you would need to generate SAS URIs instead of using an Azure Compute Gallery, see How to generate a SAS URI for a VM image.

Next steps

  • Test your VM image to ensure it meets Azure Marketplace publishing requirements (optional).
  • If you don't want to test your VM image, sign in to Partner Center and publish the Azure Compute Gallery Image.
  • If you encountered difficulty creating your new Azure-based VHD, see VM FAQ for Azure Marketplace.