[libvirt] domain type "kvm" error

Cole Robinson crobinso at redhat.com
Sun Sep 7 18:43:00 UTC 2008

Rakotomandimby Mihamina wrote:
> Hi all,
> I use "ubuntu hardy" but I dont think the problem is specific to the
> distribution I use.
> I installed KVM and libvirt as described here:
> https://help.ubuntu.com/community/KVM
> Following that method, created a domain, which dumps like this:
>   <domain type='qemu' id='1'>
>     <name>xp1</name>
>     ...
>   </domain>

Specifically what tool did you use to install the VM? That tutorial lists
several different methods.

> Launching the guest is OK, but it is as slow as if I directly launched
>   $ qemu [options]
> I tried to launch:
>   $ kvm [options]
> and it is much faster
> My conclusion is that method on the Ubuntu documentation launches a
> qemu without the use of kvm.
> I modified that XML dump, changing "qemu" with "kvm":
>   <domain type='kvm' id='1'>
>     <name>xp1</name>
>     ...
>   </domain>

You can't just change the domain type, you also have to change
the emulator tag. My guess is, this new 'kvm' command is still
using the plain qemu emulator and not '/usr/bin/kvm'

> I undefined the domain "xp1" and re-defined it with that new XML file.
> When I start the new defined domain:
>   virsh # start xp1
>   libvir: QEMU error : QEMU quit during console startup
>   qemu: unknowm parameter 'boot' in \
>         'file=/home/mihamina/xpjohnny.iso,if=ide,media=cdrom,boot=on'
>   error: Failed to start domain xp1
> It's a Windows XP domain.
> My conclusion is:
> - When domain type is "qemu", qemu is called a certain way, without
> syntax error
> - When domain type is "kvm", qemu/kvm is not called the same way and
> among that, there are syntax errors.
> How to confirm my conclusion?

If you want to see the command lines that libvirt is generating,
check out /var/log/libvirt/qemu/{vmname}.log (at least that is
the path in fedora). This file is overwritten everytime you attempt
to start the VM, so you'll want to check it after each successive

Hope that helps,

More information about the libvir-list mailing list