Azure Orphan Storage Account - azure

I mistakenly created a VM without linking it to an extant storage account. When I realized my mistake I deleted the VM and then sought to delete the storage account. I found the auto created storage account and attempted to remove the container. However even 24 hours later I get told that the container contains resources in use by the (now deleted) VM and so cannot be deleted.
Clearly there is some kind of dependency which is not apparent from the management portal which needs to be removed. I am looking for some advice on a powershell approach to investigating and resolving this issue.

You have to disassociate the disk with the VM image (VHD) before you can delete the blob or container.
You can do so from the Windows Azure management portal. Go to the VMs tab. Choose 'DISKS' from the top menu and remove it. If I remember well, it will also ask you whether you'd also like to delete the blob (VHD) from the storage account.

Related

Migrate production "classic" Azure Storage account to ARM

I'm aware I can now do this through the portal in the storage blade however the account I need to migrate is a production account. It's just blobs, tables and queues, no VMs.
I can stomach some downtime (say an hour or 2) but am unsure how long it would take to migrate approx 750GB, does anyone have experience with the migration and an idea on the time it takes based on a similar volume size?
I also assume once migrated all my storage keys will change so I will need to update all the references in my app settings.
For anyone else wondering about this what #4c74356b41 said appears to be true.
Thanks to this post and the PowerShell command, couldn't get the ARM template to dpeloy at least not from VS, I was able to create a classic storage account. Didn't think this was still possible!
I then kicked off a 50k files container copy from another storage account in the Azure Storage Explorer container into this new classic resource and then while that was running ran the full migration including commit and the file copy carried on regardless.
Final step was to move the new resource (file copy is still ongoing at this point) from the migrated resource group back into the same resource group as the original classic storage account.
Once the move was complete the file copy was still going smoothly and all the Keys remained unchanged so this does seem to be truly seamless.

How can I delete a leased blob in Microsoft Azure storage

I created a virtual machine in Azure and then deleted it.
However, the associated storage account still exists.
I can't delete the storage account because it contains a container with a blob in it that has an indefinite lease.
Nothing else is using this storage account.
How can I delete this blob?
You need to delete the disk objects that are associated with the abandoned vhd's. You can do this easily in either the classic or new portal. Once you dispose of these (along with associated leases), you should be able to get rid of your storage account
In the Classic portal (manage.windowsazure.com), you just visit Virtual Machines, then Disks. Select a disk to delete, and click the trash can at the bottom of the screen.
In the new portal (portal.azure.com) you'll find the disks under OS Disks (classic) :
From there, you can select and delete the disks from the VM's you deleted.
You can Use Azure Cloud Explorer tool on Codeplex Open the Storage Account Delete all files inside that container,
Then you Can Delete the Container and the Storage Account Easily
One solution is to delete the container, whether through a GUI like a cloud explorer, tooling like Azure Storage Powershell, or using the rest API with an Azure Storage Client Library.
You don't need the blob lease to delete the container, which would also delete any blobs present in the container.

Azure storage vhds

Could someone please help me understand this? I created Virtual Machine in Azure running Windows Server 2012. I noticed Azure created a storage account automatically. When I go inside that storage account, click Containers tab, and under vhds name it shows a name-name2-2014-12-05.vhd which is 127 GB and it always has recent Last modified date. What is that for? Is that my live backup image of my entire server deployment? If so where can I see how often it backs up?
When I go inside that storage account, click Containers tab, and under
vhds name it shows a name-name2-2014-12-05.vhd which is 127 GB and it
always has recent Last modified date. What is that for?
Virtual Machines in Azure are Stateful in nature. What that means is that any changes you make to the Virtual Machines like installing software, creating files etc. are persisted. The way Azure achieves this is by storing the Virtual Machine VHD as a page blob in Azure Storage. What you see as name-name2-2014-12-05.vhd is the VHD using which Azure launches your VM.
Is that my live backup image of my entire server deployment?
It is your VM and not the backup image. If by mistake you delete it (though Azure makes it real hard for you to delete it but its possible), your VM is gone. If you want, you can take a backup of this and store it in some other place. Search for Create Azure Virtual Machine Images and you will find ample resources.
If so where can I see how often it backs up?
By default Azure keeps 2 extra copies (a total of 3 including the main) of it in the data center and if you have enabled geo-redundancy, then Azure keeps additional 3 copies in a separate datacenter. However please keep in mind that it is not a backup. Any changes you make to your VM are replicated to all the copies. You would need to come up with your backup approach.
My recommendation would be to read more about Azure Virtual Machines. I'm sure if you search for it, you will get plentiful of resources.

Cannot delete a storage account

I cannot for the life of me delete a storage account created earlier today. The error i'm getting is: Storage account portalvhds09kzndhjw5ncq has container(s) which have an active image and/or disk artifacts. Ensure those artifacts are removed from the image repository before deleting this storage account.
So I've done what all the google search results suggest, which is go to the VM's "tab", click disks and remove any disks (there aren't any), I've also looked at the images page of the storage tab and there's nothing there either. I've got no storage containers, and no blobs.
So I really can't understand why i'm getting the above error and I was hoping someone here might be able to help me.
Happy to provide more information, but I don't know what else to give at this point!
Thanks,
Simon
The container was probably used to house a virtual machine hard drive as blob storage.
If you just deleted a virtual machine then give it a few minutes for the disks to be deleted. The last time I did it, it took Azure 10-15 minutes to delete the virtual machine and remove all leases.

Why does my custom VM Image not show up in Azure Create VM Interface?

I recently went through the hassle of creating and uploading a .VHD image containing a nice little Debian installation to my Azure Storage Account. It was created in Fixed Mode and uploaded as a PageBlob.
After a couple of attempts I was able to create an Image from my Blob, but I have no idea where to go from here.
Obviously, I want to create a VM instance from my image, but I can't figure out how to select my Image. I followed the NEW > Compute > Virtual Machine > From Gallery link, and there is a tab labeled My Images, but my image does not show up there.
Does anyone have an idea why?
EDIT: When I try to create a Disk from my Blob, I get the following Error:
The storage account does not support this operation. Please check the location of this storage account or create a new storage account and retry.
But the Disk is not associated with any storage account, or is it?
If you've uploaded your VHD you should be able to create a new disk using Virtual Machines > Disks > Create Disk this will prompt you for the url of the VHD you uploaded and allow you to specify the OS type and a name for the disk.
From there you can create a new Virtual Machine. New > Compute > Virtual Machine > From Gallery > My Disks
EDIT
I'm told by a colleague that some storage accounts do not support disks for VM's and a workaround can be to create a new VM using the portal (either from scratch or using a pre-made gallery image) this will create a storage account called something like portalvhdxxxxxxxx. You should then be able to upload your VHD to this storage account and create your disk from there.
I just ran into the same problem and this question helped me get around it. To provide more details, Azure VMs are not currently supported in certain data centers (such as North Central US). So if you create a storage account in an unsupported data center, you'll be able to upload vhd blobs and even create an image from it via the Azure portal. However that image will not show up under My Images when you attempt to spin up a VM from it.
It's pretty confusing but that seems to be what is happening. So if you want to store your vhd blobs in a storage account that isn't called portalvhdxxxxxx, just make sure your storage account is created in a data center that supports VMs. To figure out exactly what those data centers are, they are the data centers that you can choose when you quick create a VM directly on the portal.
I had the same issue, where I was unable to find the image in "Shared Images". However, I've learnt that the subscription under which I was trying to create the VM is different from the Subscription in which the Shared Image is present.
After, I have selected "Default Subscription filter" in portal settings to 'Select All', I was able to see the image in "Shared Images".
Note: Though it is a Shared Image, the Default Subscription should be set to 'Select All' when you are creating VMs across different subscriptions.

Resources