Proposed How to change subscription of VMs and storages

  • Tuesday, July 03, 2012 10:05 AM
     
     

    Hi,

    I have created two virtual machines to my new Windows Azure service. My company is Microsoft partners and member of Microsoft Cloud Essentials Pack. I somehow managed to register "Pay-As-You-Go" subscription to Windows Azure yesterday. Today when I checked from Account view I noticed that there is already 0,84€ to be charged from my credit card. After that I went back to https://www.microsoftcloudpartner.com and clicked Get Benefits. Now I was able to add "Windows Azure Cloud Essentials" subscription to my Windows Azure. Please see screenshot on below to clarify the situation:

    Now I would need to move those two virtual machines I have created from "Pay-As-You-Go" subscription to "Windows Azure Cloud Essentials" subscription. How this can be done? Then I will of course cancel the "Pay-As-You-Go" subscription.

    Best regards,

    Toni


    www.triuvare.fi

All Replies

  • Tuesday, July 03, 2012 10:07 AM
     
     

    I'm sorry, the screenshot went somehow corrupted while uploading it... The same picture can be found here: http://www.triuvare.fi/Azure.JPG.

    Br,

    Toni


    www.triuvare.fi


  • Tuesday, July 03, 2012 11:46 AM
     
     Proposed

    I'm somewhat new to this so pardon me if this sounds stupid or convoluted :).

    Essentially all your Virtual machines are stored as page blobs (vhd files) in blob storage. One thing you could possibly do is copy the blobs from the storage account in your old subscription (Pay-As-You-Go) to another storage account in your new subscription (Windows Azure Cloud Essentials) using the new "Asynchronous Copy Blob Operation" (http://msdn.microsoft.com/en-us/library/windowsazure/dd894037 and http://blogs.msdn.com/b/windowsazurestorage/archive/2012/06/12/introducing-asynchronous-cross-account-copy-blob.aspx) and the delete the Virtual machines from your old subscription. After you have done that, you could create a disk image using the new blob and then create a new virtual machine using that image.

    Hope this helps.

    Thanks

    Gaurav

    • Proposed As Answer by Vitor Tomaz Thursday, July 05, 2012 12:43 PM
    •  
  • Tuesday, July 03, 2012 11:57 AM
     
     

    Hi Gaurav,

    I'm also new in these Azure things so no problem... :)

    For some reason I cannot create new Storages or Virtual Machines to my new subscription (Windows Azure Cloud Essentials). I am able to create new only to the old subscription (Pay-As-You-Go).

    Best regards,

    Toni


    www.triuvare.fi

  • Tuesday, July 03, 2012 12:43 PM
     
     

    Hi,

    I agree that you can copy the blobs into the new account but not for the VMs.

    For Virtual Machines I suggest that you create an image of the VM following the image creation procedure and then, recreate the VM on another storage account using that image.

    I'm not 100% sure of some architecture details right now but I think that may be some constraints regarding vhd copy or VM creation from unprepared images.

    Creating VM images and recreating VM based on stored images "sounds" more safe.


    If you found this post useful, Please "Mark as Answer" or "Vote as Helpful". Best Regards.

  • Tuesday, July 03, 2012 12:45 PM
     
     

    Hi Toni,

    If I am not mistaken since Virtual Mchines is in preview mode currently you would need to activate this feature in your 2nd subscription. I just submitted the request for enabling it on my 2nd subscription and waiting for the request to process. I'm not sure as to why you're not able to create new storage accounts in your 2nd subscription.

    Hope this helps.

    Thanks

    Gaurav

  • Thursday, July 05, 2012 6:59 PM
     
     Proposed

    Inspired by this thread, I ended up writing a blog post describing one procedure for moving VMs from one subscription to another. You can find this blog post here: http://gauravmantri.com/2012/07/04/how-to-move-windows-azure-virtual-machines-from-one-subscription-to-another/

    Hope this helps.

    Thanks

    Gaurav

    • Proposed As Answer by Vitor Tomaz Friday, July 06, 2012 11:40 AM
    •  
  • Friday, July 06, 2012 11:32 AM
     
     

    Hi,

    Thanks a lot for your help.

    As I did not had anything special yet in those two virtual machines I had. I have deleted them created new ones to the new subscription.

    Best regards,

    Toni


    www.triuvare.fi

  • Friday, July 06, 2012 11:44 AM
     
     

    Please ensure that you delete the blobs containing the VHDs as well. Just deleting those VMs will not delete the blobs in the blob storage. The process is that you go under DISKS menu --> Delete Disks and then use a storage explorer to delete the blobs.

    Hope this helps.

    Thanks

    Gaurav

  • Friday, July 06, 2012 11:47 AM
     
     

    Hi Gaurav,

    Thanks, good point! For some reason I am not able to delete the disk as it Delete button is grayed out. Do you have any idea why I'm not able to delete it?

    Best regards,

    Toni


    www.triuvare.fi

  • Friday, July 06, 2012 12:56 PM
     
     

    That's weird. During past few days, I have deleted the disks a number of times. Is the disk selected in the UI?

  • Friday, July 06, 2012 1:04 PM
     
     

    Hi,

    Yes, it is, please see screenshot on below:

    Best regards,

    Toni


    www.triuvare.fi

  • Friday, July 06, 2012 1:09 PM
     
     

    Could this be because the disk is still attached to a VM (I see that there's some text in both rows under "ATTACHED TO" column) which in itself is weird because you have delete the VMs? The way I deleted was first detached disks from the VM (but those were data disks and not OS disks) and then came on this screen to delete those disks from the VM.

    Sorry for speculating.

  • Friday, July 06, 2012 1:18 PM
     
     

    Hi,

    Yes, there is the VM name still in the "ATTACHED TO" column. However I have already deleted this VM. Please see more clear screenshots on below:

    Best regards,

    Toni


    www.triuvare.fi

  • Friday, July 06, 2012 1:29 PM
     
     

    Like I said, this is weird. Last resort would be to delete the blob container (it should be called vhds) in the storage account associated with the subscription from where you have deleted the VM. Since the blob holding the VHD has never-ending lease, you will not be able to delete the blob directly. But you could delete the blob container. However I don't know the implication of that here. I would recommend waiting out for a few hours and then trying deleting the disk again.

    Thanks

    Gaurav

  • Friday, July 06, 2012 2:06 PM
     
     

    Hi,

    Ok, thanks Gaurav. I will try again in few hours.

    Can I somehow access there where the VHDs are stored?

    Best regards,

    Toni


    www.triuvare.fi

  • Friday, July 06, 2012 2:10 PM
     
     

    You can use any storage explorer for browsing the contents of your storage account. My personal favorite is obviously Cloud Storage Studio (because I built it :) - Shameless product plug!!!). There's an old post from Azure Storage Team listing available storage explorers which you can read here: http://blogs.msdn.com/b/windowsazurestorage/archive/2010/04/17/windows-azure-storage-explorers.aspx

    Hope this helps.

    Thanks

    Gaurav

  • Friday, July 06, 2012 3:21 PM
     
     Proposed

    Hi Gaurav,

    Thanks for the tip. I have installed trial version of your software.

    I am able to open the problematic storage but not able to delete the Blob Container. I receive following error message:

    =========================================

    The remote server returned an error: (403) Forbidden.

    =========================================

    Error Details:
    Code: InsufficientAccountPermissions
    Message: The account being accessed does not have sufficient permissions to execute this operation.
    RequestId:27d75c15-7bd4-4986-ae42-189290ed3087
    Time:2012-07-06T15:19:59.7055896Z

     

    -----------------------------------------------------------------------

       at System.Net.HttpWebRequest.GetResponse()
       at ..(BlobContainer blobContainer, OperationPrecondition deleteBlobContainerOperationPreCondition, Int32 requestTimeout)

    --

    So for some reason it seems that I don't enough rights to delete it... This is funny since I'm the one who has originally created them. :)

    Best regards,

    Toni


    www.triuvare.fi

    • Proposed As Answer by Lancers Wednesday, August 15, 2012 3:56 AM
    •