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.
Holy crap thank you. This saved my sanity.
Yeah,I met the same problem and then I found I forget to load the kvm module after restart the computer.
I owe you a beer…
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.
Hello I get the following error returned when I use a perl script.
Unknown OSTYPE
Ubuntu 8.04.4 LTS
2.6.24-28-server
Pingback: Creating Virtual Machine opensuse
Love Ya! Josir.
I had no idea of such usefull command. And I sped several hours finding out what to put in the XML file.
I was seeing the same error after a fresh install and discovered it was because I had not yet installed qemu. *facepalm* Solved easily with:
yum install qemu*
happened to me after update kernel to 3.6. had to revert changes. very strange.
@Cory 28-Jun-2012: thanks for reminding me to check the obvious… on debian/ubuntu this is
apt-get install qemu-kvm
Thank you!
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.