0
votes

I have 1 x OS disk and 1 x Data disk attached to VM1, the disks are unmanaged in storage account mystorage

So I know I cannot rename the storage account...

Can I instead do the following then somehow re-attach them to the Original VM again?

  1. Stop VM1
  2. In Azure Storage Explorer, for each of the disks, Break Lease
  3. In Azure Storage Explorer, copy each disk from mystorage to mynewstorage

The only thing im not sure on how to do is re-attach them to the VM1

2

2 Answers

0
votes

yeah, this is a valid approach, you dont need to break the lease if you deallocate the vm (at least that is my impression).

you can use az cli to attach unmanaged disk (https://docs.microsoft.com/en-us/cli/azure/vm/unmanaged-disk?view=azure-cli-latest#az-vm-unmanaged-disk-attach) or portal ui (https://cloud.netapp.com/blog/azure-virtual-machines-attach-mount) or powershell

0
votes

You could create a snapshot of the OS disk, move the snapshot to the new storage account and create the VM , that way you would keep the OS disk.