[libvirt-users] LibVirt query CPU Model support and restore operation

Martin Kletzander mkletzan at redhat.com
Tue Jan 24 08:02:41 UTC 2017


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 at 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=true,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 at redhat.com
>https://www.redhat.com/mailman/listinfo/libvirt-users
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20170124/9adb1b09/attachment.sig>


More information about the libvirt-users mailing list