Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 294169 - app-emulation/virt-manager-0.8.0 does no more start VMs because of missing kvm (after upgrade to qemu-kvm-0.11.0)
Summary: app-emulation/virt-manager-0.8.0 does no more start VMs because of missing kv...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Virtualization Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 294643
  Show dependency tree
 
Reported: 2009-11-23 11:59 UTC by Juergen Rose
Modified: 2010-02-03 20:06 UTC (History)
5 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 Juergen Rose 2009-11-23 11:59:34 UTC
Trying to start an VM, set up some weeks ago, inside virtual-manager I get the
error "Error starting domain: Cannot find QEMU binary /usr/bin/kvm: No such file or directory". Indeed there is no more /usr/bin/kvm. I suppose I have to replace kvm by qemu.
But how to do that? I do not find any possibility to replace kvm by qemu neither in "Host Details" nor in "Virtual Machine Details" or in "Preferences"

Reproducible: Always




root@lynx:/root(11)# emerge --info
Portage 2.1.7.6 (default/linux/amd64/10.0/desktop, gcc-4.4.2, glibc-2.11-r0, 2.6.32-rc8 x86_64)
=================================================================
System uname: Linux-2.6.32-rc8-x86_64-Intel-R-_Core-TM-2_Duo_CPU_T8300_@_2.40GHz-with-gentoo-2.0.1
Timestamp of tree: Mon, 23 Nov 2009 06:30:01 +0000
app-shells/bash:     4.0_p35
dev-java/java-config: 2.1.9-r1
dev-lang/python:     2.6.4, 3.1.1-r1
dev-python/pycrypto: 2.1.0_beta1
dev-util/cmake:      2.8.0
sys-apps/baselayout: 2.0.1
sys-apps/openrc:     0.5.2-r2
sys-apps/sandbox:    2.2
sys-devel/autoconf:  2.13, 2.63-r1
sys-devel/automake:  1.4_p6, 1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2, 1.11
sys-devel/binutils:  2.20
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6b
virtual/os-headers:  2.6.30-r1
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA PUEL dlj-1.1"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=nocona -O2 -pipe -fomit-frame-pointer"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/eselect/postgresql /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /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="-march=nocona -O2 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests distlocks fixpackages news parallel-fetch protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch"
FFLAGS="-march=nocona -O2 -pipe -fomit-frame-pointer"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LDFLAGS="-Wl,-O1"
LINGUAS="de fr"
MAKEOPTS="-j1"
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"
PORTDIR_OVERLAY="/usr/local/portage/layman/n4g /usr/local/portage/layman/dotnet /usr/local/portage/layman/science /usr/local/portage/layman/java-overlay /usr/local/portage/layman/suka /usr/local/portage/layman/zugaina /usr/local/portage/layman/x11 /usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X Xaw3d a52 aac acl acpi administrator afs aiglx alsa amd64 amrr ao aotuv apache2 asf aspell atlas auctex audacious audiofile automount bash-completion beagle berkdb bjam blas bluetooth bonobo boo boost branding bzip2 c++ cairo cardbus cdda cddb cdf cdio cdparanoia cdr cgi chm cli consolekit corba cracklib cran crypt cups curl cxx daap dbus device-mapper dga dia divx djvu dlloader dmi doc dri ds3490 dts dv dvb dvd dvdr dvi dxr3 dynagraph eds effects elf emacs emboss encode epiphany esd evo examples exif expat extra extras fam fame ffmpeg fftw firefox fits flac fltk foomaticdb fortran fpx fuse galago garmin gd gdal gdbm geolocation geos gif gimp gimpprint ginac glade glib glitz gml gmp gnokii gnome gnome-keyring gnuplot gnutls gphoto2 gpm graphics graphviz gs gsl gsm gstreamer gtk guile hal hardened harness hddtemp hdf hdf5 hlapi http httpd hvm iconv icq icu id3 ide imagemagick imap innodb ipod ipv6 irda irmc ithreads jabber java java5 java6 jbig john jpeg jpeg2k kde kde4 kerberos kexi keyring kvm ladspa lame lapack laptop latex lcms ldap libffi libgda libnotify libsamplerate lirc lua lzo lzw mad maildir mailwrapper math matroska mikmod mmx mmxext mng mod modules mono motif mozdevelop mozilla mozsvg mozxmlterm mp3 mp4 mp4live mpeg mpeg2 mplayer mtp mudflap multilib musicbrainz mysql mysqli nautilus ncurses neXt netcdf netpbm network networkmanager nfs nls nntp nptl nptlonly nsplugin ntfs ntp numarray numeric nvidia obex objc ocaml octave odbc ogdi ogg ole openexr opengl openmp pae pam pcre pda pdf perl pipechan plotutils plugins png podcast policykit posix postgres postscript ppds pppd preview-latex proj projectx pstricks pulseaudio python qhull qt3support qt4 quicktime readline reflection reiserfs rhythmbox rle rpc rrdcgi rrdtool samba sasl science sdl server session slang slp smbclient smp sndfile snmp soup sox speex spell spl sql sqlite sse sse2 ssl startup-notification stlport subtitles subversion suexec svg sysfs szip t1lib tcl tcpd tex theora thinkpad threads thunar thunderbird tidy tiff tk tntc truetype unicode usb userlocales utempter v4l2 vorbis wav webdav webdav-serf webkit wifi wmf wxwidgets x264 xattr xcb xemacs xext xine xml xmlreader xmlrpc xorg xpm xulrunner xv xvid xvmc zlib zvbi" ALSA_CARDS="intel8x0" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd 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 dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" CAMERAS="canon" DVB_CARDS="usb-wt220u" ELIBC="glibc" INPUT_DEVICES="keyboard mouse                evdev                synaptics               " KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de fr" NETBEANS_MODULES="ide websvccommon nb harness apisupport groovy gsf j2ee java xml" USERLAND="GNU" VIDEO_CARDS="nv nvidia vesa" 
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Juergen Rose 2009-11-23 12:50:52 UTC
If I create a link from /usr/bin/qemu to /usr/bin/kvm, I can start VMs inside virt-manager. But a x86_64 kernel image complains "This kernel requires an x86-64 CPU, but only detected an i686 CPU.". i686 kernel images I can start. If I remember me correctly, I could start with kvm also 86_64 kernel images.
Comment 2 Albert W. Hopkins 2009-11-23 19:27:49 UTC
I've had issues with this release as well, notably:

There is no documentation/ELOG on trnasitioning to this version.  I enabled x86_64 soft targets, but is this only software emulation or does it use KVM?

There is no kvm executable and virt-manager cannot start guests.

Even when creating a symlink as in comment #1, I get the following error in virt-manager:

-----
Error starting domain: internal error cannot parse QEMU version number in 'qemu-x86_64 version 0.11.0 (qemu-kvm-0.11.0), Copyright (c) 2003-2008 Fabrice Bellard'
-----

In short this the new kvm does not appear to be compatible with virt-manager 0.8.0.
Comment 3 Marc-Antoine Perennou 2009-11-23 22:24:02 UTC
Did you try to edit the domain configuration file in /etc/libvirt/qemu to set the correct value and then to do "virsh define /etc/libvirt/qemu/file.xml" in a shell ? (maybe as root)
Comment 4 Albert W. Hopkins 2009-11-24 02:10:57 UTC
WRT comment #3: I'm not sure as I no longer have those domains available.

I also noticed thugh when creating new domains with libvirt that it passes -"-no-kvm" to qemu and thus my guests are not using KVM (even though the module is installed).  I tried this as both user and root.

If I explicitely pass "--virt-type kvm" to virt-install then I get the message:

Host does not support domain type 'kvm' for virtualization type 'hvm' arch 'x86_64'

This is with 

QEMU_SOFTMMU_TARGETS="*"
QEMU_USER_TARGETS="*"

In my make.conf.  Again, I am not sure what these variables mean.  I would like to see some documentation on them.  This all worked fine before. (with qemu-kvm-88-r2).  I'm willing to accept this is user error, but I cannot find sufficient documentation on how to migrate to this new layout.  When I downgrade qemu-kvm everything works fine.  Please advise.
Comment 5 Rafael Kolless 2009-11-25 20:24:56 UTC
Since the maintainer stopped supporting the kvm package and merged it with the default qemu package every program normaly running kvm commands will not work anymore.

qemu must be started with -enable-kvm to get the same result.

Neither Ubuntu, Red Hat or Debian would just kick kvm out of the distribution, this is that what happened here in Gentoo actually.

virt-tools and libvirtd seems not to be stable anymore with the USE flag "kvm" as the software depends on the default binary kvm.
Comment 6 Xake 2009-11-27 00:26:23 UTC
Ok, so this is actually more of a migration problem, and some bumps on the way.

Migration problem:
Since the ebuilds for qemu-kvm does not rename stuff like the ebuild for qemu-kvm-devel did old configurations files breaks when they are looking for non-existent /usr/bin/kvm instead of /usr/bin/qemu.
Fix by edit your configuration files (/etc/libvirt/qemu/*.xml) to use /usr/bin/qemu instead of /usr/bin/kvm (untested, should work).

The first bump: libvirt does not pass -enable-kvm to the command qemu even if domain is kvm unless you have >=libvirt-0.7.4

Second bump: If you make a new configuration in virt-manager it fails to detect and set the domain to 'kvm' in your configuration file if it only find /usr/bin/qemu. AFAIK not yet fixed upstream. However you can make a new configuration using virt-manager and then "just" edit you configuration file to have domain type='kvm' instead of domain type='qemu' (tested, does work).


So correct fix for this bug?
Make virt-manager capable of detecting and settings domain kvm for the command qemu.
Write a migrationguide, telling people to make sure their configuration files are set to use domain type='kvm' and command /usr/bin/qemu.

Temporary workaround?
Providing softlinks for the legacy kvm-commands.


Remember folks: you are using ~arch here. Debian and Fedora may not break the naming scheme this way in a release, but you could expect things like this to happend sooner or later in sid and rawhide, especially when this is what upstream uses.

For me qemu-kvm works great. libvirt-0.7.4 works great with it (limited testing with WinXP and ubuntu guests on a hardened gentoo host).
All my troubles I have with it comes from virt-manager, but after I fixed the libvirt configuration files it produce, virt-manager starts and handles the VMs nicely.
Comment 7 Dragos Delcea 2009-11-27 09:02:18 UTC
(In reply to comment #6)
> Migration problem:
> Since the ebuilds for qemu-kvm does not rename stuff like the ebuild for
> qemu-kvm-devel did old configurations files breaks when they are looking for
> non-existent /usr/bin/kvm instead of /usr/bin/qemu.
> Fix by edit your configuration files (/etc/libvirt/qemu/*.xml) to use
> /usr/bin/qemu instead of /usr/bin/kvm (untested, should work).
I've done it differently, by re-emerging virt-manager 0.8.0 it picked /usr/bin/qemu instead of /usr/bin/kvm.

I opened bug #294151 for exactly the same thing, but for libvirt 0.7.4; my thought was that since libvirt was upgraded and virt-manager stayed at the same version, it had to be libvirt's fault. That, and the fact that I'm not that familiar with the whole libvirt stuff - I have been using custom scripts to invoke kvm until very recently.

excluding the workarounds mentioned here, the whole thing works for me as well. The only other annoying thing is virt-manager's inability to cope with browsing for files when creating new VMs; I have to manually type the path to the iso or disk img, browsing&selecting them leaves me with empty paths.
Comment 8 Rafael Kolless 2009-12-08 07:26:01 UTC
For me it does not work at all.

I remerge everything, libvirt, virt-manager
I set and unset softmmu and user_mmu but each time when I try to start a VM like:

86_64-pc-linux-gnu/gcc-bin/4.3.4 HOME=/root USER=root QEMU_AUDIO_DRV=none /usr/bin/qemu -S -M pc-0.11 -enable-kvm -m 1024 -smp 2 -name GentooTesting -uuid b08f3267-5375-ad33-e7bc-dff886bd43d8 -monitor unix:/var/lib/libvirt/qemu/GentooTesting.monitor,server,nowait -boot c -drive file=,if=ide,media=cdrom,index=2 -net nic,macaddr=52:54:00:2d:02:30,vlan=0,name=nic.0 -net tap,fd=15,vlan=0,name=tap.0 -serial pty -parallel none -usb -vnc 127.0.0.1:0 -k de -vga cirrus -soundhw es1370

the libvirtd crashes with this exception:

libvirtd[19308]: segfault at 10 ip 00007fdac4c8fca5 sp 00007fdac0d45668 error 4 in libpthread-2.9.so[7fdac4c86000+16000]

If I start it with --no-kvm it runs
Comment 9 George L. Emigh 2009-12-08 20:18:46 UTC
Creating the symlink
/usr/bin/qemu-kvm -> /usr/bin/qemu-system-x86_64


"Appears" to be working for me

George
Comment 10 Dragos Delcea 2009-12-09 16:56:59 UTC
(In reply to comment #8)

> 
> 86_64-pc-linux-gnu/gcc-bin/4.3.4 HOME=/root USER=root QEMU_AUDIO_DRV=none
> /usr/bin/qemu -S -M pc-0.11 -enable-kvm -m 1024 -smp 2 -name GentooTesting
> -uuid b08f3267-5375-ad33-e7bc-dff886bd43d8 -monitor
> unix:/var/lib/libvirt/qemu/GentooTesting.monitor,server,nowait -boot c -drive
> file=,if=ide,media=cdrom,index=2 -net
> nic,macaddr=52:54:00:2d:02:30,vlan=0,name=nic.0 -net
> tap,fd=15,vlan=0,name=tap.0 -serial pty -parallel none -usb -vnc 127.0.0.1:0 -k
> de -vga cirrus -soundhw es1370
> 

the first part of "86_64-pc-linux-gnu/gcc-bin/4.3.4 HOME=/root USER=root QEMU_AUDIO_DRV=none /usr/bin/qemu..." is looking fishy to me. The gcc munged path has no business being there. Where does it get it from? or maybe you copy-pasted it wrong?

my VMs look like yours, except that I don't have anything before "/usr/bin/qemu" and they do work. I'm on 32 bit, and you look like you're on 64, but I don't see why it shouldn't work.
I have to admit that I'm a bit interested in the QEMU_AUDIO_DRV variable. How did you manage to get it inserted before invoking qemu? I could use that.
Comment 11 Rafael Kolless 2009-12-09 20:43:56 UTC
It is the command line that is triggered by libvirtd.

You can find it in /var/log/libvirtd/qemu/

(In reply to comment #10)

> the first part of "86_64-pc-linux-gnu/gcc-bin/4.3.4 HOME=/root USER=root
> QEMU_AUDIO_DRV=none /usr/bin/qemu..." is looking fishy to me. The gcc munged
> path has no business being there. Where does it get it from? or maybe you
> copy-pasted it wrong?

Comment 12 Matthias Fulz 2009-12-15 07:50:49 UTC
I used qemu-system-x86_64 and all is working (64bit VMs, kvm-usage).
For me I'm using just a symlink /usr/bin/kvm -> /usr/bin/qemu-system-x86_64 so virt-manager is using domain=kvm in my VMs.

Perhaps u can give this workaround a try.
Comment 13 George L. Emigh 2009-12-23 19:14:23 UTC
Since this bug is basically related to my new problem, since upgrading qemu-kvm to 0.12.1.1 virt-manager / libvirt no longer starts virtual machines and gives this error in virt-manager:

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/engine.py", line 588, in run_domain
    vm.startup()
  File "/usr/share/virt-manager/virtManager/domain.py", line 150, in startup
    self._backend.create()
  File "/usr/lib64/python2.6/site-packages/libvirt.py", line 300, in create
    if ret == -1: raise libvirtError ('virDomainCreate() failed', dom=self)
libvirtError: internal error unable to start guest: qemu: could not open disk image : No such file or directory

Comment 14 Diego Elio Pettenò (RETIRED) gentoo-dev 2009-12-23 19:27:28 UTC
Yeah happened to me as well, should probably talk with upstream about it.

The dirty solution is to use the edit command of virsh and either remove the cdrom device entry from the configuration file, or add a source element with the path to the image to use.
Comment 15 George L. Emigh 2009-12-23 20:15:01 UTC
(In reply to comment #14)
> Yeah happened to me as well, should probably talk with upstream about it.
> 
> The dirty solution is to use the edit command of virsh and either remove the
> cdrom device entry from the configuration file, or add a source element with
> the path to the image to use.
> 

Thank you, I went into the Virtual Machine Details from the virt-manager and removed the cdrom device from there, and now I can start my VM's again.

Comment 16 Rafael Kolless 2009-12-24 00:11:26 UTC
You can keep the IDE CDROM 1 connected to any iso image and the VM can start also.

Just disconnected CDROMs result into the startup failure 
Comment 17 Doug Goldstein (RETIRED) gentoo-dev 2010-02-03 20:06:26 UTC
I've added a /usr/bin/kvm symlink to the past few qemu-kvm versions.