Peter Krempa
2020-Jan-17 11:06 UTC
Re: error: internal error: unable to execute QEMU command 'blockdev-mirror': Cannot find device= nor node_name=
On Fri, Jan 17, 2020 at 01:45:00 +0100, Oliver Dzombic wrote:> Hi, > > i try to test live-migration using this command: > > #virsh migrate --copy-storage-all --verbose --live kvm1776 > qemu+ssh://nodeb/system > > > Instant error message: > > error: internal error: unable to execute QEMU command 'blockdev-mirror': > Cannot find device=drive-sata0-0-0 nor node_name=drive-sata0-0-0Hi, for completness I'm re-posting the reply I gave in the bug you filed at https://bugzilla.redhat.com/show_bug.cgi?id=1792088. The bug was caused by the switch to use blockdev. It was fixed in libvirt-6.0 which was released yesterday with the following patchset: commit f5259ba4027807e82ce040f63db40efe56e86925 Author: Peter Krempa <pkrempa@redhat.com> Date: Fri Dec 6 18:50:46 2019 +0100 qemu: migration: Properly setup mirror for blockdev configurations With blockdev we need to refer to the nodename of the disk source image as the source argument for the blockdev-mirror operation while still keeping the old job name. With blockdev we must also persist the job in qemu. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> commit 3e35156bd18badf9757cad0904493e7eda530320 Author: Peter Krempa <pkrempa@redhat.com> Date: Fri Dec 6 18:44:22 2019 +0100 qemu: migration: Mention disk target rather than the drive name in debug msg Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> commit 69abc80f5e58ba2c0f30e1d7296be8524631246d Author: Peter Krempa <pkrempa@redhat.com> Date: Fri Dec 6 17:47:46 2019 +0100 qemu: migration: Split out setup of the migration target Separate out allocation of the virStorageSource corresponding to the target NBD export of the migration. As part of the splitout we allocate the export name explicitly as that one must not change regardless whether blockdev is used or not to provide compatibility. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> commit 0d0b490a32be5cb4f8a3b103784e1f10ce6c51ce Author: Peter Krempa <pkrempa@redhat.com> Date: Fri Dec 6 17:46:29 2019 +0100 qemu: blockjob: Allow NULL 'mirror' for block copy jobs due to migration The non-shared-storage migration tracks the storage source used explicitly in the migration data so we must allow for processing of the block job which has NULL mirror as the mirror will not be populated. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> commit e1910a1f3b5a1926bc130ddd16ebee0a3cf8db27 Author: Peter Krempa <pkrempa@redhat.com> Date: Fri Dec 6 17:26:01 2019 +0100 qemu: migration: Simplify cleanup in qemuMigrationSrcNBDCopyCancelOne Now that the cleanup section does not exist remove the label. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> commit 37e801340ac6902e63e83983f5e606fbc38a23e6 Author: Peter Krempa <pkrempa@redhat.com> Date: Fri Dec 6 17:22:53 2019 +0100 qemu: migration: Access job name from job struct qemuMigrationSrcNBDCopyCancelOne uses the block job data structure but generated it's own job name rather than taking it from the block job data. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> commit 5339f57a0bf958f5c432c6ae6b655bf234ea0971 Author: Peter Krempa <pkrempa@redhat.com> Date: Fri Dec 6 17:02:33 2019 +0100 qemu: migration: Properly export backend for NBD storage migration With -blockdev we must use the nodename as the export but we must keep the name of the export as it was before to ensure compatiblity. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> commit 83137f5d3710ffe5a36ba9218ddc382d6675dc32 Author: Peter Krempa <pkrempa@redhat.com> Date: Fri Dec 6 16:54:33 2019 +0100 qemu: migration: Simplify handling of 'diskAlias' when adding NBD exports Declare the variable inside the loop with automatic clearing. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>