Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Create Azure VM from image created under different subscription

Is there a way to take a backup of a VM (image capture following the sysprep method) and then make that image in the gallery visible to someone under their subscription. For example, I create a VM, archive it off to the image gallery, then my colleague comes along and wants to create a VM from that image (the colleague cannot be a co-administrator on my subscription).

Alternatively, is there just a way to move the VM to a different subscription without archving it off and recreating?

Have found the following but this is a bit convoluted and requires purchase of third party software

http://gauravmantri.com/2012/07/04/how-to-move-windows-azure-virtual-machines-from-one-subscription-to-another/

Many thanks

Richard Clarke

like image 393
Richard Clarke - SSP Avatar asked May 16 '13 09:05

Richard Clarke - SSP


1 Answers

I don't think you can use images created in one subscription to create VMs in another subscription. You would need to copy those images into your subscription. Since images are nothing but Page Blobs in your storage account, you would need to copy them into a storage account in your target subscription, create images off of them and then deploy VMs. I'm not aware of any other way around it.

Regarding your comment about requires purchase of third party software, that's not really true. You don't have to buy 3rd party software. The main thing is to move your VHDs (which are page blobs) from one subscription to another. Do take a look at Step 1 - Copy Blobs in that blog post. It has a link to console application with source code that you can use to copy blob across. I used Cloud Storage Studio to explore my blob storage. You can use any other storage explorer to check the contents of blob storage (including Windows Azure portal). Cerebrata recently released a free blob storage explorer which you may want to check out: http://www.cerebrata.com/labs/azure-explorer.

Unfortunately that's the only way that I know of to create Azure VMs from images created under different subscriptions.

like image 64
Gaurav Mantri Avatar answered Sep 23 '22 13:09

Gaurav Mantri