Bug 1151885
| Summary: | libvirtd loses track of a running restored guest with host-passthrough cpu | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Luyao Huang <lhuang> |
| Component: | libvirt | Assignee: | Ján Tomko <jtomko> |
| Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 7.1 | CC: | dyuan, jtomko, lmiksik, mzhan, rbalakri, shyu, zhwang, zpeng |
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | libvirt-1.2.8-11.el7 | Doc Type: | Bug Fix |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2015-03-05 07:46:20 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Luyao Huang
2014-10-13 01:26:08 UTC
Fixed upstream by:
commit 15abebdecb35308ddd4d2967efa6dffa4842fac9
Author: Ján Tomko <jtomko>
CommitDate: 2014-12-11 12:03:36 +0100
Ignore CPU features without a model for host-passthrough
This fixes reverting to snapshots created by older libvirt
and allows libvirt not to lose track of a domain that
has this in its live status XML (such as a domain
restored from managedsave)
https://bugzilla.redhat.com/show_bug.cgi?id=1030793
https://bugzilla.redhat.com/show_bug.cgi?id=1151885
commit dd324bb2703b9cf619c521b2a04f186cd9734f0a
Author: Ján Tomko <jtomko>
CommitDate: 2014-12-11 12:03:36 +0100
Do not format CPU features without a model
For host-passthrough CPU we don't honor the CPU
features specified in the XML, but we allow
outputting them via the UPDATE_CPU flag for dumpxml,
this gives user a rough idea of what features the CPU
might have.
After restoring a managedsave'd domain, the features
might end up in the live status XML (in /var/run) without
the model. This XML cannot be parsed by the daemon after
restart and the domain might disappear.
This fix skips formatting the features for HOST_PASSTHROUGH
when UPDATE_CPU is not specified, so the newly restored domains
and newly created snapshots won't be affected.
Note: this doesn't fix existing snapshots or already restored
running domains.
https://bugzilla.redhat.com/show_bug.cgi?id=1030793
https://bugzilla.redhat.com/show_bug.cgi?id=1151885
git describe: v1.2.11-rc2-5-g15abebd
Reproduce this bug with libvirt-1.2.8-5.el7.x86_64 1.Prepare a guest with host-passthrough cpu, but without cpu-model #virsh dumpxml rhel7.0 -- <cpu mode='host-passthrough'> </cpu> 2.Start the guest, then do live snapshot with the guest #virsh start rhel7.0 Domain rhel7.0 started #virsh snapshot-create-as rhel7.0 sp1 Domain snapshot sp1 created # virsh snapshot-list rhel7.0 Name Creation Time State ------------------------------------------------------------ sp1 2014-12-26 13:08:00 +0800 running 3.Rever the snapshot with sp1, will fail to revert it # virsh snapshot-revert rhel7.0 sp1 error: XML error: Non-empty feature list specified without CPU model 4.Managedsave the guest, then re-start it # virsh managedsave rhel7.0 Domain rhel7.0 state saved by libvirt # virsh start rhel7.0 Domain rhel7.0 started 5.Restart the libvirtd service, found the guest will be shutoff #service libvirtd restart # virsh list --all Id Name State ---------------------------------------------------- - rhel7.0 shut off could get the following error from the qemu's log -- Domain id=3 is tainted: host-cpu Got following error info from libvirt 2014-12-26 06:33:04.288+0000: 25776: info : libvirt version: 1.2.8, package: 5.el7 (Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>, 2014-10-09-08:52:56, x86-030.build.eng.bos.redhat.com) 2014-12-26 06:33:04.288+0000: 25776: error : virCPUDefParseXML:371 : XML error: Non-empty feature list specified without CPU model 2014-12-26 06:33:14.975+0000: 25768: warning : qemuDomainObjTaint:1899 : Domain id=2 name='rhel7.0' uuid=3725ae82-5bba-4e7a-afc4-0423ad8d0e65 is tainted: host-cpu 2014-12-26 06:34:39.536+0000: 25769: warning : virFileWrapperFdClose:326 : iohelper reports: 2014-12-26 06:34:44.714+0000: 25770: warning : qemuDomainObjTaint:1899 : Domain id=3 name='rhel7.0' uuid=3725ae82-5bba-4e7a-afc4-0423ad8d0e65 is tainted: host-cpu 2014-12-26 06:35:10.437+0000: 26194: info : libvirt version: 1.2.8, package: 5.el7 (Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>, 2014-10-09-08:52:56, x86-030.build.eng.bos.redhat.com) 2014-12-26 06:35:10.437+0000: 26194: error : virCPUDefParseXML:371 : XML error: Non-empty feature list specified without CPU model Verify this bug with libvirt-1.2.8-11.el7 Excute the steps in reproduce steps, the guest could do snapshot-revert successfully and also the guest keep in running status after restart the libvirtd service, so mark this bug verifed 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/RHSA-2015-0323.html |