Bug 1444421
| Summary: | Fail to start a domain which cpu part is generated by "cpu-baseline" | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Yanqiu Zhang <yanqzhan> |
| Component: | libvirt | Assignee: | Jiri Denemark <jdenemar> |
| Status: | CLOSED ERRATA | QA Contact: | Jing Qi <jinqi> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 7.4 | CC: | chayang, dyuan, ehabkost, fjin, jdenemar, juzhang, knoel, lizhu, michen, mzhan, rbalakri, virt-maint, xfu, xuzhang, yafu, yalzhang, yanqzhan, zhguo, zpeng |
| Target Milestone: | rc | Keywords: | Regression, TestBlocker |
| Target Release: | --- | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | libvirt-3.2.0-4.el7 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2017-08-02 00:08:25 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: | |||
All the features mentioned in the error message (ds, acpi, ht, tm, pbe, dtes64, monitor, ds_cpl, vmx, est, tm2, xtpr, pdcm) can't be enabled in a VCPU, so they are correctly being reported as unsupported. But I am not sure if this should be considered a real libvirt bug (that shouldn't report the features on virsh capabilities), or if this is invalid usage (is "virsh capabilities" output meant to report every feature in the host CPU, or only the ones that can be virtualized by KVM?). Moving to libvirt and reassigning to Jiri. This should already be fixed upstream by
commit 5b4a6adb5ca24a6cb91cdc55c31506fb278d3a91
Refs: v3.2.0-197-g5b4a6adb5
Author: Jiri Denemark <jdenemar>
AuthorDate: Tue Apr 11 20:46:05 2017 +0200
Commit: Jiri Denemark <jdenemar>
CommitDate: Wed Apr 19 16:36:38 2017 +0200
qemu: Use more data for comparing CPUs
With QEMU older than 2.9.0 libvirt uses CPUID instruction to determine
what CPU features are supported on the host. This was later used when
checking compatibility of guest CPUs. Since QEMU 2.9.0 we ask QEMU for
the host CPU data. But the two methods we use usually provide disjoint
sets of CPU features because QEMU/KVM does not support all features
provided by the host CPU and on the other hand it can enable some
feature even if the host CPU does not support them.
So if there is a domain which requires a CPU features disabled by
QEMU/KVM, libvirt will refuse to start it with QEMU > 2.9.0 as its guest
CPU is incompatible with the host CPU data we got from QEMU. But such
domain would happily start on older QEMU (of course, the features would
be missing the guest CPU). To fix this regression, we need to combine
both CPU feature sets when checking guest CPU compatibility.
https://bugzilla.redhat.com/show_bug.cgi?id=1439933
Signed-off-by: Jiri Denemark <jdenemar>
Verified this bug with libvirt-libs-3.2.0-4.el7.x86_64 and qemu-kvm-rhev-2.9.0-5.el7.x86_64. The issue in the bug is fixed. And there is a new bug found : 1450317 -"cpu-baseline" command doesn't deal with "cmt" feature. 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/RHEA-2017:1846 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/RHEA-2017:1846 |
Description of problem: Fail to start a domain which cpu part is generated by "cpu-baseline" Version-Release number of selected component (if applicable): qemu-kvm-rhev-2.9.0-1.el7.x86_64 How reproducible: 100% Steps to Reproduce: 1.prepare 2 hosts both have intel cpu hostA: # virsh capabilities <capabilities> <host> <uuid>4c4c4544-0038-3710-8048-c6c04f353358</uuid> <cpu> <arch>x86_64</arch> <model>Nehalem</model> <vendor>Intel</vendor> <topology sockets='1' cores='4' threads='2'/> <feature name='vme'/> <feature name='ds'/> <feature name='acpi'/> <feature name='ss'/> <feature name='ht'/> <feature name='tm'/> <feature name='pbe'/> <feature name='dtes64'/> <feature name='monitor'/> <feature name='ds_cpl'/> <feature name='vmx'/> <feature name='est'/> <feature name='tm2'/> <feature name='xtpr'/> <feature name='pdcm'/> <feature name='dca'/> <feature name='rdtscp'/> <feature name='invtsc'/> <pages unit='KiB' size='4'/> <pages unit='KiB' size='2048'/> </cpu> ... hostB:# virsh capabilities <capabilities> <host> <uuid>44454c4c-4d00-1046-8053-b8c04f563258</uuid> <cpu> <arch>x86_64</arch> <model>Penryn</model> <vendor>Intel</vendor> <topology sockets='1' cores='4' threads='1'/> <feature name='vme'/> <feature name='ds'/> <feature name='acpi'/> <feature name='ss'/> <feature name='ht'/> <feature name='tm'/> <feature name='pbe'/> <feature name='dtes64'/> <feature name='monitor'/> <feature name='ds_cpl'/> <feature name='vmx'/> <feature name='smx'/> <feature name='est'/> <feature name='tm2'/> <feature name='xtpr'/> <feature name='pdcm'/> <feature name='xsave'/> <feature name='osxsave'/> <pages unit='KiB' size='4'/> <pages unit='KiB' size='2048'/> </cpu> ... 2.define a domain on hostB [root@hostB ~]# virsh list --all Id Name State ---------------------------------------------------- - V shut off 3.generate cpu elements for migration copy the outputed cpu part of two hosts in step1 to a file "base2hostB.xml", then # virsh cpu-baseline base2hostB.xml <cpu mode='custom' match='exact'> <model fallback='allow'>Penryn</model> <vendor>Intel</vendor> <feature policy='require' name='vme'/> <feature policy='require' name='ds'/> <feature policy='require' name='acpi'/> <feature policy='require' name='ss'/> <feature policy='require' name='ht'/> <feature policy='require' name='tm'/> <feature policy='require' name='pbe'/> <feature policy='require' name='dtes64'/> <feature policy='require' name='monitor'/> <feature policy='require' name='ds_cpl'/> <feature policy='require' name='vmx'/> <feature policy='require' name='est'/> <feature policy='require' name='tm2'/> <feature policy='require' name='xtpr'/> <feature policy='require' name='pdcm'/> </cpu> 4. copy the output in step3 to replace the cpu part in domain xml, and try to start the domain [root@hostB ~]# virsh start V error: Failed to start domain V error: the CPU is incompatible with host CPU: Host CPU does not provide required features: ds, acpi, ht, tm, pbe, dtes64, monitor, ds_cpl, vmx, est, tm2, xtpr, pdcm Actual results: As in step4, fail to start a domain which cpu part is generated by "cpu-baseline" Expected results: Should succeed to start a domain which cpu part is generated by "cpu-baseline" Additional info: works well with qemu-kvm-rhev-2.8.0-6.el7.x86_64