akhilesh rawat
2017-Jan-24 10:51 UTC
Re: [libvirt-users] LibVirt query CPU Model support and restore operation
hi, yes we are talking about same host here. You could've just used -cpu host-model-only>> I dont want to host model ( it is working with host model) .AS KVM seems to allow support Haswell with native commands . Does this mean in my case KVM is allowing software emulated cpu model. Can libvirt allow software-emulated for non host model ? if yes how . thanks On Tue, Jan 24, 2017 at 1:32 PM, Martin Kletzander <mkletzan@redhat.com> wrote:> On Tue, Jan 24, 2017 at 10:08:12AM +0530, akhilesh rawat wrote: > >> Hello , >> >> It was working good working with kvm management tools using libvirt . >> virsh/virt-manager . >> >> But then i got annoyed when management tool did not allow me to change the >> CPU model while creating new virtual machine . >> error >> >> > Are we talking about the same host? > > root@kvm-server qemu]# virt-install --virt-type kvm --name compute-2 --cpu >> Haswell-noTSX --ram=61440 --vcpus=20 --os-type=linux --os-variant=generic >> --disk >> compute2-disk0.qcow2,device=disk,bus=ide,size=300,sparse=tru >> e,format=qcow2 >> --pxe --network bridge=virbr0,model=e1000 --network >> bridge=virbr0,model=e1000 --network bridge=virbr0,model=virtio --network >> bridge=virbr0,model=virtio --graphics vnc,port=5906 --noautoconsole >> >> Starting install... >> ERROR unsupported configuration: guest and host CPU are not compatible: >> Host CPU does not provide required features: invpcid, erms, bmi2, smep, >> avx2, bmi1, fsgsbase, movbe, fma >> Domain installation does not appear to have been successful. >> >> I could not resolve this error . >> >> > You could've just used -cpu host-model-only. > > Finally i came across the post which say that libvirt cross verifies flags >> under CPU model present in >> /usr/share/libvirt/cpu_map.xml and cat /proc/cpuinfo . >> >> An yes the flag complained were not present in host proc/cpuinfo. >> >> Question 1: Is it really needed for Libvirt to do this check . >> >> > It is, otherwise users might not get what they asked for. Or it might > be software-emulated. > > AS KVM seems to allow support Haswell with native commands . Why libvirt is >> doing this check then ? >> >> As i was not sure where the problem lies and i was using libvirt 2.0.0 >> version i upgraded to 2.5.0 by compiling form source . >> But then i faces issue using virsh/virt-manager as seem it was not >> compatilble with upgarded version of libvirt. >> >> Now my system is little messed around libvirt . I did reinstall/reboot >> Quite many things not working . >> >> Question 2 : How can i restore original Libvirt 2.0.0 . >> >> > Depends on your distro. You can just uninstall and install the older > version if your package managed doesn't support downgrading. But try to > keep on the newer one and fix your workflow. > > >> br aki >> > > _______________________________________________ >> libvirt-users mailing list >> libvirt-users@redhat.com >> https://www.redhat.com/mailman/listinfo/libvirt-users >> >
Martin Kletzander
2017-Jan-24 11:57 UTC
Re: [libvirt-users] LibVirt query CPU Model support and restore operation
On Tue, Jan 24, 2017 at 04:21:14PM +0530, akhilesh rawat wrote:>hi, > >yes we are talking about same host here. > >You could've just used -cpu host-model-only >>> I dont want to host model ( it is working with host model) . > >AS KVM seems to allow support Haswell with native commands . Does this mean >in my case KVM is allowing software emulated cpu model. >I don't remember if it gets emulated or just dropped. Do you remember if you saw those in /proc/cpuinfo in the guest? Maybe QEMU just dropped them on startup. I believe that was why we added the code that checks for it.>Can libvirt allow software-emulated for non host model ? if yes how . >You can force each feature, that way it could work, but I'm not sure with all the refactoring that was there.>thanks > > > > > >On Tue, Jan 24, 2017 at 1:32 PM, Martin Kletzander <mkletzan@redhat.com> >wrote: > >> On Tue, Jan 24, 2017 at 10:08:12AM +0530, akhilesh rawat wrote: >> >>> Hello , >>> >>> It was working good working with kvm management tools using libvirt . >>> virsh/virt-manager . >>> >>> But then i got annoyed when management tool did not allow me to change the >>> CPU model while creating new virtual machine . >>> error >>> >>> >> Are we talking about the same host? >> >> root@kvm-server qemu]# virt-install --virt-type kvm --name compute-2 --cpu >>> Haswell-noTSX --ram=61440 --vcpus=20 --os-type=linux --os-variant=generic >>> --disk >>> compute2-disk0.qcow2,device=disk,bus=ide,size=300,sparse=tru >>> e,format=qcow2 >>> --pxe --network bridge=virbr0,model=e1000 --network >>> bridge=virbr0,model=e1000 --network bridge=virbr0,model=virtio --network >>> bridge=virbr0,model=virtio --graphics vnc,port=5906 --noautoconsole >>> >>> Starting install... >>> ERROR unsupported configuration: guest and host CPU are not compatible: >>> Host CPU does not provide required features: invpcid, erms, bmi2, smep, >>> avx2, bmi1, fsgsbase, movbe, fma >>> Domain installation does not appear to have been successful. >>> >>> I could not resolve this error . >>> >>> >> You could've just used -cpu host-model-only. >> >> Finally i came across the post which say that libvirt cross verifies flags >>> under CPU model present in >>> /usr/share/libvirt/cpu_map.xml and cat /proc/cpuinfo . >>> >>> An yes the flag complained were not present in host proc/cpuinfo. >>> >>> Question 1: Is it really needed for Libvirt to do this check . >>> >>> >> It is, otherwise users might not get what they asked for. Or it might >> be software-emulated. >> >> AS KVM seems to allow support Haswell with native commands . Why libvirt is >>> doing this check then ? >>> >>> As i was not sure where the problem lies and i was using libvirt 2.0.0 >>> version i upgraded to 2.5.0 by compiling form source . >>> But then i faces issue using virsh/virt-manager as seem it was not >>> compatilble with upgarded version of libvirt. >>> >>> Now my system is little messed around libvirt . I did reinstall/reboot >>> Quite many things not working . >>> >>> Question 2 : How can i restore original Libvirt 2.0.0 . >>> >>> >> Depends on your distro. You can just uninstall and install the older >> version if your package managed doesn't support downgrading. But try to >> keep on the newer one and fix your workflow. >> >> >>> br aki >>> >> >> _______________________________________________ >>> libvirt-users mailing list >>> libvirt-users@redhat.com >>> https://www.redhat.com/mailman/listinfo/libvirt-users >>> >>
Jiri Denemark
2017-Jan-25 09:06 UTC
Re: [libvirt-users] LibVirt query CPU Model support and restore operation
On Tue, Jan 24, 2017 at 16:21:14 +0530, akhilesh rawat wrote:> hi, > > yes we are talking about same host here. > > You could've just used -cpu host-model-only > >> I dont want to host model ( it is working with host model) . > > AS KVM seems to allow support Haswell with native commands . Does this mean > in my case KVM is allowing software emulated cpu model.No, QEMU will just drop the features which are not supported on your host. Although there are some rare exceptions, such as x2apic, which can be emulated even with KVM. Anyway, starting QEMU directly should print several warnings about features which are dropped. And when you start QEMU with -cpu Haswell,enforce it should refuse to start.> Can libvirt allow software-emulated for non host model ? if yes how .You can bypass the libvirt check for specific features by setting the feature policy to "force" (no idea if this can be done with virt-install), but QEMU will still do the check itself and either drop the features or refuse to start (with enforce) if they cannot be used on the host. Jirka
akhilesh rawat
2017-Jan-27 08:18 UTC
Re: [libvirt-users] LibVirt query CPU Model support and restore operation
hello , thanks for comments . I tried now with force options for CPU flag which were not supported . Now the command with non fully supported CPU model gets executed , But i am surprised to see that still Guest cpu model is not changed and still same as host cpu model(SAndy Bridge) Why don't i see the model as HAswell now , could you please comment. Command used : virt-install --virt-type kvm --name controller-0 --cpu Haswell-noTSX,+fma,+movbe,+fsgsbase,+bmi1,+avx2,+smep,+bmi2,+erms,+invpcid --ram=8120 --vcpus=4,sockets=1 Linux process for KVM : 7479 1 37 10:13 ? 01:13:21 /usr/libexec/qemu-kvm -name controller-0 -S -machine pc-i440fx-rhel7.0.0,accel=kvm,usb=off *-cpu SandyBridge,*+fma,+pcid,+movbe,+fsgsbase,+bmi1,+avx2,+smep,+bmi2,+erms,+invpcid -m 8120 -realtime mlock=off -smp 4,sockets=1,cores=4,threads=1 cpu guest : processor : 0 vendor_id : GenuineIntel cpu family : 6 model : 42 model name : Intel Xeon E312xx (Sandy Bridge) stepping : 1 microcode : 0x1 cpu MHz : 1994.450 cache size : 4096 KB physical id : 0 siblings : 4 core id : 0 cpu cores : 4 apicid : 0 initial apicid : 0 fpu : yes fpu_exception : yes cpuid level : 13 wp : yes flags : fpu de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx rdtscp lm constant_tsc rep_good nopl eagerfpu pni pclmulqdq ssse3 cx16 pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx hypervisor lahf_lm xsaveopt bogomips : 3988.90 clflush size : 64 cache_alignment : 64 address sizes : 46 bits physical, 48 bits virtual power management: CPU Host : processor : 0 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 : 1200.000 cache size : 15360 KB physical id : 0 siblings : 12 core id : 0 cpu cores : 6 apicid : 0 initial apicid : 0 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 : 3990.17 clflush size : 64 cache_alignment : 64 address sizes : 46 bits physical, 48 bits virtual power management: Thanks Aki On Wed, Jan 25, 2017 at 2:36 PM, Jiri Denemark <jdenemar@redhat.com> wrote:> On Tue, Jan 24, 2017 at 16:21:14 +0530, akhilesh rawat wrote: > > hi, > > > > yes we are talking about same host here. > > > > You could've just used -cpu host-model-only > > >> I dont want to host model ( it is working with host model) . > > > > AS KVM seems to allow support Haswell with native commands . Does this > mean > > in my case KVM is allowing software emulated cpu model. > > No, QEMU will just drop the features which are not supported on your > host. Although there are some rare exceptions, such as x2apic, which can > be emulated even with KVM. > > Anyway, starting QEMU directly should print several warnings about > features which are dropped. And when you start QEMU with > -cpu Haswell,enforce it should refuse to start. > > > Can libvirt allow software-emulated for non host model ? if yes how . > > You can bypass the libvirt check for specific features by setting the > feature policy to "force" (no idea if this can be done with > virt-install), but QEMU will still do the check itself and either drop > the features or refuse to start (with enforce) if they cannot be used on > the host. > > Jirka >