[libvirt] [bug report] Requested operation is not valid: migration with shmem device is not supported

1.Description of problem: It report use migration with shmem device is not supported , when I use the command "virsh migrate --live" to migrate a VM to another host. 2.Version-Release number of selected component (if applicable): libvirt 3.9.0 qemu-kvm 2.8.1 3.Steps to Reproduce: 1) Add serveral lines below to guest configuration <shmem name='my_shmem1'> <model type='ivshmem-plain'/> <size unit='M'>4</size> </shmem> 2) virsh start guest-1 3) virsh migrate --live guest-1 qemu+ssh://target/system Actual results: error: Requested operation is not valid: migration with shmem device is not supported 4.Code Review When using the command “virsh create guset-1.xml,it produce corresponding command below. “qemu-kvm -device ivshmem-plain, id=shmem0,memdev=shmmem-shmem0,bus=pci.0,addr=0xa” I read qemu-doc.texi in qemu-2.8.1 source code, which have a explain of migrating ivshmem below “With device property @option{master=on}, the guest will copy the shared memory on migration to the destination host. With @option{master=off}, the guest will not be able to migrate with the device attached.” But libvirt library can not recognize the property “master=on”. When I directly used command "qemu-kvm -device ivshmem-plain,id=shmem0,memdev=shmmem-shmem0,master=on,bus=pci.0,addr=0xa” to launch a guest, it can migrate in live. I review the code about qemu code with branch 2.8.1 and master from https://github.com/libvirt/libvirt, it have no configuration definition for “master=on” The below is the part of source code domain_conf.h struct _virDomainShmemDef { char *name; unsigned long long size; int model; /* enum virDomainShmemModel */ struct { bool enabled; virDomainChrSourceDef chr; } server; struct { bool enabled; unsigned vectors; virTristateSwitch ioeventfd; } msi; virDomainDeviceInfo info; };

On Mon, Dec 10, 2018 at 08:39:37 +0000, 吴 雨霖 wrote:
1.Description of problem:
It report use migration with shmem device is not supported , when I use the command "virsh migrate --live" to migrate a VM to another host.
Migration with shmem was specifically forbidden by commit: commit d17fab69be7a73336d388b805c282037ffb29647 Author: Martin Kletzander <mkletzan@redhat.com> Date: Tue Sep 20 11:24:49 2016 +0200 qemu: Disable migration with ivshmem It was never safe anyway and as such shouldn't have been enabled in the first place. Future patches will allow hot-(un)pluging of some ivshmem devices as a workaround. Signed-off-by: Martin Kletzander <mkletzan@redhat.com> That means that there are probably technical reasons which don't allow it to be migrated. Unfortunately the commit message does not go in depth enough here, but you'll need to prove that it's safe now if you ever want to add the support back.
participants (2)
-
Peter Krempa
-
吴 雨霖