locked
How do I convert a VM with both managed and unmanaged disks RRS feed

  • Question

  • When I run the following command on a VM that has an unmanaged disk as the OS disk and then some data disks that *are* managed disk

    ConvertTo-AzureRmVMManagedDisk


    I get the error 

    VM [] is already using managed disks

    I detached the data disks and waited several minutes and reran the Convert command and am still getting the error message.  I'm mostly puzzled about that because there is now only one disk attached to the VM and it is unmanaged.  

    Interestingly the output of this code shows that the VM is supposedly managed:

    (Get-AzureRmVm -ResourceGroupName $rgName -Name $vmName).StorageProfile.OsDisk
    However the portal continues to show information which to me looks like unmanaged disk in that there is a SOURCE BLOB URL, etc.   One thing that is different between two machines that I am comparing is on my verified managed disk OS VM it has a disk state of Attached where the suspect VM has disk state of reserved.  Additionally, the ManagedDisk property of the VM shows "Microsoft.Azure.Management.Compute.Models.ManagedDiskParameters" and the DiskSizeGB is empty or null where on a verified VM with managed OS disk it has a value in there.


    How can I go about converting that OS disk to be a managed disk?





    • Edited by Cat-Man-Do Wednesday, December 6, 2017 6:24 AM
    Wednesday, December 6, 2017 6:04 AM

Answers

  • From the screenshots it looks like your VM has successfully converted to a Managed disk.

    Even I am seeing the source blob after converting my unmanaged VM to a managed VM. We are investigating on this further and will keep you posted.

    See the screenshot:

    Do click on "Mark as Answer" on the post that helps you, this can be beneficial to other community members

    • Marked as answer by Cat-Man-Do Monday, December 11, 2017 10:18 PM
    Thursday, December 7, 2017 4:41 PM

All replies

  • How exactly did you add a managed disk to an unmanaged VM?

    I have tried to add a managed disk to an unmanaged VM in my lab, but I receive this error message “Addition of a managed disk to a VM with blob based disks is not supported”

    See the below screenshot:

    Add the column “Uses managed disks” as shown in the below screenshot and check whether your VM is using managed or unmanaged disk. Do provide a screenshot by concealing the sensitive information.


    Do click on "Mark as Answer" on the post that helps you, this can be beneficial to other community members

    Wednesday, December 6, 2017 3:20 PM
  • This VM was created about 18 months ago and I added the data disks about 6-12 months ago so it may no longer be possible to recreate.

    

    Here is the capture from the OS Disk properties.


    Wednesday, December 6, 2017 4:42 PM
  • From the screenshots it looks like your VM has successfully converted to a Managed disk.

    Even I am seeing the source blob after converting my unmanaged VM to a managed VM. We are investigating on this further and will keep you posted.

    See the screenshot:

    Do click on "Mark as Answer" on the post that helps you, this can be beneficial to other community members

    • Marked as answer by Cat-Man-Do Monday, December 11, 2017 10:18 PM
    Thursday, December 7, 2017 4:41 PM
  • Thanks.  I was keying off the "Source Blob" and how it was not in my non-converted managed disk.  If that is normal, then I think I'm good.  Thanks!
    Monday, December 11, 2017 10:18 PM