We recently shared the story of a client who we helped automate the process of testing images for publication to the Azure Marketplace, speeding time to market of its offerings. As we promised in that article, today we are sharing the next step in the process. While there is quite a bit of guidance available on how to publish a VHD (Virtual Hard Disk or unmanaged image) to the Azure Marketplace, the documentation on how to publish a managed image is lacking. So, to help we’ve outlined here the steps we took to help our client publish its managed images to the Azure Marketplace Shared Image Gallery.
Let’s explore some key terms before getting to the actual solution:
What is a Managed Image?
Before diving into the process, it may first be helpful to understand how Microsoft defines a managed image. Within the Azure Marketplace ecosystem, managed images are, “copies of either a full VM (including any attached data disks) or just the OS disk, depending on how you create the image. When you create a VM from the image, a copy of the VHDs in the image are used to create the disks for the new VM.”
While in the past developers would need to store the image themselves, Microsoft introduced Managed Images as a solution. Microsoft will keep the managed image in storage for developers where it can be used repeatedly to create new VMs. Managed Images benefit developers as they no longer need to manage, store or back-up the images they create. This allows developers to focus on creating and versioning their solution, rather than worrying about storage maintenance overhead.
What is the Shared Image Gallery?
For organizations that want to share their managed images, Microsoft has introduced the Shared Image Gallery. This repository makes it easy to update and share images while helping developers organize their images in the process. In addition, the Shared Image Gallery offers a few important benefits, namely:
- Sharing images globally. The Shared Image Gallery allows you to share your images across multiple regions, giving users quick access to the nearest data center.
- Versioning support. Developers can maintain multiple versions of an image, making each version easy to access and maintain.
- Scaling your deployments with image replicas in each region.
Publishing a Managed Image to the Shared Image Gallery
It’s easy to see why developers would want to take advantage of the benefits of managed images and the Shared Image Gallery. It’s very easy to publish a managed image to the Shared Image Gallery or create a new Shared Image Gallery image using manager image. However, the challenge arises when seeking to publish managed images to the Azure marketplace. Without a documented solution, we created our own. The steps include:
- Exporting the virtual hard disk from the managed image storage.
- Storing the virtual hard disk as a blob object in one of our storage account containers.
- Use the storage account to publish the image to the Azure Marketplace.
That is how we published managed images to the Azure Marketplace. Taken together with our earlier process that streamlined the process of moving this client’s images through the Azure Marketplace certification process, and the client was able to move its images from development to deployment in record time with automated, streamlined process.
Want to learn more about applying automation to your testing, development and deployment processes? Check out our recent articles on the topic:
- Shave Days off Azure Marketplace Publishing with Automated Testing
- Debunking Five Common Automated Testing Myths
- Automate HashiCorp Terraform Continuous Testing
- Four Recommendations to Boost Test Automation
Post Date: 12/08/2020