Remove VM but retain disk

gob

Renowned Member
Aug 4, 2011
69
2
73
Chesterfield, United Kingdom
Hi

I had a broken Nextcloud VM with two disks attached - one for the OS and one for the data.
I built a new VM with a new OS disk and added the previous data disk from the broken VM so both VMs share one data disk.
I would like to remove the broken VM but I do not want it to delete the data disk that is currently being used by the good working VM.

What is the best way to do this?

thanks
 
You need to rename the disk, so that the VMID in the disk name points to the new VM. But exact steps depends on the storage type and VM config you use.