Setup Azure Compute Gallery for deploying custom VMs
    • 04 Jun 2024
    • 5 Minutes to read

    Setup Azure Compute Gallery for deploying custom VMs


    Article summary

    Azure Compute Gallery (formerly known as Shared Image Gallery) is a service that allows you to create and share custom Virtual Machine (VM) images in Azure and then deploy virtual machines based on those images this is the recommended path for utilizing virtual machines in Azure as it enables you to have completely custom images rather than always starting from a default marketplace image.

    When using Azure for virtualization in Skillable Studio, VMs presented to learners or candidates are deployed into an Azure region based on VM images that live within an Azure Compute Gallery. VM images utilized in this way can be replicated to multiple regions so that Skillable can geolocate the lab user and launch the VM in the supported Azure region that is physically closest to the lab user - improving overall user connectivity & experience.

    Benefits of Azure Compute Gallery

    • Standardize VM images with pre-configured software, operating systems, and settings.

      • This ensures consistency and helps in maintaining a uniform environment across different deployments.

    • Reuse VM images to provision multiple VM instances.

      • This saves time and effort, as you don’t need to manually set up each VM from the beginning.

    • Expedite the VM provisioning process.

      • Instead of the user going through a setup process or figuring out complicated scripts, simply select a pre-configured VM image from your gallery and deploy it, reducing the time it takes to set up new environments.

    • Collaborate with other members of your organization or even with external parties.

      • Share VM images with others using different methods, such as RBAC, shared directly to a tenant or subscription, or shared through an AD group.

    • Optimize global performance with resource replicas in each region.

      • Replicate VM images to multiple regions for better connectivity for a global audience.

    Best Practices for using Azure Compute Gallery

    • Use Resource Locks at the gallery level to prevent images from accidental deletion.

    • Maintain separate galleries for development and production work.

    • Make backup copies of production images.

    • When a region option must be selected, it is recommended to select the same region for each to avoid issues during the process. Once the process is completed, the files needed to launch the VM in a different region can be replicated to all needed regions.

    Overview of Steps Required to Setup an Azure Compute Gallery Virtual Machine

    To get started using Azure Compute Galleries for Skillable labs, there are several required steps across the combination of Microsoft Azure and Skillable Studio. If any steps are missed or skipped, VMs created in later processes may not function as expected.

    Azure Setup

    Skillable Studio Setup

    Azure Setup

    Prior to using Azure Compute Gallery for virtual machines within Skillable Studio, the Azure tenant must be enabled for Skillable Cloud Slice and the Compute Gallery must exist within the subscription as outlined in the steps below.

    Skillable Cloud Slice Authorization

    If your subscription has already been configured for Skillable Cloud Slice, skip this step.

    If your subscription(s) have not been configured for Skillable Cloud Slice, setup Microsoft Azure for Cloud Slice.

    Create the Resource Group

    If you already have a resource group with a Compute Gallery in it, skip this step.

    To get started, the Compute Gallery and any surrounding resources (storage account, etc.) will need to live within a Resource Group.

    1. Go to the Azure portal and log in to your account.

    2. From the Azure Admin page, click Resource Groups on the left side navigation.

    3. Click +Add in the upper-left of the page.

      1. Subscription: Select the subscription that the resource group will bill to when resource are deployed.

      2. Resource Group: Name the resource group.

      3. Region: Select a region where the resource group will be deployed.

      4. Click Next: Review + Create.

      5. Click Create.

    Create a Compute Gallery

    If you already have a resource group with a Compute Gallery in it, skip this step.

    Next, a Compute Gallery must be created to store your Image Definitions & Image Versions.

    1. Go to the resource group you just created.

    2. Click +Add in the upper-left of the resource group section of the page.

    3. Search for Azure Compute Gallery and select it from the search results.

      1. Subscription: Select the subscription that the Compute Gallery will bill to when resource are deployed.

      2. Resource Group: Select the resource group where the Compute Gallery will be deployed to. This should default to the resource group selected in the previous step.

      3. Name: Name the Compute Gallery.

      4. Region: Select a region where the Compute Gallery will be deployed.

      5. Click Next: Review + Create.

      6. Click Create.

    Configure Lab Developer Permissions

    If all of your lab builders already have permissions to the Compute Gallery, skip this step.

    Finally, ensure anyone that may be building labs on your behalf and customizing the environments has Owner or Contributor access to the Compute Gallery. Complet

    1. In Azure, navigate to the Compute Gallery resource.

    2. Navigate to Access Control (IAM) > Role Assignments

    3. For each user you would like to be able to customize lab environments, complete the following:

      1. Search for the user (or a group the user belongs to)

      2. Ensure they have either Owner or Contributor access.

      3. If they already have access, consider this task complete.

      4. If they do not have Owner or Contributor, select +Add > Add Role Assignment and complete the Add Role Assignment wizard - providing the users with either Owner or Contributor access.

    Azure Check List

    At this point, you should have the configured within Azure:

    • Skillable Cloud-Slice-App authorization

    • Static Resource Group

    • Compute Gallery within Resource Group

    • Contributor or owner permissions for lab developers

    If you are missing any of these items, please go back to previous steps and complete any sections that were missed.

    Skillable Studio Setup

    Configure Subscription Pool & Subscription(s)

    Navigate to the subscription pool your labs will use, if you do not have one yet, create a Cloud Subscription Pool using the authentication information for your subscription in Azure.

    Once a Subscription Pool exists, any subscriptions within the pool need to be mapped to their appropriate Compute Gallery where image definitions are stored. To map the a subscription to a Compute Gallery:

    1. Navigate to the cloud subscription pool in Skillable Studio.

    2. For each subscription, click Edit.

    3. Click the Storage tab of the Edit Cloud Subscription dialog.

    4. On the Storage tab, fill in only the fields below:

      • Image Library Name: The name of the compute gallery resource.

      • Image Library Resource Group: The name of the resource group the compute gallery lives in.

        If your subscription pool has multiple subscriptions, remember to complete this process for each subscription. Each subscription will need to have it’s own compute gallery with the appropriate image definition and version, Skillable Studio currently does not support using a single Compute Gallery across multiple subscriptions.

    Next Steps


    Was this article helpful?

    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.