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 1180521 - Domain restore fails from a saved state in a file with xml option.
Summary: Domain restore fails from a saved state in a file with xml option.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.3
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Ján Tomko
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On: 834196
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-01-09 10:52 UTC by Jan Kurik
Modified: 2015-01-30 21:13 UTC (History)
18 users (show)

Fixed In Version: libvirt-0.10.2-46.el6_6.3
Doc Type: Bug Fix
Doc Text:
Cause: Libvirtd converted the user-specified domain XML to migratable form before comparing it against the domain XML stored in the save file, but for external snapshots, non-migratable XML was stored in the save file. Consequence: Restore from an external snapshot with user-specified XML was impossible, because it failed the ABI stability check. Fix: Use migratable XML in save files for external snapshots as well to fix this for new saves. Do the ABI stability check against the user-specified XML directly if it fails against the migratable form, to allow restoring saves from older libvirt. Result: Restore works with XML in both migratable and non-migratable form.
Clone Of: 834196
Environment:
Last Closed: 2015-01-30 21:13:38 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:0106 0 normal SHIPPED_LIVE libvirt bug fix update 2015-01-31 02:12:50 UTC

Description Jan Kurik 2015-01-09 10:52:09 UTC
This bug has been copied from bug #834196 and has been proposed
to be backported to 6.6 z-stream (EUS).

Comment 5 Luyao Huang 2015-01-28 07:58:45 UTC
I can reproduce this issue with libvirt-0.10.2-46.el6.x86_64:

1. # virsh dumpxml r6
    <controller type='usb' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
    </controller>
    <controller type='ccid' index='0'/>

2. # virsh start r6

3.# virsh dumpxml r6 > r6.xml
4.# virsh dumpxml r6 --migratable > r6mig.xml

5.edit r6.xml and r6mig.xml and change disk path to /tmp/r6.img
# vim r6mig.xml
# vim r6.xml

6.# virsh save r6 r6.save --xml r6.xml

Domain r6 saved to r6.save

7. check the r6.save if the disk path have been changed:

# vim r6.save

8. restore vm and will failed with r6.xml:

# virsh restore r6.save --xml r6.xml
error: Failed to restore domain from r6.save
error: unsupported configuration: Target controller type usb does not match source ccid

# virsh restore r6.save --xml r6mig.xml
Domain restored from r6.save

And verify this issue with libvirt-0.10.2-46.el6_6.3.x86_64:

1. update libvirt to libvirt-0.10.2-46.el6_6.3.x86_64 and use old save file test:
# yum update libvirt*

2.# virsh restore r6.save --xml r6.xml
Domain restored from r6.save

3.# virsh destroy r6
Domain r6 destroyed

4.# virsh restore r6.save --xml r6mig.xml
Domain restored from r6.save

5. retest with the reproduce steps:

# virsh start r6

# virsh dumpxml r6 > r6.xml
# virsh dumpxml r6 --migratable > r6mig.xml

6.edit r6.xml and r6mig.xml and change disk path to /tmp/r6.img
# vim r6mig.xml
# vim r6.xml

7.save 
# virsh save r6 r6.save --xml r6.xml
Domain r6 saved to r6.save

8.restore
# virsh restore r6.save --xml r6.xml
Domain restored from r6.save

# virsh destroy r6
Domain r6 destroyed

# virsh restore r6.save --xml r6mig.xml
Domain restored from r6.save

And also test with snapshot (although we do not support it).

But i found this cannot work when vm use:
  <cpu mode='host-passthrough'>
  </cpu>

# virsh dumpxml r6 > r6.xml
# vim r6.xml (change path to /tmp/r6)
# virsh save r6 r6.save --xml r6.xml

Domain r6 saved to r6.save

# virsh restore r6.save --xml r6.xml
error: Failed to restore domain from r6.save
error: unsupported configuration: Target CPU model (null) does not match source SandyBridge

And also found this issue with rhel7.1 (and i think maybe the same with bug 1183869)

Comment 6 Luyao Huang 2015-01-28 08:03:13 UTC
Hi Jan,

Would you please help me to checkout if steps in comment 5 is ok to verify this bug? and is the last issue i met is a issue need fix in rhel6? 

Thanks in advance for your answer.

Comment 7 Ján Tomko 2015-01-28 17:59:39 UTC
The verification steps are correct.

I don't think restore with XML that wasn't generated with --migratable or --update-cpu is worth fixing in RHEL 6.

Comment 8 Luyao Huang 2015-01-29 00:35:27 UTC
(In reply to Jan Tomko from comment #7)
> The verification steps are correct.
> 
> I don't think restore with XML that wasn't generated with --migratable or
> --update-cpu is worth fixing in RHEL 6.

Thanks for your reply and verify this bug with comment 5

Comment 10 errata-xmlrpc 2015-01-30 21:13:38 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://rhn.redhat.com/errata/RHBA-2015-0106.html


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