Reputation: 1811
I had a virtual machine in azure, after a while I stooped using it so I closed my account, everything was supposed to get deleted but now I need to work again in this machine so, I subscribed again and entered the portal.
As a nice surprise, my old virtual machine is still there but, its associated to my old account and it seems like I can't be able to activate it again.
Is there a way for me to activate my old virtual machine and associate it to my new account? or else, why is it still there?
thanks
UPTADE:
This is what I did to create a new virtual machine:
Then when I open my newly created virtual machine I get a blanked machine without the programs and files I had in the other one.
Upvotes: 0
Views: 132
Reputation: 136206
You get some time between account closure and when the data gets permanently deleted. I'm guessing you're somewhere between that duration.
Since the Virtual Machines are essentially page blobs stored in blob storage, you can certainly reuse them. However for that you would need to copy the files from your old storage account (from your old subscription) to new storage account (in your new subscription). But you don't have to download them to your computer and upload them as Simon suggested. Azure Blob Storage supports server side async copy between storage accounts
so you use that. It will be much faster. You can use AzCopy
tool to copy files from one storage account to another.
However I recommend that you do the copy now before your previous storage account gets deleted. Because if the account gets deleted, you won't be able to copy the blobs.
UPDATE
Try this syntax for copying VHDs from your old storage account to new storage account:
AzCopy "https://<oldaccountname>.blob.core.windows.net/<oldaccountcontainername .. usually vhds>/" "https://<newaccountname>.blob.core.windows.net/<newaccountcontainername .. again vhds>/" "<filenametocopy.extension" /SourceKey:<oldaccountkey> /DestKey:<newaccountkey> /BlobType:page /S
Upvotes: 2
Reputation: 306
If the underlying VM disk had something really valuable, try to see if the associated storage account still contains underlying vhds - if so you could try downloading it and then upload it as a OS disk using powershell to reuse
Upvotes: 0