Search code examples
azureazure-storageazure-virtual-machine

Moving storage from azure unmanaged diskspace to managed


I received this notification:

Migrate your data from Azure unmanaged disk storage to managed disks

I understand that I need to move to some kind of managed storage but not sure where to get it in azure and how is it different from existing storage.

I have current storage attached to a vm and allocated drive letter etc. if this is my OS disk am I doomed or is there a tool/cli to help me with migration of storage from existing to managed.

My assumption is that message is about an old storage account but from the message json how can I identify which storage they are talking about.

If anyone has done this recently please let me know their experience or if my question is already on stack overflow but my keywords or understanding is wrong please correct me.


Solution

  • All you need to know is the VM and resource groups that you need to convert. You can then use the Azure CLI (or Powershell) to convert all attached disks to managed disks using:

    az vm deallocate --resource-group myResourceGroup --name myVM
    az vm convert --resource-group myResourceGroup --name myVM
    az vm start --resource-group myResourceGroup --name myVM
    

    As explained in the Microsoft docs.

    The main difference between the two is that you won't have to manage a storage account for the managed disks and everything that's involved such as security, disaster recovery, etc.

    As additional note: The change is inreversible.