[SOLVED] Unused disks cannot be removed.

PaoloHolzl

Member
Apr 27, 2023
31
3
8
I have converted some machine from Virtualbox.
All is working but I have a machine 120 that use ony local-lvm.vm-102-disk-0
Ther aren't unused disks for this machine.

But into VM Disks i see:
vm-102-disk-0
vm-102-disk-1 (not used)

Same problem with other machine.

Cannot be removed because 'Unable to remove disk image, a guest with VMID '102' exists!'
In guest unused devices aren't presen, howto remove it?
 
root@ProxMox02:~# qm config 102
boot: order=ide0;ide2;net0
cores: 1
ide0: local-lvm:vm-102-disk-0,size=41372M
ide2: none,media=cdrom
memory: 2048
meta: creation-qemu=7.2.0,ctime=1682684861
name: Win10Virt11
net0: e1000=82:C8:C6:BF:09:95,bridge=vmbr0,firewall=1
numa: 0
onboot: 1
ostype: win10
scsihw: virtio-scsi-single
smbios1: uuid=5ca5dc60-4c62-49d5-9edd-9e26a419a664
sockets: 1
vmgenid: 86bdccd9-ec13-4c4a-b20f-1637febcc652


pvesm status
Name Type Status Total Used Available %
local dir active 67173768 2763272 60952448 4.11%
local-lvm lvmthin active 136593408 119013836 17579571 87.13%


pvesm list local-lvm
Volid Format Type Size VMID
local-lvm:vm-100-disk-0 raw images 34359738368 100
local-lvm:vm-102-disk-0 raw images 43381686272 102
local-lvm:vm-102-disk-1 raw images 32434552832 102
local-lvm:vm-103-disk-0 raw images 32434552832 103
local-lvm:vm-103-disk-1 raw images 32434552832 103
local-lvm:vm-103-disk-2 raw images 32434552832 103
local-lvm:vm-103-disk-3 raw images 32434552832 103
local-lvm:vm-104-disk-0 raw images 37580963840 104

Same situation is for other machine all use disk-0 only 103 use disk-3
 
For vm102 - only disk-0 is in the configuration of the VM as you see from the config output.

You have two options:
a) delete the disk directly: pvesm free local-lvm:vm-102-disk-1
b) add disk to configuration and then delete it: "qm rescan" should add disk to config as "unused0", you can then use GUI to delete it.


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