Managed Disks - Delete source blob? - azure

I have a Windows VM that was built on the old "classic" model which I would like to change to the ARM model. I have used the automated methods however this doesn't give me the control I desire (the names of all the components are messy).
I have deleted the original VM leaving only the VHD in the storage account.
I have created a Managed Disk (MD) using the VHD as the source blob.
I have created a VM using the MD
When I look at the MD in the Azure portal, it still references the "Source Blob" but i'm not sure if this means the MD is still reliant on the blob and storage account or if it's just legacy/reference info.
What I need to know is, can I delete the original storage account containing the VHD now that I have a MD?

Take a backup first and then delete the backup

Related

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 Orphan Storage Account

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.

How can I tell what is using a large VHD?

I am running a VM in Windows Azure. It has two disks attached to it (OS 40GB and DATA 60GB).
In addition to my two VHDs, the Storage has one more 40GB VHD named dmzvyyq2.jja20130312104458.vhd.
I would like to know where this VHD came from and what is using it. Surprisingly the 'LAST MODIFIED' date is yesterday so something must have updated it. I went through all options in the Portal but nothing seems to have this VHD attached.
Ultimately I would like to delete this VHD to save storage space and cost.
One possibility to find out this is by using Storage Analytics. If you have storage analytics enabled, you can view the contents of $logs blob container, download data for the data in question and check for all the activity on this particular blob. You can use a tool like Azure Management Studio from Cerebrata to view storage analytics data. However if you haven't enabled analytics on your storage account, it would be very tough to find out that information.

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.

Azure Storage & Snapshots

I have a VHD in a container which was mounted by an instance (a DotNetNuke accelerator). But now the instance is stopped so the VHD is not mounted anymore.
The problem is I can't rename this VHD with any UI client. "CloudBerry Explorer for Azure Blob Storage" shows an error when I try to rename it of
This operation is not permitted because the blob has snapshots.
I tried to list snapshots in VisualStudio but it only returns the blob's name...
I tried to mount the VHD in an instance and create a file and it works!?
I'm going crazy. :)
I've managed to remove blob which has snapshots by using Microsoft Azure Storage Explorer. Steps are:
You navigate to the blob in question
Right click -> Manage Snapshots
Delete all the snapshots and the blob will disappear also
The error is accurate. If you get that, it means the blob actually has snapshots. When you mount a blob you are most likely mounting the current version and not a past snapshot. You can enumerate the snapshots using the REST API (use the 'include=snapshots option) to prove this to yourself.
If you really want to delete the blob with minimal hassle, I would suggest using https://www.myazurestorage.com (safe site from Microsoft DPE). It will enumerate your snapshots automatically and allow you to delete them. Once they are all deleted, you can also delete the blob.

Resources