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 955484 - 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 CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.0
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Ján Tomko
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-04-23 06:52 UTC by zhenfeng wang
Modified: 2014-06-18 00:48 UTC (History)
8 users (show)

Fixed In Version: libvirt-1.1.0-1.el7
Doc Type: Bug Fix
Doc Text:
Clone Of: 834196
Environment:
Last Closed: 2014-06-13 10:20:56 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Comment 2 Ján Tomko 2013-06-13 15:34:19 UTC
Now fixed upstream:
commit 07966f6a8b5ccb5bb4c716b25deb8ba2e572cc67
Author:     Ján Tomko <jtomko>
AuthorDate: 2013-06-11 15:03:17 +0200
Commit:     Ján Tomko <jtomko>
CommitDate: 2013-06-13 16:58:30 +0200

    qemu: allow restore with non-migratable XML input
    
    Convert input XML to migratable before using it in
    qemuDomainSaveImageOpen.
    
    XML in the save image is migratable, i.e. doesn't contain implicit
    controllers. If these controllers were in a non-default order in the
    input XML, the ABI check would fail. Removing and re-adding these
    controllers fixes it.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=834196
                                                                                                                                         
git describe: v1.0.6-70-g07966f6

Comment 3 zhenfeng wang 2013-07-04 06:26:46 UTC
Hi Jan,
I verify this bug with libvirt-1.1.0-1.el7.x86_64,The guest can be restored with the xml successfully,however,I found an issue that the usb controller wasn't included in the save image while there was just one usb controller in the guest,however,the usb controller will be included in the save image while there were two usb controllers in the guest,even so ,the guest can still be restored with the xml,so i wonder that whether this was the expect result ? also is it enough to verify this bug with the following steps ? thanks

Steps to Reproduce:
1.start a guest with the default xml configuration which has one usb controller
#virsh dumpxml rhel7 |grep usb
    <controller type='usb' index='0'>

2.# virsh dumpxml rhel7 > rhel7.xml

3.Copy the image of guest to /tmp/
# cp /var/lib/libvirt/images/rhel7.img /tmp/

4.Edit rhel7.xml to change /var/lib/libvirt/images/rhel7.img to /tmp/rhel7.img

5.Save the guest with --xml 
# virsh save rhel6 rhel7.save --xml rhel7.xml 

6. Check that xml embedded in binary rhel6.save did change,and the usb controller was not included in the save file
#vim rhel7.save  

7. Restore guest with --xml ,The guest can be restored successfully and left where it was saved
# virsh restore rhel7.save --xml rhel7.xml 
Domain restored from rhel7.save

8.check the guest's xml, the usb controller and other device has been re-added to the guest's xml
#virsh dumpxml rhel7 >rhel72.xml

compare the guest's xml ,almost the same with the previous
diff rhel71.xml rhel72.xml

< <domain type='kvm' id='2'>
---
> <domain type='kvm' id='3'>
79,80c79,80
<     <label>system_u:system_r:svirt_t:s0:c565,c683</label>
<     <imagelabel>system_u:object_r:svirt_image_t:s0:c565,c683</imagelabel>
---
>     <label>system_u:system_r:svirt_t:s0:c24,c869</label>
>     <imagelabel>system_u:object_r:svirt_image_t:s0:c24,c869</imagelabel>

9.retest the upper steps on the migration environment,then, migrate the restored guest to the target, the guest can be migrated successfully

10.detroy the guest,add another usb controller to the guest's xml
#virsh dumpxml rhel7|grep usb
# virsh dumpxml rhel72 |grep usb
    <controller type='usb' index='0'>
      <alias name='usb0'/>
    <controller type='usb' index='1'>
      <alias name='usb1'/>
11.Re-test the uppper 2-5 steps, then,check the save img,find that the usb controller will be included in the save img
vim rhel7.save
--
 <controller type='usb' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
    </controller>
    <controller type='usb' index='1'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
    </controller>
--
12.restore the guest with the xml,can gust can be restorted successfully
# virsh restore rhel72.save --xml rhel72.xml 
Domain restored from rhel72.save

13.retest the upper steps on the migration environment,then, migrate the restored guest to the target, the guest can be migrated successfully

Comment 4 Ján Tomko 2013-07-04 13:02:57 UTC
If there is only one usb controller (with the default model), it is intentionally removed to be compatible with older versions of libvirt which didn't know the XML syntax, but they did provide an USB controller.

Multiple USB controllers weren't supported by those versions of libvirt, which is why they stay in the XML.

And yes, these steps seem sufficient to verify this bug.

Comment 5 zhenfeng wang 2013-07-05 02:50:58 UTC
Thanks for Jan's quick reply,base the comment 4,set this bug verified

Comment 6 Ludek Smid 2014-06-13 10:20:56 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.


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