RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1460952 - Migration with 'migratable xml' fails due to CPU check
Summary: Migration with 'migratable xml' fails due to CPU check
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.4
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Jiri Denemark
QA Contact: yalzhang@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-06-13 08:50 UTC by Jingjing Shao
Modified: 2017-08-02 01:34 UTC (History)
8 users (show)

Fixed In Version: libvirt-3.2.0-10.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-02 01:34:35 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2017:1846 0 normal SHIPPED_LIVE libvirt bug fix and enhancement update 2017-08-01 18:02:50 UTC

Description Jingjing Shao 2017-06-13 08:50:34 UTC
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

Comment 3 Jingjing Shao 2017-06-13 08:57:36 UTC
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

Comment 4 Jiri Denemark 2017-06-13 10:49:02 UTC
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.

Comment 5 Jiri Denemark 2017-06-14 14:19:12 UTC
Patches sent upstream for review: https://www.redhat.com/archives/libvir-list/2017-June/msg00610.html

Comment 6 Jiri Denemark 2017-06-14 15:22:14 UTC
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>

Comment 9 yalzhang@redhat.com 2017-06-18 06:31:00 UTC
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 %]

Comment 10 errata-xmlrpc 2017-08-02 01:34:35 UTC
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


Note You need to log in before you can comment on or make changes to this bug.