Issue statement
Any attempt either to clone or migrate a VE fails with the following error:
Cannot migrate a Container with backup(s) attached.
Symptoms
# prlctl clone VE --name test-VE
WARNING: You are using a deprecated CLI component that won't be installed by default in the next major release. Please use virsh instead
Clone the VENAME VE to VE new-VENAME...
Failed to clone the CT: Operation failed. %1 (Details: locking a4525627-c82e-44ed-b52a-3824a332a0ca
Cannot migrate a Container with backup(s) attached.
Can't move/copy CT a4525627-c82e-44ed-b52a-3824a332a0ca -> CT 1b162aa8-f545-4204-9a7d-703c4270ae3e, [], [] : Cannot migrate a Container with backup(s) attached.
unlocking a4525627-c82e-44ed-b52a-3824a332a0ca
)
Diagnostic steps
Try to find backups:
# prlctl backup-list VE
ID Backup_ID Node Date Type Size
{a4525627-c82e-44ed-b52a-3824a332a0ca} {1d9078cc-b920-4ef1-8719-a4148d37f932}.2 CT 05/27/2023 01:22:53 f 2159136768
Try to find the backup disk attached to the VE:
# prlctl list -if VE
...
hdd1 (+) scsi:1 image='/vz/private/a4525627-c82e-44ed-b52a-3824a332a0ca/backup1.hdd' backup='{74b44f1d-64d4-4a61-8110-af62f31fbd2e}.4' disk='root.hdd.4.qcow2' type='expanded' 65536Mb state=connected subtype=virtio-scsi
And take a look at the ploop list:
# ploop list | grep a4525627-c82e-44ed-b52a-3824a332a0ca
ploop37574 /vstorage/vz7c/private/a4525627-c82e-44ed-b52a-3824a332a0ca/root.hdd/root.hds
ploop59180 /run/buse/{a4525627-c82e-44ed-b52a-3824a332a0ca}_{74b44f1d-64d4-4a61-8110-af62f31fbd2e}.4_root.hdd.4.qcow2/content
Cause
Migration/cloning of a container with backup(s) attached is not possible.
The backup disk should be detached first.
Resolution
In short, it requires to detach the found disk:
prlctl set VM --device-del hdd1 --detach-only
In case of ploop stuck, try to umont ploop first:
# ploop umount /run/buse/{a4525627-c82e-44ed-b52a-3824a332a0ca}_{74b44f1d-64d4-4a61-8110-af62f31fbd2e}.4_root.hdd.4.qcow2/content
unfreeze /dev/ploop59180p1
Unmounting device /dev/ploop59180
Opening delta /vstorage/vz7c/private/a4525627-c82e-44ed-b52a-3824a332a0ca/backup1.hdd/content.{16cc53a5-c7ed-4ad9-8f82-c2ca280ce252}
And then detach the backup volume:
# prlctl set VM --backup-del all
Please find the article attached to the Reference down below.
Reference:
2.10.7: 2.10. Managing Virtual Machine and Container Backups | Virtuozzo Hybrid Server 7 User's Guide