[pve-devel] [PATCH v3 storage qemu-server container 0/9] move disk or volume to other guests

Aaron Lauterer a.lauterer at proxmox.com
Tue Nov 2 15:36:40 CET 2021



On 10/27/21 13:55, Fabian Ebner wrote:
> Nice work! For all patches except #8 it's only nits from my side, so those are:
> 
> Reviewed-by: Fabian Ebner <f.ebner at proxmox.com>
> Tested-by: Fabian Ebner <f.ebner at proxmox.com>
> 
> 
> I did run into one strange issue with RBD upon destroying a VM, but it didn't pop up consistently and maybe it's just my cluster (all VMs were powered off):
> 
> root at pve701 ~ # qm clone 12345 142
> /dev/rbd0
> create linked clone of drive scsi0 (rbdkvm:base-12345-disk-0)
> clone base-12345-disk-0: base-12345-disk-0 snapname __base__ to vm-142-disk-0
> root at pve701 ~ # qm move_disk 142 scsi0 --target-vmid 111 --target-disk scsi3
> moving disk 'scsi0' from VM '142' to '111'
> removing disk 'scsi0' from VM '142' config
> update VM 111: -scsi3 rbdkvm:base-12345-disk-0/vm-111-disk-0,size=4G
> /dev/rbd1
> root at pve701 ~ # qm move_disk 111 scsi3 --target-vmid 142 --target-disk scsi3
> moving disk 'scsi3' from VM '111' to '142'
> removing disk 'scsi3' from VM '111' config
> update VM 142: -scsi3 rbdkvm:base-12345-disk-0/vm-142-disk-0,size=4G
> /dev/rbd2
> root at pve701 ~ # qm destroy 142
> 2021-10-27T12:17:13.202+0200 7f8b00d0e700 -1 librbd::image::PreRemoveRequest: 0x55e08f1cac30 check_image_watchers: image has watchers - not removing
> Removing image: 0% complete...failed.
> rbd: error: image still has watchers
> Could not remove disk 'rbdkvm:base-12345-disk-0/vm-142-disk-0', check manually: rbd rm 'base-12345-disk-0/vm-142-disk-0' error: rbd: error: image still has watchers

I also came across this issue and it seems that we do not unmap KRBD mounted images prior to renaming them. This also applies to converting a guest to a template. I have it on my TODO list to work on that in an extra patch set.





More information about the pve-devel mailing list