[libvirt] virsh -no-kvm problem on debian install

Hi, i've installed lastest kvm-86 and libvirt-0.6.4 tarballs on my debian stable and have a problem using virsh No matter what i do in the guest domain config or with /usr/bin/ symlinks, libvirt keeps using the -no-kvm option when starting guests when my cpu has kvm-amd support, modules are loaded and /dev/kvm exists, and starting the guests thru command line works fine, and faster. debian seems to install the following binary /usr/bin/qemu-system-x86_64, i had to add "/usr/bin/qemu" to get virsh to work, otherwise it will say it can't connect to qemu:///system here's some command output : #virsh -c qemu:///system capabilities <capabilities> <host> <cpu> <arch>x86_64</arch> </cpu> <migration_features> <live/> <uri_transports> <uri_transport>tcp</uri_transport> </uri_transports> </migration_features> </host> <guest> <os_type>hvm</os_type> <arch name='i686'> <wordsize>32</wordsize> <emulator>/usr/bin/qemu</emulator> <machine>pc</machine> <machine>isapc</machine> <domain type='qemu'> </domain> </arch> <features> <pae/> <nonpae/> <acpi default='on' toggle='yes'/> <apic default='on' toggle='no'/> </features> </guest> <guest> <os_type>hvm</os_type> <arch name='x86_64'> <wordsize>64</wordsize> <emulator>/usr/bin/qemu-system-x86_64</emulator> <machine>pc</machine> <machine>isapc</machine> <domain type='qemu'> </domain> </arch> <features> <acpi default='on' toggle='yes'/> <apic default='on' toggle='no'/> </features> </guest> </capabilities> and tried adding "/usr/bin/qemu-kvm" symlink <capabilities> <host> <cpu> <arch>x86_64</arch> </cpu> <migration_features> <live/> <uri_transports> <uri_transport>tcp</uri_transport> </uri_transports> </migration_features> </host> <guest> <os_type>hvm</os_type> <arch name='i686'> <wordsize>32</wordsize> <emulator>/usr/bin/qemu</emulator> <machine>pc</machine> <machine>isapc</machine> <domain type='qemu'> </domain> <domain type='kvm'> <emulator>/usr/bin/qemu-kvm</emulator> </domain> </arch> <features> <pae/> <nonpae/> <acpi default='on' toggle='yes'/> <apic default='on' toggle='no'/> </features> </guest> <guest> <os_type>hvm</os_type> <arch name='x86_64'> <wordsize>64</wordsize> <emulator>/usr/bin/qemu-system-x86_64</emulator> <machine>pc</machine> <machine>isapc</machine> <domain type='qemu'> </domain> <domain type='kvm'> <emulator>/usr/bin/qemu-kvm</emulator> </domain> </arch> <features> <acpi default='on' toggle='yes'/> <apic default='on' toggle='no'/> </features> </guest> </capabilities> So far i had no luck getting virsh to use kvm, it always adds the -no-kvm option, i'm not sure how to specify the domain type in the guest config, using the <emulator>/usr/bin/qemu-kvm</emulator> won't help. i've found that thread discussing the binaries and options but don't know if that patch was already added or if i have to patch my tarball.. http://www.redhat.com/archives/libvir-list/2009-March/msg00281.html please let me know if there's some way to let libvirt know that kvm exists on a debian install, using /usr/bin/qemu-system-x86_64 thx, Marc

On Mon, Jun 22, 2009 at 12:18:44PM +0200, ChaosMedia > WebDev wrote:
Hi,
i've installed lastest kvm-86 and libvirt-0.6.4 tarballs on my debian stable and have a problem using virsh
No matter what i do in the guest domain config or with /usr/bin/ symlinks, libvirt keeps using the -no-kvm option when starting guests when my cpu has kvm-amd support, modules are loaded and /dev/kvm exists, and starting the guests thru command line works fine, and faster.
Can you provide your actual guest XML config
and tried adding "/usr/bin/qemu-kvm" symlink
<capabilities>
<host> <cpu> <arch>x86_64</arch> </cpu> <migration_features> <live/> <uri_transports> <uri_transport>tcp</uri_transport> </uri_transports> </migration_features> </host>
<guest> <os_type>hvm</os_type> <arch name='i686'> <wordsize>32</wordsize> <emulator>/usr/bin/qemu</emulator> <machine>pc</machine> <machine>isapc</machine> <domain type='qemu'> </domain> <domain type='kvm'> <emulator>/usr/bin/qemu-kvm</emulator> </domain> </arch> <features> <pae/> <nonpae/> <acpi default='on' toggle='yes'/> <apic default='on' toggle='no'/> </features> </guest>
<guest> <os_type>hvm</os_type> <arch name='x86_64'> <wordsize>64</wordsize> <emulator>/usr/bin/qemu-system-x86_64</emulator> <machine>pc</machine> <machine>isapc</machine> <domain type='qemu'> </domain> <domain type='kvm'> <emulator>/usr/bin/qemu-kvm</emulator> </domain> </arch> <features> <acpi default='on' toggle='yes'/> <apic default='on' toggle='no'/> </features> </guest>
</capabilities>
These two shows libvirt knows about KVM, so the bug must be in the guest XML config.
So far i had no luck getting virsh to use kvm, it always adds the -no-kvm option, i'm not sure how to specify the domain type in the guest config, using the <emulator>/usr/bin/qemu-kvm</emulator> won't help.
I suspect you've not got type='kvm' on the <domain> tag. 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 :|

Daniel P. Berrange wrote:
On Mon, Jun 22, 2009 at 12:18:44PM +0200, ChaosMedia > WebDev wrote:
Hi,
i've installed lastest kvm-86 and libvirt-0.6.4 tarballs on my debian stable and have a problem using virsh
No matter what i do in the guest domain config or with /usr/bin/ symlinks, libvirt keeps using the -no-kvm option when starting guests when my cpu has kvm-amd support, modules are loaded and /dev/kvm exists, and starting the guests thru command line works fine, and faster.
These two shows libvirt knows about KVM, so the bug must be in the guest XML config.
... I suspect you've not got type='kvm' on the <domain> tag.
Thx for the info, indeed i changed the domain type from qemu to kvm and the guess started without -no-kvm, so with kvm support. was <domain type='qemu' id='5'> is now <domain type='kvm' id='5'> I don't quite understand why it wasn't set to kvm in the first place, i did remember using some kvm option on virt-install command line when creating the guest. thx again i believe it fixed my problem i'll try to see if if can also apply to virt-manager which was doing the same thing Marc
participants (2)
-
ChaosMedia > WebDev
-
Daniel P. Berrange