[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] domain type "kvm" error



On Sun, Sep 07, 2008 at 09:10:54PM +0300, 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>
> 
> Launching the guest is OK, but it is as slow as if I directly launched

This is becuse of the type='qemu' attribute

>   $ 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.

That is correct.

> 
> I modified that XML dump, changing "qemu" with "kvm":
>   <domain type='kvm' id='1'>
>     <name>xp1</name>
>     ...
>   </domain>

You also need to set the 'emulator' path to point to the KVM binary
if its not already specified.

> 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

IIRC the Ubuntu libvirt is hardcoded to use -drive param for disks if the
type is 'kvm'. Latest libvirt will probe to see if this is supported or
not before using it.
 
> 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.

Yes & no. Latest libvirt probes for whether -drive is supported, and
whether the boot= param is supported. The older version in Ubuntu doesn't
do this probe, and just toggles off type=qemu vs type=kvm

Daniel
-- 
|: Red Hat, Engineering, London   -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]