none
Delete Azure VM OS Disk Unable

    Question

  • I went from the classic and reinstalled WordPress Bitnami new image on the new portal and accidentally added a new premium storage but every single time deleting it gives an error. I looked for hours to find a solution to remove the extra disk. I am getting charge for this extra disk. I just want the default disk that went with the VM only, which is a standard one. No way to remove the premium extra disk. I do not want to delete the VM and use it but delete this extra disk I will not be using. Please, someone help. I am on Bizspark account and I think I am going to be charged for not using this disk extra. I don't want that or I did not expect that. Help please!

    I know it is an extra disk not being used because the log shows nothing happening to it, but only showing error from trying to delete it. I only have VM ubuntu 14.04 bitnami wordpress on new portal. So nothing on classic, just new VM and that extra OS disk that is premium and want it removed for not being used. I don't understand why it is made so difficult to remove it or delete it.

    Sunday, April 3, 2016 4:16 AM

Answers

  • You cannot delete the OS disk of an existing VM. That situation wasn't clear from your original post which said you are trying to delete the extra disk. All VMs have an OS disk, and you cannot remove that. You can only attach/detach additional disks as data disks.

    Based on your latest clarifications, it sounds like what you want is to change the OS disk of the VM from Premium to Standard storage? That will involve a VM downtime.

    If you have data on the disk and you want to preserve the exact state, This the process:

    1. Shutdown the VM

    2. Copy the VHD to a Standard Storage account

    3. Create a new OS disk in the Standard account, pointing to the copied VHD

    4. Create a new VM using the new OS disk.

    5. After that you can delete the old VM and then the old disk

    If you don't have much data on the current VM yet, you can just create a new VM using a Standard Storage account for OS disk, and manually copy any required data from the old VM to new VM. And, then delete the old VM and the disk.

    Sunday, April 3, 2016 9:20 PM

All replies

  • Hi - Sorry for the trouble. Can you try out the instructions provided at the article below and let us know if that helps: https://azure.microsoft.com/en-us/documentation/articles/storage-cannot-delete-storage-account-container-vhd/
    Sunday, April 3, 2016 4:23 AM
  • Hi - Sorry for the trouble. Can you try out the instructions provided at the article below and let us know if that helps: https://azure.microsoft.com/en-us/documentation/articles/storage-cannot-delete-storage-account-container-vhd/

    I need something that actually will help, not send me to where there is nothing to do with. Your Microsoft forum helper and can't even help with this at all. Why is it so hard for Microsoft to solve issues the first time? You have to make it so difficult to make more money? I rather just take my site down than have all these problems. I am tempted to just give the F up here.

    If you read my post at all. I said VM is not classic and is on the new portal with premium extra OS storage with is no access on the classic at all. So that link you gave me is pointless. Thanks for the wrong solution. I will stay SOL since Microsoft does not even know how to fix or make their stuff work right the first time.

    Sunday, April 3, 2016 5:08 AM
  • Solution provided above is explicitly useful for Premium Storage disks. The article I mentioned is exactly for your scenario from the description that you mentioned in the first post. Even though the premium storage VMs are not managed via the classic portal, all the "disks" are visible there. That is the only visual method to view the active disks. Alternative is to use PowerShell.

    Problem here is that, when you create an OS "disk" that has lease on the VHD. Only way to delete the VHD is to first delete the "disk" object. Disk object is not visible via the new portal. You have to use either the old port (even for premium disks) or the powershell/CLI to see that and delete it.

    Please follow the instructions in the document mentioned.

    Sunday, April 3, 2016 5:34 AM
  • Solution provided above is explicitly useful for Premium Storage disks. The article I mentioned is exactly for your scenario from the description that you mentioned in the first post. Even though the premium storage VMs are not managed via the classic portal, all the "disks" are visible there. That is the only visual method to view the active disks. Alternative is to use PowerShell.

    Problem here is that, when you create an OS "disk" that has lease on the VHD. Only way to delete the VHD is to first delete the "disk" object. Disk object is not visible via the new portal. You have to use either the old port (even for premium disks) or the powershell/CLI to see that and delete it.

    Please follow the instructions in the document mentioned.

    Nope, I have been there and done that with nothing there to even do anything with at all. There is nothing in VM Classic with no images or disks at all to work with on the Classic end. So keep telling me to work with something that is not even there. Just keep doing it. It will never get anywhere by telling me it is the way when there is nothing there to work with. Come on and keep wasting my time. I can look at it over and over again with nothing in the VM Classic and just keep telling this to you guys and you keep telling me to do it with nothing at all there. That really helps. Anyone else smarter than this?

    How the hell do you use powershell for Ubuntu VM? Powershell is for Windows VM. So that will not work either.

    Sunday, April 3, 2016 5:39 AM
  • Hi - PowerShell tool is usable for managing Linux VMs also. So is CLI usable for managing Windows VMs. You pick the tool based on where you'd run the tool. If you use a Windows desktop for managing your VMs, you'd use PowerShell. If you use a Linux machine for managing your VMs, you'd use XPLAT/CLI.

    Coming back to the main problem, when go to the classic portal and click on "Virtual Machines" and look under "Disks" tab and "Images Tab" what do you see listed there?

    Sunday, April 3, 2016 5:54 AM
  • Hi - PowerShell tool is usable for managing Linux VMs also. So is CLI usable for managing Windows VMs. You pick the tool based on where you'd run the tool. If you use a Windows desktop for managing your VMs, you'd use PowerShell. If you use a Linux machine for managing your VMs, you'd use XPLAT/CLI.

    Coming back to the main problem, when go to the classic portal and click on "Virtual Machines" and look under "Disks" tab and "Images Tab" what do you see listed there?

    Nothing at all because I did not install a disk in classic. It was in the new portal. I said that before. Want me to say it again? You keep pushing me into saying it again.

    This is what I did when going from old portal with website on classic it was on but moved to the new portal with old website to new. I did have a VM Classic but after creating the new portal VM with website all moved over. I already deleted every single thing on classic. So there is nothing left on that portal at all.

    The new VM was created with DS1 but I was worried that I was not going to have enough space for the website so I created a premium OS disk not knowing if I really needed it or not or what. So I went in there playing with disks and then there is a 128 gb premium OS there. I am not sure if that is needed or not so I am trying to delete it because it looks from monitor that it is not even being used.

    There is only one option on the new portal to delete and that is selecting the premium disk only and clicking the delete but it says succesfull but in the logs under the disk not being deleted says error. Failed. It says exactly what you link says for the error but that link tells me to go to the VM classic that has nothing there at all. I have said this many times now.

    Plus, I have putty and does that work for this? Pointless to download something I can already use.


    Sunday, April 3, 2016 5:57 AM
  • OK, in that case please try PowerShell or xplat cli. At the time of creating the VM, did you pick the deployment model as "Resource Provider" or "Classic"? Based on that you have to use the right release of the toolset. Goal is to list all the disks. You should see one corresponding to the blob that you are trying to delete.

    (Before you do this, try to delete VHD again. Sometimes there could have been delays in clearing the lease. You have already detached the unwanted disk from the VM, right?) 

    Sunday, April 3, 2016 6:23 AM
  • OK, in that case please try PowerShell or xplat cli. At the time of creating the VM, did you pick the deployment model as "Resource Provider" or "Classic"? Based on that you have to use the right release of the toolset. Goal is to list all the disks. You should see one corresponding to the blob that you are trying to delete.

    (Before you do this, try to delete VHD again. Sometimes there could have been delays in clearing the lease. You have already detached the unwanted disk from the VM, right?) 

    Can't detach a disk that was not attached. Plus, it is grayed out. I just tried the azure command line after install and it tells me there is nothing.

    No command at all for OS disk, just data disk.

    Try deleting the blob first and says there is currently a lease on it. Same with the vhds and this is on the new portal. I can't get anything on VM classic. I am saying it again.

    No lease ID on blob.

    Sunday, April 3, 2016 6:32 AM
  • Thanks. Can you also confirm if this is a Resource Manager VM or Classic? You can tell that from whether the VM appears under "Virtual Machines" section or "Virtual Machines (Classic)" section on the portal.
    Sunday, April 3, 2016 7:02 AM
  • What I said last was on normal VM not classic. I already said there is nothing on VM Classic.

    I totally wasted downloading and trying the command line to have it tell me the same thing the Virtual Machines Classic says that there is nothing.

    This is the worst shit ever. Commit Suicide with this much trouble.

    Failed to delete blob 'vhds/abvm2016228135141.vhd'. Error: There is currently a lease on the blob and no lease ID was specified in the request.

    That is on Virtual Machines not Classic.

    Failed to delete storage container 'vhds'. Error: There is currently a lease on the container and no lease ID was specified in the request.

    Same with vhds.

    Can't even detach it if it is attached. Grayed out.

    I could be wrong and that is a part of my site but my credit did not drop to lower price from Virtual Machines Classic Standard dv2 pricing to the new lower Virtual Machine DS1 pricing. It showing that it is still using about the same amount even when DS1 is just over half the price of the Dv2 of the classic. Makes no sense. Either I accidentally created the premium os disk and I do not need it or it created it by default and no way to remove it without deleting VM and I do not want to redo the whole thing all over again.

    I cannot believe that this is made to be impossible solution. There is a major flaw in your system if I can figure it out. I check the monitor on that premium disk and it shows as no activity from it but the standard no premium disk that was created with the new VM is the one with activity. So I am pretty sure I accidentally created a new OS Disk Premium. There is just no way to delete it without ruining my whole website to do it.

    Looks like I just attached it to the VM. Well, I just screwed it up now.

    Detaching that disk I attached now because the VM says Fail for status now. Hopefully, my website will not be screwed up.

    BACK TO RUNNING! Well, I give up on this. Looks like an impossible remove on the disk. Either I need it or I am just going nuts for no reason at all on this but I can't believe the price has not dropped from the $109 a month Standard Dv2 pricing to the new DS1 $57 a month one. A little fishy to me. Billing shows no change.

    Edit: 4/3/2016 at 2:00 AM 

    I just checked my billing from the old portal that shows for the premium os disk and it shows that I will be charged $20 a month plus the $57.29 with DS1 which is $82 plus a month on the billing. That will give my website the 128 gb storage plus the 50 gb with the DS1. So I think I will stick with this and it should be good for the next year. My website does not have that many visitor still and maybe by the close time of next beginning of 2017 I will have enough earned money to switch to another hosting. Just stick with what I got but I noticed last couple days of downtime with my site. Which is not good. I hope it does not keep going down like it has been. 504 errors and cpu rising. I cannot go to the DS2 with that disk added because it would be $114 plus the $20 and that is too close to the max credit. I would get a warning every month.

    Sunday, April 3, 2016 7:07 AM
  • When you look at the VM on the new portal, and click on "Disks", what does it list? There will be two sections: OS Disk and Data Disks. Can you tell me which dicks are listed under each? Specifically, which section lists the Premium Disk?
    Sunday, April 3, 2016 3:43 PM
  • When you look at the VM on the new portal, and click on "Disks", what does it list? There will be two sections: OS Disk and Data Disks. Can you tell me which dicks are listed under each? Specifically, which section lists the Premium Disk?

    Like it would do anything but two sections top is the OS disk and that is the I am talking about and nothing in the second data disk.

    Though, even if there is nothing listed in data disk. It still has that 50 gb one that is in the DS1 size. So even if I got rid of the OS disk, it would still be working. It is part of the data disk of the size of VM. That is why I would like the other deleted to make it simpler to adjust size up to DS2 without being charged more. Bizspark account is only $150 credits a month. I mean more with the other $20 a month premium OS disk.

    Probably would not only make me happy to make this fixed but I bet there are so many out there looking for a solution that can't find it. That is how bad these forums are. So many threads that people selected as a solution but really isn't at all. Gone through hours and hours of looking to find nothing that works.

    Sorry, to be a pisser to Microsoft but man, this is the worst being awake nightmare anyone could have. I never had the worst support ever until I come to these forums because nothing is resolved ever. Those other threads are just guessed solved issues.

    Sunday, April 3, 2016 6:05 PM
  • If I had the new $200 cap a month then I would not be here and just move up to the DS2 but I don't like being so close to max cap with this OS disk putting me to the $150 cap. $139 is pretty darn close and maybe ruin my whole chance of using this account. That is why it is sad that Microsoft people can't figure out their own system.
    Sunday, April 3, 2016 6:30 PM
  • You cannot delete the OS disk of an existing VM. That situation wasn't clear from your original post which said you are trying to delete the extra disk. All VMs have an OS disk, and you cannot remove that. You can only attach/detach additional disks as data disks.

    Based on your latest clarifications, it sounds like what you want is to change the OS disk of the VM from Premium to Standard storage? That will involve a VM downtime.

    If you have data on the disk and you want to preserve the exact state, This the process:

    1. Shutdown the VM

    2. Copy the VHD to a Standard Storage account

    3. Create a new OS disk in the Standard account, pointing to the copied VHD

    4. Create a new VM using the new OS disk.

    5. After that you can delete the old VM and then the old disk

    If you don't have much data on the current VM yet, you can just create a new VM using a Standard Storage account for OS disk, and manually copy any required data from the old VM to new VM. And, then delete the old VM and the disk.

    Sunday, April 3, 2016 9:20 PM
  • You cannot delete the OS disk of an existing VM. That situation wasn't clear from your original post which said you are trying to delete the extra disk. All VMs have an OS disk, and you cannot remove that. You can only attach/detach additional disks as data disks.

    Based on your latest clarifications, it sounds like what you want is to change the OS disk of the VM from Premium to Standard storage? That will involve a VM downtime.

    If you have data on the disk and you want to preserve the exact state, This the process:

    1. Shutdown the VM

    2. Copy the VHD to a Standard Storage account

    3. Create a new OS disk in the Standard account, pointing to the copied VHD

    4. Create a new VM using the new OS disk.

    5. After that you can delete the old VM and then the old disk

    If you don't have much data on the current VM yet, you can just create a new VM using a Standard Storage account for OS disk, and manually copy any required data from the old VM to new VM. And, then delete the old VM and the disk.

    Well, if you did read all of it. I did say it was a website and there is about 600 posts on WordPress and I am not going to redo this all over again. I am not going to spend another 3 days reuploading all images to each post because my internet connection can't handle huge uploads at one time. I have a 900kbps upload connection and that would just clog up the internet connection. So I am just going to leave it and I already up the vm size to the DS2 but I am worried that even it is pricing at $134, it is awfully close to max cap of $150 and I hope I won't lose my website because of this.

    Thanks for that answer and sounds like the best solution but I am not going to go through the whole redo the website all over again like that. There has to be something easier but you seem to not know one. Another thing when creating the VM never mentions any size of disk. It just says ssd for DS1 is 7 ssd disk. Shows 2 disks but does not say what they are. Really bad to not give all information.

    The pricing is said DS are same as the standard D but I have to look at the D pricing to figure this crap out. Now the D pricing never says anything about Premium Disks. So that means we are getting hidden Premium disks in the new VM's. Still bad in way Microsoft is doing this. Should be way more clearer than they do it. It is like we have to assume that all this is just the way it is and read Microsoft or Azure mind that we will automatically know these VM comes with a premium os disk. I did not select the premium on install. I selected the standard but oh well.

    If I get nagged on the pricing at the end because it has $15 left, and they mess up my account because of it, then I will just back up my website and totally leave Bizspark before my finish time of around April next year. Just way too much trouble with bad information with creating VM.

    This should be the answer but really shouldn't be having to redo the whole thing over again. Just do nothing because if I did what your answer said I would be wasting another few days to get what I already have just for a standard disk instead of Premium. Hopefully, they will drop the pricing a little more or offer the DSv2 or what it is called on VM classic and grayed out on new VM Dv2 and is cheaper. That is what I was on before coming to the new portal VM.
    Sunday, April 3, 2016 9:35 PM
  • Wish you the best. Hope there will be additional revenue from your site to offset the extra cost!
    Sunday, April 3, 2016 9:52 PM