Adding VM Depot Images to Azure Government

John Harvey (MSFT)

 

Azure provides many mechanisms to get the virtual machine of choice loaded into your subscription. The Azure Government gallery includes numerous images from Barracuda, Bitnami, CloudLink, Microsoft, Oracle, and SUSE.  The full list is here.  It is also pretty straightforward to upload your own, or copy one from an existing subscription in public Azure.  VM Depot is directly integrated into the Azure portal to make it easy to deploy one of the 1000’s of images developed by the open source community.  In this post, we will show you how to leverage one of the many images located in VM Depot and easily move it into your Azure Government subscription. 

If you are unfamiliar with VM Depot, it is a community managed repository of Linux and FreeBSD virtual images that integrates directly with Microsoft Azure.  The community is sponsored by Microsoft Open Technologies group which is focused on advancing Open Standards and Technologies on Microsoft’s platform.

To start off, you will need both and Azure subscription, and an Azure Government subscription.

Choose and deploy your image to Azure

When you log into your Azure subscription, at manage.windowsazure.com you navigate to Virtual Machines –>  Images. The images tab includes a “Browse VM Depot” option to select your VM of choice:


 
The popup includes a full list of images available, you can either peruse here or directly at VM Depot.  I have decided to deploy a version of Apache running on CentOS, published by Cognosys.

After it has completed the copy, your image is in the “Pending Registration” status.  You must register the VM as an image to show up in your Image Gallery.  To do this, simply select the disk image, and select 
  in the actions bar.

 

If you go to “My Images” to deploy an image through the Image Gallery it will now show up similar to the below:

 

 

Now for the fun part.  We have deployed and gotten this image ready in Public Azure, but how do we get it into Azure Government?  Well, the steps are quite easy.  First you must copy the VHD to Azure Government, and then you have to register the Virtual Hard Drive (VHD) as a valid image.  

Copying the image to Azure Government

AzCopy is an excellent tool for copying disk images between Azure Regions and\or Azure Government.  I consistently get very high bandwidth rates when going between Azure DCs and highly recommend it.  To move between 2 storage containers you will need the Source and Destination Access Key, which you can obtain from Storage Container

Azcopy /source:https://<YourContainer>.blob.core.windows.net/communityimages/ /dest:https://<your destination>.blob.core.usgovcloudapi.net/vhds/  /pattern:community-520-f2222140-29c5-410a-b8da-0c1d93023a4c-1.vhd /sourcekey:<SourceKey> /destkey:<DestKey>

 

Now you have to add the VHD as an image to your subscriptions Image Gallery with the following command,  for all the metadata I copied from the publishers content in VM Depot.

 

Add-AzureVMImage -ImageName “Apache-2-2-15-on-OpenLogic-CentOS-6-3”    -MediaLocation
“https://<Your Container>.blob.core.usgovcloudapi.net/vhds/community-520-f2222140-29c5-410a-b8da-0c1d93023a4c-1.vhd”
-OS “Linux”   -Label “Apache 2.2.15 on OpenLogic CentOS 6.3” -Eula https://vmdepot.msopentech.com/User/DefaultToU` -Description
“Cognosys brings you Apache/2.2.15 on OpenLogic CentOS 6.3. Port 80 should be open in load balancer to access the
server” -ImageFamily “Linux” -PublishedDate “2/26/2013”  ` -PrivacyUri ‘https://vmdepot.msopentech.com/User/DefaultToU’
-RecommendedVMSize “Medium”

 

After successfully deploying, you should now see the same apache image in your Image Gallery as shown below.

 

 

0 comments

Discussion is closed.

Feedback usabilla icon