Azure – How to add storage account to existing virtual machine in azure

azurestoragevirtual-machines

I created a virtual machine with a storage account. I used to configure developer things but by mistake I star production things there.

Well, someone from my team dropped all "developer" thing.

Now, I'm trying to see how I can assign a new storage account but, I don't see any option except for "create virtual disk", and for personal reasons I prefer storage account, does anyone know how I can solve this issue?

Best Answer

how I can assign a new storage account

Do you mean your team will delete storage account which contain your production data? And you want to assign a new storage account to keep your OS disk and data disk?

If your VM's OS disk and data disk all in that storage account, to keep your data, we should create new storage account, and copy os VHD and data disk to that storage account, then use this OS VHD to create a new VM, then attach data disk to this new VM.

If just data disk on that storage account, we can create a new storage account and attach new data disk to that VM, and copy data to the new disk.

About copy data from this storage account to another storage account, we can use Azcopy to copy it.

Related Topic