This happened many times yesterday and after experimenting, by transferring the files both locally and over NFS, it appears that only a LUKS encrypted virtual machine image throws this error. I then did the same with another VM image that does not have LUKS encryption and it saved the new image just fine.
Can anyone tell me why?
Code:
root@pve:/mnt/usb/exthdd1# qm importdisk 120 /mnt/usb/exthdd1/kali2021.qcow2 HDD2
importing disk '/mnt/usb/exthdd1/kali2021.qcow2' to VM 120 ...
Wiping dos signature on /dev/HDD2/vm-120-disk-2.
Logical volume "vm-120-disk-2" created.
transferred 0.0 B of 200.0 GiB (0.00%)
transferred 2.0 GiB of 200.0 GiB (1.00%)
transferred 4.0 GiB of 200.0 GiB (2.00%)
transferred 6.0 GiB of 200.0 GiB (3.00%)
transferred 8.0 GiB of 200.0 GiB (4.00%)
transferred 10.0 GiB of 200.0 GiB (5.00%)
transferred 12.0 GiB of 200.0 GiB (6.00%)
transferred 14.0 GiB of 200.0 GiB (7.00%)
transferred 16.0 GiB of 200.0 GiB (8.00%)
transferred 18.0 GiB of 200.0 GiB (9.00%)
transferred 20.0 GiB of 200.0 GiB (10.00%)
transferred 22.0 GiB of 200.0 GiB (11.00%)
---snip---
transferred 176.1 GiB of 200.0 GiB (88.03%)
transferred 178.1 GiB of 200.0 GiB (89.03%)
transferred 180.1 GiB of 200.0 GiB (90.03%)
transferred 182.1 GiB of 200.0 GiB (91.03%)
transferred 184.1 GiB of 200.0 GiB (92.03%)
transferred 186.1 GiB of 200.0 GiB (93.03%)
transferred 188.1 GiB of 200.0 GiB (94.03%)
transferred 190.1 GiB of 200.0 GiB (95.03%)
transferred 192.1 GiB of 200.0 GiB (96.03%)
transferred 194.1 GiB of 200.0 GiB (97.03%)
transferred 196.1 GiB of 200.0 GiB (98.03%)
transferred 198.1 GiB of 200.0 GiB (99.04%)
transferred 200.0 GiB of 200.0 GiB (100.00%)
transferred 200.0 GiB of 200.0 GiB (100.00%)
can't deactivate LV '/dev/HDD2/vm-120-disk-2': Logical volume HDD2/vm-120-disk-2 in use.
Logical volume "vm-120-disk-2" successfully removed
volume deactivation failed: HDD2:vm-120-disk-2 at /usr/share/perl5/PVE/Storage.pm line 1142.
Can anyone tell me why?