Description of problem: libvirt-1.2.7 was compiled and installed. qemu-2.1.0 was compiled and installed. When we're trying to start a VM using virt-install, libvirt throws back the following error message: Fri, 22 Aug 2014 22:14:23 DEBUG Removing /var/lib/libvirt/boot/virtinst-vmlinuz.TJ4UiJ Fri, 22 Aug 2014 22:14:23 DEBUG Removing /var/lib/libvirt/boot/virtinst-initrd.img.oM_Gbt Fri, 22 Aug 2014 22:14:23 ERROR unsupported configuration: host doesn't support invariant TSC Fri, 22 Aug 2014 22:14:23 DEBUG Traceback (most recent call last): File "/usr/sbin/virt-install", line 629, in start_install noboot=options.noreboot) File "/usr/lib/python2.6/site-packages/virtinst/Guest.py", line 1223, in start_install noboot) File "/usr/lib/python2.6/site-packages/virtinst/Guest.py", line 1291, in _create_guest dom = self.conn.createLinux(start_xml or final_xml, 0) File "/usr/lib64/python2.6/site-packages/libvirt.py", line 3320, in createLinux if ret is None:raise libvirtError('virDomainCreateLinux() failed', conn=self) libvirtError: unsupported configuration: host doesn't support invariant TSC Fri, 22 Aug 2014 22:14:23 DEBUG Domain installation does not appear to have been successful. Version-Release number of selected component (if applicable): qemu-2.1.0 libvirt-1.2.7 How reproducible: Always Steps to Reproduce: 1. Install libvirt-1.2.7 2. Install qemu-2.10 3. Try to run virt-install virt-install -d --connect qemu:///system --name centos-7-x86_64 --ram 4096 --vcpus 2 --vnc --vnclisten 0.0.0.0 --os-type=linux --os-variant=rhel6 --location http://centos.mirror.iweb.ca/7/os/x86_64/ --initrd-inject=centos7.ks --extra-args="ks=file:/centos7.ks ip=dhcp" --disk=${installpath}${tmp}/centos-7-x86_64.qcow2,size=20,bus=virtio,format=qcow2 --force --network=bridge:br100,model=virtio,mac=${mac} --noautoconsole --accelerate --noapic --keymap=en-us -v --cpu host Actual results: See above Expected results: Should launch the installation Additional info: email be if you need more info
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. ***