Bug 1133155
Summary: | virt-install --cpu host should use host-model if libvirt supports it | |||
---|---|---|---|---|
Product: | [Community] Virtualization Tools | Reporter: | David Hill <dhill> | |
Component: | virt-manager | Assignee: | Cole Robinson <crobinso> | |
Status: | CLOSED UPSTREAM | QA Contact: | ||
Severity: | low | Docs Contact: | ||
Priority: | unspecified | |||
Version: | unspecified | CC: | asegundo, berrange, crobinso, ddu, dhill, gscrivan, gshereme, jtomko, noel, rbalakri, rharwood | |
Target Milestone: | --- | |||
Target Release: | --- | |||
Hardware: | x86_64 | |||
OS: | Linux | |||
Whiteboard: | ||||
Fixed In Version: | Doc Type: | Bug Fix | ||
Doc Text: | Story Points: | --- | ||
Clone Of: | ||||
: | 1188245 (view as bug list) | Environment: | ||
Last Closed: | 2014-09-21 00:45:43 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: | ||||
Bug Depends On: | ||||
Bug Blocks: | 1188245 |
Description
David Hill
2014-08-22 22:16:19 UTC
Seems like the following patch is causing me issues: https://gitorious.org/libvirt/libvirt/commit/fba6bc47cbcabbe08d42279691efb0dff3b9c997 Those are the flags my CPUs have: lags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm dca sse4_1 sse4_2 popcnt lahf_lm ida dtherm tpr_shadow vnmi flexpriority ept vpid flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm dca sse4_1 sse4_2 popcnt lahf_lm ida dtherm tpr_shadow vnmi flexpriority ept vpid flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm dca sse4_1 sse4_2 popcnt lahf_lm ida dtherm tpr_shadow vnmi flexpriority ept vpid flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm dca sse4_1 sse4_2 popcnt lahf_lm ida dtherm tpr_shadow vnmi flexpriority ept vpid flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm dca sse4_1 sse4_2 popcnt lahf_lm ida dtherm tpr_shadow vnmi flexpriority ept vpid flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm dca sse4_1 sse4_2 popcnt lahf_lm ida dtherm tpr_shadow vnmi flexpriority ept vpid flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm dca sse4_1 sse4_2 popcnt lahf_lm ida dtherm tpr_shadow vnmi flexpriority ept vpid flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm dca sse4_1 sse4_2 popcnt lahf_lm ida dtherm tpr_shadow vnmi flexpriority ept vpid Ok, I managed to get it going by a adding this : --cpu Nehalem,-invtsc to the command line instead of --cpu host,-invtsc. This part on the QEMU wiki (http://wiki.qemu.org/ChangeLog/2.1) got me consued... KVM New "invtsc" (Invariant TSC) CPU feature. When enabled, this will block migration and savevm, so it is not enabled by default on any CPU model. To enable invtsc, the migratable=no flag (supported only by -cpu host, by now) is required. So, invtsc is available only if using: -cpu host,migratable=no,+invtsc. It says it is not enabled by default but it is actually ... for some reasons. It is not enabled by default in QEMU or libvirt, the problem is that virt-install with --cpu host tries to copy all the features that are present on the host CPU, adding: <feature policy='require' name='invtsc'/> to the domain XML, even if the feature is not supported by KVM or QEMU. (And if it is supported, the domain with the feature will be unable to migrate.) David, does --cpu host-model work for you? (not that I'm saying that's the permanent solution, I'm just wondering if libvirt has the same problem) Libvirt's host-model had the same problem, but it should be fixed in upstream git, see bug 1138221. Okay since host-model will protect us from this stuff, we should use it for --cpu host if libvirt is new enough (virt-install's --cpu host functionality predates host-model). Also need to check that virt-manager isn't using the custom 'copy' behavior either Fixed upstream now: commit b0d5198b7abdb1ac48709b991d84ca3259ecb9aa Author: Cole Robinson <crobinso> Date: Sat Sep 20 20:40:05 2014 -0400 virt-manager: Switch 'Copy host' to use host-model (bz 1133155) Similar to the previous change for virt-install commit eda5eea549dabb7d8dcaf5573d5f0cc0c3854e5e Author: Cole Robinson <crobinso> Date: Sat Sep 20 20:40:14 2014 -0400 virt-install: Switch --cpu host to use host-model, not copy (bz 1133155) host-model offers us other protections now, like ensuring we don't try to use a host cpu feature that qemu doesn't support. http://bugzilla.redhat.com/show_bug.cgi?id=1133155 *** Bug 1145293 has been marked as a duplicate of this bug. *** One cu set 'Copy host CPU congiguation' in virt-manager, then the vm cannot boot up. It seems to be the same bug. Do we have any plan to fix it in the future? (In reply to ddu from comment #11) > One cu set 'Copy host CPU congiguation' in virt-manager, then the vm cannot > boot up. It seems to be the same bug. Do we have any plan to fix it in the > future? You need to file a separate bug report and give complete details about your virt-install version and host OS, and the error message Cu didn't use virt-install, but after the vm is installed, he just set 'Copy host CPU configuration' to copy host cpu configuration to vm, which cause 'invtsc' to be copied to vm setting, then vm cannot boot up. After comment out 'invtsc' line in the setting file, vm can boot up normally. So I think this is the same bug. *** Bug 1243932 has been marked as a duplicate of this bug. *** |