[libvirt-users] Why Guest does not retain Host CPU flags

hi , I am creating Guest by Libvirt tool " virt-install" with cpu model as host. After Guest creation i see Guest Missing quite no of flags which Host was having . What could be the reason for this ? I am expecting all flags of Host to e present in Guest as well when choosing cpu model as host . Guest : processor : 19 vendor_id : GenuineIntel cpu family : 6 model : 42 model name : Intel Xeon E312xx (Sandy Bridge) stepping : 1 microcode : 0x1 cpu MHz : 1995.266 cache size : 4096 KB fpu : yes fpu_exception : yes cpuid level : 13 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl eagerfpu pni pclmulqdq vmx ssse3 cx16 pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx hypervisor lahf_lm xsaveopt tpr_shadow vnmi flexpriority ept vpid bogomips : 4013.27 clflush size : 64 cache_alignment : 64 address sizes : 46 bits physical, 48 bits virtual power management: HOst : processor : 23 vendor_id : GenuineIntel cpu family : 6 model : 45 model name : Intel(R) Xeon(R) CPU E5-2620 0 @ 2.00GHz stepping : 7 microcode : 0x710 cpu MHz : 1400.000 cache size : 15360 KB physical id : 1 siblings : 12 core id : 5 cpu cores : 6 apicid : 43 initial apicid : 43 fpu : yes fpu_exception : yes cpuid level : 13 wp : yes 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 pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx lahf_lm ida arat epb pln pts dtherm tpr_shadow vnmi flexpriority ept vpid xsaveopt bogomips : 4004.01 clflush size : 64 cache_alignment : 64 address sizes : 46 bits physical, 48 bits virtual power management: br aki

On Mon, Feb 06, 2017 at 09:51:06 +0530, akhilesh rawat wrote:
hi ,
I am creating Guest by Libvirt tool " virt-install" with cpu model as host.
After Guest creation i see Guest Missing quite no of flags which Host was having .
What could be the reason for this ? I am expecting all flags of Host to e present in Guest as well when choosing cpu model as host .
Even if you request "host" CPU model, the guest will always see only a subset of features the host supports. Not all features can be used in a virtual machine and even if they can be used they usually need some support form KVM or QEMU or both. That is both KVM and QEMU will filter out features they cannot currently virtualize and thus you will get a smaller set in comparison to the host CPU. Jirka

ok thanks , but then can we know which all list of feature are supported by QEMU/KVM release. http://www.linux-kvm.org/page/KVM_Features Does not seem to be all corect . On Thu, Feb 16, 2017 at 3:42 PM, Jiri Denemark <jdenemar@redhat.com> wrote:
On Mon, Feb 06, 2017 at 09:51:06 +0530, akhilesh rawat wrote:
hi ,
I am creating Guest by Libvirt tool " virt-install" with cpu model as host.
After Guest creation i see Guest Missing quite no of flags which Host was having .
What could be the reason for this ? I am expecting all flags of Host to e present in Guest as well when choosing cpu model as host .
Even if you request "host" CPU model, the guest will always see only a subset of features the host supports. Not all features can be used in a virtual machine and even if they can be used they usually need some support form KVM or QEMU or both. That is both KVM and QEMU will filter out features they cannot currently virtualize and thus you will get a smaller set in comparison to the host CPU.
Jirka

On Fri, Feb 17, 2017 at 11:23:54 +0530, akhilesh rawat wrote:
ok thanks , but then can we know which all list of feature are supported by QEMU/KVM release. http://www.linux-kvm.org/page/KVM_Features
This page is not really about CPU features. It's not so easy to tell whether a given CPU feature will be available to a guest or not as it depends on a lot of things: QEMU and KVM version, machine type, hardware settings, and even a specific revision of a given CPU model installed in your host. Probably the simplest way to see the features is to check them in a guest OS. If everything goes well you should be able to get similar info from libvirt via "virsh domcapabilities" command soon. Hopefully with QEMU 2.9.0 and libvirt 3.1.0. Jirka
participants (2)
-
akhilesh rawat
-
Jiri Denemark