Bug 1460952
| Summary: | Migration with 'migratable xml' fails due to CPU check | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Jingjing Shao <jishao> |
| Component: | libvirt | Assignee: | Jiri Denemark <jdenemar> |
| Status: | CLOSED ERRATA | QA Contact: | yalzhang <yalzhang> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 7.4 | CC: | dyuan, lhuang, lmiksik, rbalakri, xuzhang, yafu, yalzhang, zpeng |
| Target Milestone: | rc | Keywords: | Regression |
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | libvirt-3.2.0-10.el7 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2017-08-02 01:34:35 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
Sorry for the mistake on the actual results, it should be as below: There are difference from the migratable xml and dumpxml of gust, so the migration with migratable xml failed The difference between the two XML is correct and expected. But somehow libvirt doesn't use the right migratable XML internally to compare it with the XML provided by the user. Patches sent upstream for review: https://www.redhat.com/archives/libvir-list/2017-June/msg00610.html This is now fixed upstream by
commit 0810d4f5e0d77354cdf7ad56e1e8b7748bdb1501
Refs: v3.4.0-108-g0810d4f5e
Author: Jiri Denemark <jdenemar>
AuthorDate: Wed Jun 14 13:42:16 2017 +0200
Commit: Jiri Denemark <jdenemar>
CommitDate: Wed Jun 14 17:04:12 2017 +0200
qemu: Introduce qemuDomainDefFromXML helper
The main goal of this function is to enable reusing the parsing code
from qemuDomainDefCopy.
Signed-off-by: Jiri Denemark <jdenemar>
Reviewed-by: Pavel Hrdina <phrdina>
commit a0912df3faac8b58725f45b8cf928990999585a3
Refs: v3.4.0-109-ga0912df3f
Author: Jiri Denemark <jdenemar>
AuthorDate: Wed Jun 14 13:43:12 2017 +0200
Commit: Jiri Denemark <jdenemar>
CommitDate: Wed Jun 14 17:04:32 2017 +0200
qemu: Add qemuDomainMigratableDefCheckABIStability
This patch separates the actual ABI checks from getting migratable defs
in qemuDomainDefCheckABIStability so that we can create another wrapper
which will use different methods to get the migratable defs.
Signed-off-by: Jiri Denemark <jdenemar>
Reviewed-by: Pavel Hrdina <phrdina>
commit 063b2b8788db204d0ac2e1d367fd0c5eb9b81451
Refs: v3.4.0-110-g063b2b878
Author: Jiri Denemark <jdenemar>
AuthorDate: Wed Jun 14 13:43:37 2017 +0200
Commit: Jiri Denemark <jdenemar>
CommitDate: Wed Jun 14 17:08:16 2017 +0200
qemu: Add qemuDomainCheckABIStability
When making ABI stability checks for an active domain, we need to make
sure we use the same migratable definition which virDomainGetXMLDesc
with the MIGRATABLE flag provides, otherwise the ABI check will fail.
This is implemented in the new qemuDomainCheckABIStability which takes a
domain object and generates the right migratable definition from it.
Signed-off-by: Jiri Denemark <jdenemar>
Reviewed-by: Pavel Hrdina <phrdina>
commit f0a3fe1b0a2996272dd167501bb5de752d9d1956
Refs: v3.4.0-111-gf0a3fe1b0
Author: Jiri Denemark <jdenemar>
AuthorDate: Wed Jun 14 14:56:21 2017 +0200
Commit: Jiri Denemark <jdenemar>
CommitDate: Wed Jun 14 17:13:24 2017 +0200
qemu: Use qemuDomainCheckABIStability where needed
Most places which want to check ABI stability for an active domain need
to call this API rather than the original
qemuDomainDefCheckABIStability. The only exception is in snapshots where
we need to decide what to do depending on the saved image data.
https://bugzilla.redhat.com/show_bug.cgi?id=1460952
Signed-off-by: Jiri Denemark <jdenemar>
Reviewed-by: Pavel Hrdina <phrdina>
Reproduce this bug on libvirt-3.2.0-9.el7.x86_64, and test on libvirt-3.2.0-10.el7.x86_64, the result is as expected, set this bug to be verified.
1. prepare the guest:
# virsh dumpxml rhel7.4 | grep /cpu -B2
<cpu mode='custom' match='exact' check='partial'>
<model fallback='forbid'>Westmere</model>
</cpu>
2. migrate succeed with the migratable xml.
# virsh start rhel7.4
Domain rhel7.4 started
# virsh dumpxml rhel7.4 --migratable > rhel7.4.xml
# virsh migrate rhel7.4 --live qemu+ssh://server74/system --verbose --xml rhel7.4.xml
root@server74's password:
Migration: [100 %]
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://access.redhat.com/errata/RHEA-2017:1846 |
Description of problem: Migration with 'migratable xml' fails due to CPU check Version-Release number of selected component (if applicable): libvirt-3.2.0-9.el7.x86_64 How reproducible: 100% Steps to Reproduce: 1.Prepare a guest # virsh dumpxml V | grep cpu -A4 <cpu mode='custom' match='exact' check='partial'> <model fallback='forbid'>Westmere</model> </cpu> 2. # virsh start V Domain V started # virsh list --all Id Name State ---------------------------------------------------- 8 V running 3. Get the migratable xml # virsh dumpxml --migratable V > V.xml Check migratable xml ... <cpu mode='custom' match='exact' check='partial'> <model fallback='forbid'>Westmere</model> </cpu> ... 4. Check the dumpxml of guest V # virsh dumpxml V | grep cpu -A8 <cpu mode='custom' match='exact' check='full'> <model fallback='forbid'>Westmere</model> <feature policy='require' name='vme'/> <feature policy='require' name='pclmuldq'/> <feature policy='require' name='x2apic'/> <feature policy='require' name='hypervisor'/> <feature policy='require' name='arat'/> </cpu> 5.# virsh migrate V qemu+ssh://xx.xx.xx.xx/system --verbose --xml V.xml error: unsupported configuration: Target CPU feature count 0 does not match source 5 Actual results: There are difference from the migratable xml and dumpxml of gust, so the migration with migratable xml fa llcd hey oj和有iled Expected results: The migration should succeed. Additional info: On the libvirt-2.0.0-10.el7_3.9.x86_64, the migration with migratable xml succeed