Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 294151 - app-emulation/libvirt-0.7.4 +kvm - not able to create a kvm emulation type VM (qemu only available option) using GUI-
Summary: app-emulation/libvirt-0.7.4 +kvm - not able to create a kvm emulation type VM...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Lance Albertson (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-11-23 10:09 UTC by Dragos Delcea
Modified: 2009-12-23 16:58 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dragos Delcea 2009-11-23 10:09:51 UTC
when using libvirt-0.7.4 I'm no longer able to create a kvm accelerated VM using the GUI; it was possible to do this with 0.7.2.
haven't tried with cli commands

Reproducible: Always

Steps to Reproduce:
1.start libvirtd service
2.start virt-manager
3.select "create new virtual machine"; fill in all the details, on last window (with the finish button) click "advanced" - only available virt type is "qemu" which creates an un-accelerated VM

Actual Results:  
what I'm seeing with libvirt-0.7.4 is qemu invoked with "-no-kvm" for newly created VMs.
I'm able to workaround this using cli commands to modify the xml for the VM and modify it's "domain type" to kvm (instead of qemu)

Expected Results:  
I am able to create a kvm type VM using the GUI.

Portage 2.1.6.13 (default/linux/x86/10.0/desktop, gcc-4.3.4, glibc-2.10.1-r1, 2.6.31-gentoo-r6 i686)
=================================================================
System uname: Linux-2.6.31-gentoo-r6-i686-Intel-R-_Core-TM-_Duo_CPU_T2400_@_1.83GHz-with-gentoo-1.12.13
Timestamp of tree: Mon, 23 Nov 2009 09:00:01 +0000
app-shells/bash:     4.0_p28
dev-java/java-config: 2.1.9-r1
dev-lang/python:     2.6.2-r1
dev-python/pycrypto: 2.0.1-r8
dev-util/cmake:      2.6.4-r3
sys-apps/baselayout: 1.12.13
sys-apps/sandbox:    1.6-r2
sys-devel/autoconf:  2.13, 2.63-r1
sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6a
virtual/os-headers:  2.6.30-r1
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=prescott -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-O2 -march=prescott -pipe -fvisibility-inlines-hidden"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks fixpackages noinfo parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://mirror.usu.edu/mirrors/gentoo/ http://gd.tuwien.ac.at/opsys/linux/gentoo/"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1"
LINGUAS="ro en"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="acl acpi alsa bluetooth cdr consolekit cups dbus dri hal iconv kdehiddenvisibility mime mmap mmx mmx2 nas ncurses nls nptl opengl pam pcmcia plasma policykit pulseaudio qt3 qt3support sse sse2 ssl threads unicode usb x86 xattr xcb xinerama xml zlib" ALSA_CARDS="hda_intel" ALSA_PCM_PLUGINS="plug ioplug dmix adpcm alaw asym copy dshare dsnoop empty extplug file hooks iec958 ladspa lfloat linear meter mulaw multi null rate route share shm softvol mmap_emul" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="evdev keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="ro en" QEMU_SOFTMMU_TARGETS="i386" USERLAND="GNU" VIDEO_CARDS="vesa radeon radeonhd"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 1 Lance Albertson (RETIRED) gentoo-dev 2009-12-23 06:09:30 UTC
(In reply to comment #0)
> when using libvirt-0.7.4 I'm no longer able to create a kvm accelerated VM
> using the GUI; it was possible to do this with 0.7.2.
> haven't tried with cli commands

What use flags are libvirt built with? What versions of libvirt, and qemu-kvm do
you have? Can you please try with libvirt-0.7.4-r2 and see if you're still
encountering issues?

Thanks!
Comment 2 Daniel Lin 2009-12-23 15:53:54 UTC
libvirt assumes that only "/usr/bin/kvm" or "/usr/bin/qemu-kvm" can be kvm, and that anything else is not.  The app-emulation/qemu-kvm package does not install any binaries by those names, so libvirt forcibly disables kvm mode.

I have a horrible patch applied to my system:

--- a/src/qemu/qemu_conf.c      2009-12-17 21:20:55.018848525 -0500
+++ b/src/qemu/qemu_conf.c      2009-12-17 21:21:50.998909749 -0500
@@ -641,18 +641,9 @@
      */
     if (STREQ(info->arch, hostmachine) ||
         (STREQ(hostmachine, "x86_64") && STREQ(info->arch, "i686"))) {
-        const char *const kvmbins[] = { "/usr/bin/qemu-kvm", /* Fedora */
-                                        "/usr/bin/kvm" }; /* Upstream .spec */
-
-        for (i = 0; i < ARRAY_CARDINALITY(kvmbins); ++i) {
-            if (access(kvmbins[i], X_OK) == 0 &&
-                access("/dev/kvm", F_OK) == 0) {
-                haskvm = 1;
-                kvmbin = kvmbins[i];
-                if (!binary)
-                    binary = kvmbin;
-                break;
-            }
+        if (access("/dev/kvm", F_OK) == 0) {
+            haskvm = 1;
+            kvmbin = binary;
         }

         if (access("/dev/kqemu", F_OK) == 0)

But it would be better to use feature probes like libvirt already does for other qemu features.
Comment 3 Diego Elio Pettenò (RETIRED) gentoo-dev 2009-12-23 16:58:20 UTC
This was a bug with qemu-kvm and is fixed in the 0.12 series already.