How to Publish Managed Images to the Azure Marketplace

How to Publish Managed Images to the Azure Marketplace

By Flux7 Labs
December 9, 2020

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 processWhile 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 themselvesMicrosoft 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 benefitsnamely:  

  • 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. Its 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:  

  1. Exporting the virtual hard disk from the managed image storage 
  1. Storing the virtual hard disk as a blob object in one of our storage account containers. 
  1. 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:  

Written by Gaurav Rastogi, Mohit Kumar Sharma, Mukesh Sharma, Flux7 Labs

Flux7, an NTT DATA Company, is the only Sherpa on the DevOps journey that assesses, designs, and teaches while implementing a holistic solution for its enterprise customers, thus giving its clients the skills needed to manage and expand on the technology moving forward. Not a reseller or an MSP, Flux7 recommendations are 100% focused on customer requirements and creating the most efficient infrastructure possible that automates operations, streamlines and enhances development, and supports specific business goals.