Summary: | Attempting to connect to hpyervisor via virt-manager, libvirt fails to access any hypervisor, (qemu, qemu-kvm, xen) with error, no hypervisor driver available; virt-manager-0.8.2 and libvirt-0.7.5 | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Ian Delaney (RETIRED) <idella4> |
Component: | [OLD] Library | Assignee: | Virtualization Team <virtualization> |
Status: | RESOLVED DUPLICATE | ||
Severity: | normal | CC: | kanelxake |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Ian Delaney (RETIRED)
![]() gentoo64 / # emerge --info --- Invalid atom in /etc/portage/package.unmask: media-gfx/iscan x86 Portage 2.1.7.16 (default/linux/x86/10.0/desktop, gcc-4.3.4, glibc-2.11-r1, 2.6.30-gentoo-r8AMD64 x86_64) ================================================================= System uname: Linux-2.6.30-gentoo-r8AMD64-x86_64-Intel-R-_Core-TM-2_Duo_CPU_E6550_@_2.33GHz-with-gentoo-2.0.1 Timestamp of tree: Wed, 20 Jan 2010 00:15:02 +0000 app-shells/bash: 4.0_p35 dev-java/java-config: 2.1.10 dev-lang/python: 2.6.4, 3.1.1-r1 dev-util/cmake: 2.8.0 sys-apps/baselayout: 2.0.1 sys-apps/openrc: 0.6.0 sys-apps/sandbox: 2.2 sys-devel/autoconf: 2.13, 2.65 sys-devel/automake: 1.8.5-r3, 1.9.6-r2, 1.10.3, 1.11.1 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="x86 ~x86" ACCEPT_LICENSE="* -@EULA dlj-1.1" CBUILD="i686-pc-linux-gnu" CFLAGS="-march=core2 -fomit-frame-pointer -pipe -O2 -mno-tls-direct-seg-refs" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/X11/xkb /usr/share/config" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/sandbox.d /etc/splash /etc/terminfo" CXXFLAGS="-march=core2 -fomit-frame-pointer -pipe -O2 -mno-tls-direct-seg-refs" DISTDIR="/mnt/images/genny/distfiles" FEATURES="assume-digests buildpkg distlocks fixpackages news parallel-fetch protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch" GENTOO_MIRRORS="ftp://ftp.swin.edu.au/gentoo/ ftp://mirror.pacific.net.au/linux/Gentoo ftp://mirror.isp.net.au/pub/gentoo/ http://mirror.isp.net.au/pub/gentoo/ http://mirror.averse.net/pub/gentoo/" LDFLAGS="-Wl,-O1" MAKEOPTS="-j2" 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.au.gentoo.org/gentoo-portage" USE="(-altivec) (-aqua) (-fixed-point) (-gallium) (-hardened) (-kdeprefix) (-libffi) (-multilib) (-n32) (-n64) (-ps3) (-selinux) (wide-unicode) X a52 aac acl acpi aio alsa apm armeb arts audiofile avi bash-completion berkdb bluetooth bmp bzip2 cairo cdparanoia cdr cli client%* consolekit corefonts cracklib cris crypt ctype cups cxx dba dbmaker dbus dga dri dts dv dvd dvdr dvdread eds emboss encode esd ethereal evo extras fam fbcon ffmpeg fftw fftw* firefox flac fortran ftp gdbm gif gnome gnutls gphoto gpm gstreamer gtk gtk%* gtk2 hal handbook i386 iconv imagemagick inifile java jpeg kde ladcca ldap libg++ libvirtd lm_sensors lxc mad mbox microblaze mikmod mime mips64 mips64el mipsel mmap mng modules mono mozilla mp3 mp4 mpeg msn mudflap mysql ncurses netapi network nls nptl nptlonly ogg openal opengl openmp oss pam pcre pdf perl png png%* pnp posix ppc64abi32 ppcemb ppds pppd python qdbm qt qt3support qt4 quicktime readline reflection ruby samba scanner sdl semantic-desktop server%* session sh4 sh4eb shared slp smbclient sndfile sockets source sparc32plus sparc64 spell spl sse sse2 ssl startup-notification svg svga sysfs tcpd theora threads thunar tiff truetype udev udev%* urandom usb v4l videos vorbis websockets wifi win32codecs x264 x86 x86_64 xcb* xine xinerama xml xml2 xorg xulrunner xv xvid zlib" ALSA_CARDS="snd_hda_intel" 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 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" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="fbdev i810 nv nvidia tdfx trident vesa vga" (In reply to comment #1) I'm new at this so please excuse my fumbling around. It's changed from the above state. All I've done is followed the bug how to guide to debug, added debug into package.use, and re-emerged it a couple of times. After re-emerging it once, it switched from error "no hypervisor driver" to just "connection refused". Normally I can get past this, but no. I re-emerged the second time, this time the libvirtd won't even start idella@genny ~ $ sudo /etc/init.d/libvirtd start Password: * Starting libvirtd ... [ !! ] * ERROR: libvirtd failed to start However, idella@genny ~ $ gdb /usr/sbin/libvirtd warning: Can not parse XML syscalls information; XML support was disabled at compile time. GNU gdb (Gentoo 7.0.1 p1) 7.0.1 Copyright (C) 2009 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "i686-pc-linux-gnu". For bug reporting instructions, please see: <http://bugs.gentoo.org/>... Reading symbols from /usr/sbin/libvirtd...(no debugging symbols found)...done. (gdb) run Starting program: /usr/sbin/libvirtd [Thread debugging using libthread_db enabled] 18:13:05.159: warning : remoteReadConfigFile:2721 : Cannot set group when not running as root [New Thread 0xb7a08b70 (LWP 27832)] [New Thread 0xb70ffb70 (LWP 27833)] [New Thread 0xb68feb70 (LWP 27834)] [New Thread 0xb60ddb70 (LWP 27835)] [New Thread 0xb58c5b70 (LWP 27836)] [New Thread 0xb50c4b70 (LWP 27837)] 18:13:05.252: error : udevStrToLong_ui:73 : Failed to convert '00f6' to unsigned int ^X^Z Program received signal SIGTSTP, Stopped (user). 0xb7fe0430 in __kernel_vsyscall () (gdb) bt #0 0xb7fe0430 in __kernel_vsyscall () #1 0xb7b5ecb7 in pthread_join () from /lib/libpthread.so.0 #2 0x0805bc6a in ?? () #3 0xb7a22bb5 in __libc_start_main () from /lib/libc.so.6 #4 0x08054961 in ?? () I don't now how relevant this is given the libvirtd wouldn't supposedly start. However, idella@genny ~ $ ls /var/run/libvirt libvirt-sock libvirt-sock-ro lxc network Now this really puzzles. I'd have thought they shouldn't be there if the daemon wouldn't start. But they are. Any attempts to connect must go through libvirt, so as expected, idella@genny ~ $ sudo virt-install Password: ERROR unable to connect to '/var/run/libvirt/libvirt-sock': Connection refused Traceback (most recent call last): File "/usr/bin/virt-install", line 943, in <module> main() File "/usr/bin/virt-install", line 715, in main conn = cli.getConnection(options.connect) File "/usr/lib/python2.6/site-packages/virtinst/cli.py", line 162, in getConnection conn = open_connection(connect) File "/usr/lib/python2.6/site-packages/virtinst/cli.py", line 177, in open_connection open_flags) File "/usr/lib/python2.6/site-packages/libvirt.py", line 111, in openAuth if ret is None:raise libvirtError('virConnectOpenAuth() failed') libvirtError: unable to connect to '/var/run/libvirt/libvirt-sock': Connection refused Similar for virt-manager. I don't know what happened to no driver, but it fails to connect (In reply to comment #2) > (In reply to comment #1) > > I'm new at this so please excuse my fumbling around. All I've done is followed the bug how to guide to debug, added > debug into package.use, and re-emerged it a couple of times. > After re-emerging it once, it switched from error "no hypervisor driver" > to just "connection refused". > > idella@genny ~ $ sudo /etc/init.d/libvirtd start > Password: > * Starting libvirtd ... > [ !! ] > * ERROR: libvirtd failed to start > > However, > > idella@genny ~ $ gdb /usr/sbin/libvirtd > > warning: Can not parse XML syscalls information; XML support was disabled at > compile time. > GNU gdb (Gentoo 7.0.1 p1) 7.0.1 > Copyright (C) 2009 Free Software Foundation, Inc. > License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> > This is free software: you are free to change and redistribute it. > There is NO WARRANTY, to the extent permitted by law. Type "show copying" > and "show warranty" for details. > This GDB was configured as "i686-pc-linux-gnu". > For bug reporting instructions, please see: > <http://bugs.gentoo.org/>... > Reading symbols from /usr/sbin/libvirtd...(no debugging symbols found)...done. > (gdb) run > Starting program: /usr/sbin/libvirtd > [Thread debugging using libthread_db enabled] > 18:13:05.159: warning : remoteReadConfigFile:2721 : Cannot set group when not > running as root > [New Thread 0xb7a08b70 (LWP 27832)] > [New Thread 0xb70ffb70 (LWP 27833)] > [New Thread 0xb68feb70 (LWP 27834)] > [New Thread 0xb60ddb70 (LWP 27835)] > [New Thread 0xb58c5b70 (LWP 27836)] > [New Thread 0xb50c4b70 (LWP 27837)] > 18:13:05.252: error : udevStrToLong_ui:73 : Failed to convert '00f6' to > unsigned int > > ^X^Z > Program received signal SIGTSTP, Stopped (user). > 0xb7fe0430 in __kernel_vsyscall () > (gdb) bt > #0 0xb7fe0430 in __kernel_vsyscall () > #1 0xb7b5ecb7 in pthread_join () from /lib/libpthread.so.0 > #2 0x0805bc6a in ?? () > #3 0xb7a22bb5 in __libc_start_main () from /lib/libc.so.6 > #4 0x08054961 in ?? () > > judging from another bug of which libvirt has many, it seems this is from the simple presence of the pid file. Remove the pid file once and idella@gentoo64 ~ $ sudo /etc/init.d/libvirtd restart Password: * Stopping libvirtd ... [ ok ] * Starting libvirtd ... [ ok ] > >So the driver absence is the probelem. > > idella@gentoo64 ~ $ sudo gdb virsh warning: Can not parse XML syscalls information; XML support was disabled at compile time. GNU gdb (Gentoo 7.0.1 p1) 7.0.1 Copyright (C) 2009 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-pc-linux-gnu". For bug reporting instructions, please see: <http://bugs.gentoo.org/>... Reading symbols from /usr/bin/virsh...(no debugging symbols found)...done. (gdb) run -c qemu:/// Starting program: /usr/bin/virsh -c qemu:/// [Thread debugging using libthread_db enabled] error: no hypervisor driver available for qemu:/// error: failed to connect to the hypervisor Program exited with code 01. and idella@gentoo64 ~ $ sudo virt-install ERROR No 'Guest' class for virtualization type 'lxc' Traceback (most recent call last): File "/usr/bin/virt-install", line 943, in <module> main() File "/usr/bin/virt-install", line 742, in main guest = installer.guest_from_installer() File "/usr/lib64/python2.6/site-packages/virtinst/Installer.py", line 378, in guest_from_installer % self.type)) ValueError: No 'Guest' class for virtualization type 'lxc' virt-install ofcourse uses libvirt, so here is another point of failure. I suspect the python packages are not at fault..?? Try rebuild app-emulation/libvirt with USE="qemu" (In reply to comment #4) > Try rebuild app-emulation/libvirt with USE="qemu" > Sorry for being so verbose and duplicating. You are on the money. All that and such a short and simple remedy. Very good, thanks. idella@gentoo64 ~ $ virsh -c qemu error: no hypervisor driver available for qemu error: failed to connect to the hypervisor idella@gentoo64 ~ $ sudo virsh -c qemu Password: error: no hypervisor driver available for qemu error: failed to connect to the hypervisor idella@gentoo64 ~ $ su Password: gentoo64 idella # virsh Welcome to virsh, the virtualization interactive terminal. Type: 'help' for help with commands 'quit' to quit virsh # connect qemu:/// error: Failed to connect to the hypervisor error: internal error unexpected QEMU URI path '/', try qemu:///system virsh # connect qemu:///system virsh # and idella@gentoo64 ~ $ sudo virt-install Password: ERROR A name is required for the virtual machine. (use --prompt to run interactively) yes and yes. Does this mean to get full connectivity, compile with USE="qemu kvm xen" emerge libvirt ?? Well I tried it anyway. Gentoo is up there. *** This bug has been marked as a duplicate of bug 305407 *** |