Delete orphaned VM DIsk

bratac

New Member
Mar 18, 2024
1
0
1
I hope this is the correct Forum to post this in, but it was the closesest I could find to what my question is.

I was trying to delete an old VM Disk because I would like to disable "Allow Snapshots as Volume-Chain" and there is one qcow2 disk file I cannot delete. The original VM does not exist anymore. I have tried to recreate the VM with the samew ID and after "qm disk rescan" the disk showed up and I tried deleting it, which was not possible due to an old snapshot, that of course no longer exists. It is looking for the snap shot file that is not there anymore.

How can I delete this file wihout the original snapshot. I don't have a backup, as it was only a test maschine.

update VM **: -delete unused0
TASK ERROR: qemu-img: Could not open '/dev/****/snap_****.qcow2': Could not open '/dev/****/snap_****.qcow2': No such file or directory
 
If you're sure the storage/disk doesn't exist any more then you can just remove the line from the config file
Bash:
# For a  VM
sed -i '/^unused0:/d' /etc/pve/qemu-server/VMIDHERE.conf

# For a CT
sed -i '/^unused0:/d' /etc/pve/lxc/CTIDHERE.conf
If you share more information such as the config file I can give you more detailed commands.
 
To be clear, the VM and the snapshot associated with the disk do no longer exist -> it's only a image lying around that isn't used by anything? And in order to delete the disk (presumably via the GUI) you created a new VM with the same ID to re-associate the disk?
 
Hi @bratac ,

Since your post contains references to "Allow Snapshots as Volume-Chain" and your disk references /dev, it suggests that you are using a SAN of some sort.
The ASVC feature requires use of LVM, so you must have an LVM volume left over that you should be able to delete using native LVM commands.


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox