KVM: Host CPU does not provide required features

I just exported / copied a virtual machine from one of our servers (a HP Proliant) to my laptop so that I could to mess around with it offline. I used the following commands to export the domain.

On the server:

virsh dumpxml wordpress > /tmp/wordpress.xml

On the laptop:

virsh define wordpress.xml
virsh wordpress start

However, I got this error on the laptop:

error: unsupported configuration: guest and host CPU are not compatible: Host CPU does not provide required features: rdtscp, popcnt, sse4.2, dca

The HP server has xeon processors and my laptop has a little core two duo. Obviously the CPU’s had different capabilities. You can see the cpu definitions in the wordpress.xml file were:

less wordpress.xml
<cpu match='exact'>
    <feature policy='require' name='tm2'/>
    <feature policy='require' name='est'/>
    <feature policy='require' name='monitor'/>
    <feature policy='require' name='ds'/>
    <feature policy='require' name='ss'/>
    <feature policy='require' name='vme'/>
    <feature policy='require' name='rdtscp'/>
    <feature policy='require' name='ht'/>
    <feature policy='require' name='dca'/>
    <feature policy='require' name='pbe'/>
    <feature policy='require' name='tm'/>
    <feature policy='require' name='vmx'/>
    <feature policy='require' name='ds_cpl'/>
    <feature policy='require' name='xtpr'/>
    <feature policy='require' name='acpi'/>

You can also view the same information using virsh capabilities command. It is worth piping it through less because the command produces alot of output and the host cpu information is at the top.

For the laptop:

virsh capabilities | less
    <topology sockets='1' cores='2' threads='1'/>
    <feature name='pdcm'/>
    <feature name='xtpr'/>
    <feature name='tm2'/>
    <feature name='est'/>
    <feature name='smx'/>
    <feature name='vmx'/>
    <feature name='ds_cpl'/>
    <feature name='monitor'/>
    <feature name='dtes64'/>
    <feature name='pbe'/>
    <feature name='tm'/>
    <feature name='ht'/>
    <feature name='ss'/>
    <feature name='acpi'/>
    <feature name='ds'/>
    <feature name='vme'/>

So, to fix the issue, I just edited the domains xml definition and put in the correct features.

virsh edit wordpress

Note – if you are using ubuntu on your desktop and have virt-manager installed (which is an awesome gui application which runs on Linux and Macs). You can run virt-manager, open the virtual machine, go to the information tab, select the processor and then “copy host cpu configuration”. I’ve attached a screenshot of how to do this.


I hope this helps someone.

4 thoughts to “KVM: Host CPU does not provide required features”

  1. Nice find, this is what I use for creating vm via cli

    virt-install \
    –connect qemu:///system \
    –name maas \
    –ram 1024 \
    –cpu host \
    –vcpus 2 \
    –nographics \
    –disk pool=maas,size=20,bus=virtio,sparse=false \
    –network bridge=virbr0 \
    –location http://us.archive.ubuntu.com/ubuntu/dists/trusty/main/installer-amd64/ \
    –initrd-inject=preseeds/preseed.cfg \
    –extra-args=”locale=en_US.UTF-8 console-setup/ask_detect=false keyboard-configuration/layoutcode=us file=file:/preseed.cfg vga=788 quiet console=tty0 utf8 console=ttyS0,115200″ \
    –os-type=linux \
    –force \

    The option to note is –cpu host as it exposes the hosts cpu configuration to the guest

  2. Thank you so much! You actually saved my practical exam. I was panicking because I could not run the VM.

Leave a Reply