libvirt: unknown OS type hvm

It took me a little while to narrow this down. Building a kvm guest with vmbuilder via libvirt I was getting the error “unknown OS type hvm”. When I compared the output of ‘virsh capabilities’ on a good host and the one that wasn’t working, the later was missing the kvm hvm entries. When I checked out the init script for kvm, I realized the the kernel module wasn’t loaded and a quick check of dmesg confirmed that virtualization was disabled in the bios.

12 thoughts on “libvirt: unknown OS type hvm

  1. Josir

    Hi folks, just to add two cents. If you try to create a vm using a xml file from another server (generally with older virsh), you can get this error too. Solution:

    1) Run command “virsh capabilities”
    2) Based on virsh results, update two attributes on xml file: and

    It worked for me.
    Anyway, I owe you a beer too for insightful post.

  2. Pingback: Creating Virtual Machine opensuse

  3. Ben

    Adding one small point. For me it worked once I restarted “libvirtd” service.
    If you are runninginto this error on a brand new machine, and KVM won’t load in kernel, check tht your BIOS is set to allow virtual acceleration.

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload the CAPTCHA.