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 1459906 - The guest with intel-iommu device enabled can not restore after managedsave
Summary: The guest with intel-iommu device enabled can not restore after managedsave
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm-rhev
Version: 7.4
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Peter Xu
QA Contact: jingzhao
URL:
Whiteboard:
Depends On:
Blocks: 1473046
TreeView+ depends on / blocked
 
Reported: 2017-06-08 14:07 UTC by yafu
Modified: 2018-04-11 00:25 UTC (History)
17 users (show)

Fixed In Version: qemu-kvm-rhev-2.10.0-1.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-04-11 00:23:04 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
qemu log (63.99 KB, text/plain)
2017-06-13 15:24 UTC, yafu
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2018:1104 0 None None None 2018-04-11 00:25:33 UTC

Description yafu 2017-06-08 14:07:51 UTC
Description of problem:
The guest with intel-iommu device enabled can not restore after managedsave.

Version-Release number of selected component (if applicable):
libvirt-3.2.0-9.virtcov.el7.x86_64
qemu-kvm-rhev-2.9.0-8.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1.Prepare a guest with q35 machine type and enable the intel-iommu device:
...
<os>
    <type arch='x86_64' machine='pc-q35-rhel7.4.0'>hvm</type>  -
    <boot dev='hd'/>
</os>
...
<iommu model='intel'/>
</devices>
...

2.start the guest:
#virsh start vm1-q35

3.Enable iommu in the guest:
(1)Edit file  "/etc/default/grub":
Append "intel_iommu=on" or "amd_iommu=on" to the value of "GRUB_CMDLINE_LINUX=......". Such as the following one:
GRUB_CMDLINE_LINUX="rd.md=0 rd.lvm=0 rd.dm=0 vconsole.keymap=us $([ -x /usr/sbin/rhcrashkernel-param ] && /usr/sbin/rhcrashkernel-param || :) rd.luks=0 vconsole.font=latarcyrheb-sun16 rhgb quiet intel_iommu=on"

(2)Then run the following command to generate the updated grub file:
# grub2-mkconfig -o /boot/grub2/grub.cfg
Reboot the guest.

4.Do managedsave:
#virsh managedsave vm1-q35
Domain vm1-q35 state saved by libvirt

5.Start the guest:
#virsh start vm1-q35
# virsh start vm1-q35
error: Failed to start domain vm1-q35
error: operation failed: job: unexpectedly failed

Actual results:
The guest with intel-iommu device enabled can not restore after managedsave. 

Expected results:
If the guest with intel-iommu device enabled can not restored after managedsave, libvirt should reject to do managedsave with the guest.

Additional info:
Could see the info below in the libvirtd.log:
Jun  8 09:58:43 localhost libvirtd: 22164: error : qemuMigrationCheckJobStatus:1425 : operation failed: job: unexpectedly failed
Jun  8 09:58:43 localhost systemd-machined: Machine qemu-2-vm1-q35 terminated.
Jun  8 09:58:43 localhost libvirtd: 22164: warning : qemuDomainObjStart:7112 : Unable to restore from managed state /var/lib/libvirt/qemu/save/vm1-q35.save. Maybe the file is corrupted

Comment 3 Ján Tomko 2017-06-13 15:15:42 UTC
Could you attach the qemu log?

Comment 4 yafu 2017-06-13 15:24:42 UTC
Created attachment 1287372 [details]
qemu log

Comment 8 Peter Xu 2017-06-29 04:34:36 UTC
It's a regression upstream as well. Fix posted upstream:

https://lists.gnu.org/archive/html/qemu-devel/2017-06/msg06545.html

Will backport when merged.

Peter

Comment 12 jingzhao 2017-10-17 05:45:10 UTC
Reproduce the issue on qemu-kvm-rhev-2.9.0-16.el7_4.9.x86_64 and verified it on qemu-kvm-rhev-2.10.0-2.el7.x86_64

changed to verified status

Thanks
Jing

Comment 14 errata-xmlrpc 2018-04-11 00:23:04 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/RHSA-2018:1104


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