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
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:
Keywords:
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)

(edit)
Clone Of:
(edit)
Last Closed: 2018-04-11 00:23:04 UTC


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


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2018:1104 None None None 2018-04-11 00:25 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 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.