I had a VM using RAW storage format on a ZFS storage object. I needed to delete the RAW hard drive files but couldn’t find them and the “remove” button was greyed out. One post mentioned using “qm rescan” which then allowed the poster to use the remove button but that didn’t work for me. After some research I found out that virtual drives on ZFS storage aren’t actually files but are “ZVOL”s. After a bit more research I came across the solution below to remove these drives manually.

zfs list
NAME                                             USED  AVAIL  REFER  MOUNTPOINT
rpool                                            209G  16.2G    96K  /rpool
rpool/ROOT                                      13.8G  16.2G    96K  /rpool/ROOT
rpool/ROOT/pve-1                                13.8G  16.2G  13.8G  /
rpool/subvol-102-disk-1                          264M  7.74G   264M  /rpool/subvol-102-disk-1
rpool/swap                                      15.9G  32.1G  37.7M  -
rpool/vm-100-disk-1                             51.6G  65.6G  2.11G  -
rpool/vm-100-disk-2                             51.6G  67.7G    64K  -
rpool/vm-100-disk-3                             58.4G  45.3G  28.6G  -
rpool/vm-100-state-beforeInstallofDCcomponents  17.0G  31.9G  1.30G  -
zfs destroy -f rpool/vm-100-disk-1
zfs destroy -f rpool/vm-100-disk-2

Next, I had initiated a “move” of the storage drive to an NFS share but it was taking forever. Proxmox, for whatever reason, lacks a “cancel” button for running tasks. After a bit of digging I found out I could kill the PID. Here is how that worked.

ps aux | grep qm
postfix   2393  0.0  0.0  38276  3368 ?        S    14:36   0:00 qmgr -l -t unix -u
root      3828  0.0  0.5 347148 91928 ?        Ds   14:53   0:00 task UPID:pm03:00000EF4:0001A237:56FC20BA:qmmove:100:root@pam:
root      4805  0.0  0.0  12728  1692 pts/0    S+   15:07   0:00 grep qm

To kill the PID (3828) and stop the task I simply:

kill -9 3828


Probably not the cleanest things to do but it all worked…


1 of 1

2 comments on: Proxmox – Delete Disk Image on ZFS storage – Stop Running Proxmox Tasks

  1. deviate93

    Kill -9 is old school unix

  2. BadAss

    Better use pkill -15 for a cleaner way to kill a program

Leave a Reply