In June 2017, Microsoft announced a new type of storage account known asManaged disks”. Managed disks are an exciting new feature in Azur designed to help disk storage availability, manageability, scalability, and performance in Azure.
Differential Maintenance and Uncontrollable Sheeting determines the amount of administrative overhead and also some technical constraints that govern how many disks you have, how they are installed, how they are backed up, and how well they work. Technical limitations are discussed in detail here.
With Uncontrolled disks for example, it is the administrator’s job to replicate, optimize disks to ensure performance, and ensure that disks are truly protected. For Managed disks, Azure does all this for you.
With Uncontrolled disks you create a storage space. You put these discs in a storage account. Then you control the use of these disks Role-based access control adding or locking tags at the storage level. So you might quit if you have a lot of virtual machines and need to separate everything from each other, you need many unmanaged storage accounts and this can be a challenge for management.
As for pricing per storage space, it uses storage pricing for an uncontrolled disk. For Managed, it is simply based on disk size. How you place a storage account, which areas, and how you copy it, with Unmanaged you do all the work, Managed Azure does it for you. Managing managed disks is not capacity, not consumption (i.e. with a 1B HDD / SSD, you pay 1000GB even if you only used 1GB). With unmanaged disks, you pay for consumption (i.e., you have a 1TB hard drive / SSD and used 1GB, you pay for 1GB).
And then finally accessibility, Uncontrolled disks you can use storage account information to access real VHD files. With Managed disks you need to export those VHD files and at that point Azure creates a one-time key and you can export the disk. But again, the difference here is Uncontrolled disk You must first create a storage account, then create disks, and then manage the disks by managing the storage account. So there is this extra layer for which you have responsibility. Now that you may benefit from it, you may want to gain extra control. You can allow different users to log in and access raw VHD files through storage. If you do, Uncontrollable is probably the way to go. But if you just want a virtual machine and you just don’t want to take care of the virtual images, just put them in Azure and make sure they are good, then Managed disk is the right choice for you.
The question is, what if you have an existing virtual machine Uncontrolled disk, can i convert it Managed disk? The short answer isYEAH!
In this post, I’ll show you how to move a virtual machine from unmanaged to managed disks and eliminate this extra management cost.
Let’s go ahead and convert the virtual machine from an unmanaged disk to a managed disk.
If you have a virtual machine that you deployed before using managed disks, or you decided to simplify and move from an unmanaged disk configuration to a managed disk configuration. Either way, it’s a pretty simple process. The only annoying point is that you have to shut down the virtual machine in order to do so. So you need to take this into account, for example, downtime, application availability. But if this is a non-critical virtual machine, it’s not a big deal, you can go ahead and do it.
In this example, I have a virtual machine called adPDC, adPDC use unmanaged disks. As you can see from the screenshot below, it has an operating system disk.
If I click on the operating system disk, you will see that it is actually using a storage account. So this is uncontrollable plate.
Now convert it with PowerShell.
You can go one step further and dig a little disk configuration and view the operating system disk StorageProfile property. As you can see, this is not a managed record. You can see that there is no value, it is fundamentally wrong.
Now let’s move on and make a transformation. First you have to Stop (Share) using a virtual machine Stop-AzureRmVM followed by the virtual machine name and the resource group name. This may take a few minutes.
Stop-AzureRmVM -Name <VMName> -ResourceGroupName <ResourceGroupName>
So the virtual machine is shut down, now we can really go ahead and do the conversion. And for this, we need to run the PowerShell command, which is specifically for this task. The command is ConvertTo-AzureRmVMManagedDisk followed by the virtual machine name and the resource group name.
ConvertTo-AzureRmVMManagedDisk -Name <VMNam> -ResourceGroupName <ResourceGroupName>
What this command does behind the scenes is actually performing the transition from an unmanaged disk to an Azure-managed disk. And this process takes a little time. In this example, the conversion took just over two minutes.
Let’s go ahead and start the virtual machine Start-AzureRmVM cmdlet and see the configuration. We ask StorageProfile feature for our disk configuration. As you can see now that it is a managed disk.
Hopefully this will help!