Lxd delete - "dataset is busy" error

I have been running benchmarks on VM instances and accidentaly fully used up the storage of an instance.

The VM stopped responding and stopped immediately, I have tried to delete it however I got the following output:

$ lxc delete vm-test
Error: Error deleting storage volume: Failed to run: zfs destroy -r temp/virtual-machines/vm-test.block: cannot destroy 'temp/virtual-machines/vm-test.block': dataset is busy

Following are the contents of /proc/*/mounts

$ grep temp/virtual-machines/vm-test /proc/*/mounts
/proc/3728966/mounts:temp/virtual-machines/vm-test / zfs rw,xattr,posixacl 0 0
/proc/3728992/mounts:temp/virtual-machines/vm-test / zfs rw,xattr,posixacl 0 0

And zfs list:

$ zfs list | grep temp/virtual-machines
temp/virtual-machines                                                                   45.9G     0B       24K  none
temp/virtual-machines/vm-test                                                           5.79M     0B     5.81M  /var/snap/lxd/common/lxd/storage-pools/temp/virtual-machines/vm-test
temp/virtual-machines/vm-test.block                                                     45.9G     0B     46.6G  -

I have found similar posts however I could still not solve the issue with the information given.

Any tips are appreciated.

Killing the still running qemu process solved the issue.

1 Like

We have an issue open to forcefully kill the qemu process when it stops responding in cases like that.