Red Hat Bugzilla – Bug 1265049
Offline migration failed with memory device when guest is shutoff.
Last modified: 2016-11-03 14:24:56 EDT
Description of problem: Configure the guest xml with memory device: <memory model='dimm'> <target> <size unit='KiB'>256000</size> <node>0</node> </target> </memory> Then do offline migration and failed: # virsh migrate test4 qemu+ssh://10.66.4.226/system --offline --persistent root@10.66.4.226's password: error: Requested operation is not valid: domain's dimm info lacks slot ID or base address Version-Release number of selected component (if applicable): libvirt-1.2.17-9.el7.x86_64 How reproducible: 100% Steps to Reproduce: 1.Configure the guest xml with memory device: <memory model='dimm'> <target> <size unit='KiB'>256000</size> <node>0</node> </target> </memory> 2.When the guest is shutoff, do offline migration: # virsh migrate test4 qemu+ssh://10.66.4.226/system --offline --persistent root@10.66.4.226's password: error: Requested operation is not valid: domain's dimm info lacks slot ID or base address 3.Start the guest, then do offline migration again and succeed. Actual results: Offline migration failed when guest is shutoff. Expected results: Offline migration can succeed when guest is shutoff.
2015-09-24 07:59:23.506+0000: 209905: debug : qemuMigrationIsAllowed:2253 : Requested operation is not valid: domain's dimm info lacks slot ID or base address qemuMigrationIsAllowed rejects the migration even if we are migrating offline. The function will need to be modified to skip certain checks when doing offline migration.
Fixed upstream: commit 01b4baba59db2478ad260ebc61693a2325229f5b Author: Peter Krempa <pkrempa@redhat.com> Date: Tue Oct 6 17:02:09 2015 +0200 qemu: migration: Skip few checks while doing offline migration qemuMigrationIsAllowed would disallow offline migration if the VM contained host devices or memory modules. Since during offline migration we don't transfer any state we can safely migrate VMs with such configuration. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1265049 commit b6c44af0f7edb9eec3d3ba2dd1a423f17bf0e633 Author: Peter Krempa <pkrempa@redhat.com> Date: Tue Oct 6 16:24:48 2015 +0200 qemu: migration: Use migration flags in qemuMigrationIsAllowed Use the migration @flags for checking various migration aspects rather than picking them out as booleans. Document the new semantics in the function header. commit f558c66f17e633ae912e339bd196fcd4861a61a8 Author: Peter Krempa <pkrempa@redhat.com> Date: Tue Oct 6 15:53:02 2015 +0200 qemu: migration: Drop @def from qemuMigrationIsAllowed Now that qemuMigrationIsAllowed is always called with @vm, we can drop the @def argument and simplify the control flow. Additionally the comment is invalid so drop it. commit b866991f0c47c95a97ae4440eef99592b27bb8a8 Author: Peter Krempa <pkrempa@redhat.com> Date: Tue Oct 6 15:39:48 2015 +0200 qemu: migration: Split source and destination migration checks Extract the hostdev check from qemuMigrationIsAllowed into a separate function since that is the only part that needs to be done in the v2 migration protocol prepare phase on the destination. All other checks were added when the v3 protocol existed so they don't need to be extracted. This change will allow to drop the @def argument for qemuMigrationIsAllowed and further simplify the function.
Test pass with build libvirt-1.3.2-1.el7.x86_64. Steps are as comment 0
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHSA-2016-2577.html