Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 451584 - app-emulation/libvirt-1.0.1 - does not start LXC VM
Summary: app-emulation/libvirt-1.0.1 - does not start LXC VM
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal
Assignee: Doug Goldstein (RETIRED)
URL: http://libvirt.org/git/?p=libvirt.git...
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2013-01-12 23:13 UTC by eroen
Modified: 2013-06-04 23:09 UTC (History)
2 users (show)

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


Attachments
Patch to functionally revert df33ecdd (revert-df33ecdd.patch,1.49 KB, patch)
2013-01-13 23:31 UTC, eroen
Details | Diff
Patch to functionally revert df33ecdd -r1 (0000-revert-df33ecdd.patch,2.52 KB, patch)
2013-01-14 01:13 UTC, eroen
Details | Diff
Error message, libvirt-1.0.1 with suggested patch (file_451584.txt,2.90 KB, text/plain)
2013-02-05 17:20 UTC, eroen
Details
Error message, libvirt-1.0.2-r1 with no local patches (file_451584.txt,3.24 KB, text/plain)
2013-02-05 17:21 UTC, eroen
Details
Error message, libvirt-1.0.2-r1 with no local patches v.2 (file_451584.txt,3.11 KB, text/plain)
2013-02-05 17:25 UTC, eroen
Details

Note You need to log in before you can comment on or make changes to this bug.
Description eroen 2013-01-12 23:13:00 UTC
With libvirt-1.0.1 I can no longer start LXC VMs from virt-manager. This applies to both pre-existing ones that worked with (I think) 1.0.0 and newly created (with the wizard) VMs.

Reproducible: Always

Steps to Reproduce:
1. emerge =libvirt-1.0.1 virt-manager ; /etc/init.d/libvirt restart
2. Extract a gentoo stage-3 somewhere, and put rc_sys="" in etc/rc.conf .
3. Start virt-manager, start the (system) LXC connection.
4. Follow the wizard for creating a new OS level LXC VM, selecting the folder you extracted the stage-3 to, and otherwise the defaults (NAT network, mostly).
5. Hit Finish button in wizard to boot the LXC VM.
Actual Results:  
An error message with the following is presented:

Unable to complete install: 'internal error guest failed to start: PATH=/bin:/sbin TERM=linux container=lxc-libvirt container_uuid=@@UUID-1@@ LIBVIRT_LXC_UUID=@@UUID-1@@ LIBVIRT_LXC_NAME=lxctest /sbin/init
2013-01-12 22:55:33.519+0000: 1: info : libvirt version: 1.0.1
2013-01-12 22:55:33.519+0000: 1: error : lxcContainerMountProcFuse:615 : Failed to mount /.oldroot//var/run/libvirt/lxc/lxctest/meminfo on /proc/meminfo: No such file or directory
2013-01-12 22:55:33.519+0000: 112320: info : libvirt version: 1.0.1
2013-01-12 22:55:33.519+0000: 112320: error : virLXCControllerRun:1451 : Unable to send container continue message: Broken pipe
2013-01-12 22:55:33.533+0000: 112320: error : virCommandWait:2287 : internal error Child process (ip link del veth1) unexpected exit status 1: Cannot find device "veth1"

'


>Details

Unable to complete install: 'internal error guest failed to start: PATH=/bin:/sbin TERM=linux container=lxc-libvirt container_uuid=@@UUID-1@@ LIBVIRT_LXC_UUID=@@UUID-1@@ LIBVIRT_LXC_NAME=lxctest /sbin/init
2013-01-12 22:55:33.519+0000: 1: info : libvirt version: 1.0.1
2013-01-12 22:55:33.519+0000: 1: error : lxcContainerMountProcFuse:615 : Failed to mount /.oldroot//var/run/libvirt/lxc/lxctest/meminfo on /proc/meminfo: No such file or directory
2013-01-12 22:55:33.519+0000: 112320: info : libvirt version: 1.0.1
2013-01-12 22:55:33.519+0000: 112320: error : virLXCControllerRun:1451 : Unable to send container continue message: Broken pipe
2013-01-12 22:55:33.533+0000: 112320: error : virCommandWait:2287 : internal error Child process (ip link del veth1) unexpected exit status 1: Cannot find device "veth1"

'

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/asyncjob.py", line 96, in cb_wrapper
    callback(asyncjob, *args, **kwargs)
  File "/usr/share/virt-manager/virtManager/create.py", line 1943, in do_install
    guest.start_install(False, meter=meter)
  File "/usr/lib64/python2.7/site-packages/virtinst/Guest.py", line 1249, in start_install
    noboot)
  File "/usr/lib64/python2.7/site-packages/virtinst/Guest.py", line 1317, in _create_guest
    dom = self.conn.createLinux(start_xml or final_xml, 0)
  File "/usr/lib64/python2.7/site-packages/libvirt.py", line 2610, in createLinux
    self._o = None
libvirtError: internal error guest failed to start: PATH=/bin:/sbin TERM=linux container=lxc-libvirt container_uuid=@@UUID-1@@ LIBVIRT_LXC_UUID=@@UUID-1@@ LIBVIRT_LXC_NAME=lxctest /sbin/init
2013-01-12 22:55:33.519+0000: 1: info : libvirt version: 1.0.1
2013-01-12 22:55:33.519+0000: 1: error : lxcContainerMountProcFuse:615 : Failed to mount /.oldroot//var/run/libvirt/lxc/lxctest/meminfo on /proc/meminfo: No such file or directory
2013-01-12 22:55:33.519+0000: 112320: info : libvirt version: 1.0.1
2013-01-12 22:55:33.519+0000: 112320: error : virLXCControllerRun:1451 : Unable to send container continue message: Broken pipe
2013-01-12 22:55:33.533+0000: 112320: error : virCommandWait:2287 : internal error Child process (ip link del veth1) unexpected exit status 1: Cannot find device "veth1"



(@@UUID-1@@ is the same UUID each time.)

Expected Results:  
VM should have booted.

AFAICT this works as expected with both libvirt-0.10.2.1 and 1.0.0.

The same problem appears with Application LXCs.

I'm not familiar with the virsh commands or other methods of interacting with libvirt without virt-manager, so I haven't tried that, but if someone thinks that would be helpful, I can certainly follow instructions if provided/linked.

$ emerge --info libvirt virt-manager
Portage 2.2.0_alpha150 (default/linux/amd64/10.0, gcc-4.6.3, glibc-2.16.0, 3.7.1-gentoofalcon1 x86_64)
=================================================================
                        System Settings
=================================================================
System uname: Linux-3.7.1-gentoofalcon1-x86_64-Intel-R-_Core-TM-2_Quad_CPU_@_2.40GHz-with-gentoo-2.2
Timestamp of tree: Thu, 10 Jan 2013 22:00:01 +0000
ld GNU ld (GNU Binutils) 2.23.1
distcc 3.1 x86_64-pc-linux-gnu [disabled]
ccache version 3.1.9 [disabled]
app-shells/bash:          4.2_p42
dev-java/java-config:     2.1.12-r1
dev-lang/python:          2.7.3-r3, 3.2.3-r2
dev-util/ccache:          3.1.9
dev-util/cmake:           2.8.10.2-r1
dev-util/pkgconfig:       0.27.1
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.11.8
sys-apps/sandbox:         2.6
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.9.6-r3, 1.11.6, 1.12.6
sys-devel/binutils:       2.23.1
sys-devel/gcc:            4.5.4, 4.6.3
sys-devel/gcc-config:     1.8
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.7 (virtual/os-headers)
sys-libs/glibc:           2.16.0
Repositories: gentoo eroen-overlay
ACCEPT_KEYWORDS="amd64 ~amd64 ~x86"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=core2 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/openvpn/easy-rsa /usr/share/polkit-1/actions /usr/share/themes/oxygen-gtk/gtk-2.0"
CONFIG_PROTECT_MASK="${EPREFIX}/etc/gconf /etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=core2 -O2 -pipe"
DISTDIR="/var/distfiles"
EMERGE_DEFAULT_OPTS="--jobs 3 --nospinner --quiet-build --with-bdeps=y --binpkg-respect-use y"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs candy config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms unknown-features-warn unmerge-logs unmerge-orphans userfetch xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="/var/temdist/ /var/distfiles-occam/ http://mirrors.eu.kernel.org/gentoo/ http://mirrors.kernel.org/gentoo/ http://distfiles.gentoo.org http://www.ibiblio.org/pub/Linux/distributions/gentoo"
LANG="en_GB.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j6"
PKGDIR="/var/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/eroen-overlay"
SYNC="rsync://mirrors.eu.kernel.org/gentoo-portage/"
USE="X a52 aac aacs accessibility acl adns alsa amd64 ao atm avahi berkdb bluray bzip2 cairo calendar canberra caps cdda cdio cdr cli consolekit corefonts cracklib crypt css cue cups curl cxx dbus dia dirac djvu dmapi dri dts dvd dvdnav dvi ebook eds eigen exif fam fbcondecor ffmpeg fftw fits flac fontconfig fortran fuse g3dvl gcrypt gd gdbm gif gimp git gmp gnome gnome-keyring gnutls gold gpm gstreamer hdri highlight iconv icu id3tag idn imagemagick inotify iptc ipv6 jpeg kde kdepim kvm lcms lensfun libnotify loop-aes lqr lzma lzo mad man matroska midi mikmod mkv mms mmx mmxext mng mod modplug modules mp3 mp4 mpeg mpeg2 mpeg4 mpeg4pt2 mplayer mtp mudflap multilib musepack nautilus ncurses netlink networkmanager nfs nls nouveau nptl ocr offensive ogg openal opencl openexr opengl opengtl openmp openvg optimization osmesa pam pango panorama pcre pdf png pnm policykit portaudio postscript pppd pulseaudio qalculate qemu qt3support qt4 rar raw rdesktop readline rtmp samba scanner schroedinger security semantic-desktop session smp sndfile socks5 speex spice sse sse2 sse3 ssl ssse3 strong-optimization svg tbb tcpd theora threads tiff timidity tls truetype udev uml unicode usb usbredir v4l v4l2 vino virtualbox vnc vorbis wacom wavpack webp wmf x264 xattr xcb xcomposite xetex xfs xft xine xinerama xorg xps xrandr xv xvid xvmc zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" 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="authn_core authz_core socache_shmcb unixd 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 cgi cgid 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" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CURL_SSL="gnutls" DRACUT_MODULES="biosdevname caps crypt crypt-gpg dmraid lvm mdraid syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" GRUB_PLATFORMS="efi-64 pc qemu" INPUT_DEVICES="evdev keyboard mouse synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="nlpsolver presenter-console presenter-minimizer" LINGUAS="en en_US en_GB nb no nb_NO" PHP_TARGETS="php5-3" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="nouveau nvidia nv vesa" XFCE_PLUGINS="menu" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON

=================================================================
                        Package Settings
=================================================================

app-emulation/libvirt-1.0.1 was built with the following:
USE="avahi caps libvirtd lvm lxc macvtap (multilib) nfs nls parted pcap python qemu sasl udev uml vepa virt-network virtualbox -audit -debug -firewalld -iscsi -numa -openvz -phyp -policykit -rbd (-selinux) -xen"


app-emulation/virt-manager-0.9.4 was built with the following:
USE="(multilib) spice vnc -gnome-keyring -policykit -sasl"
Comment 1 eroen 2013-01-13 22:17:21 UTC
A git bisect indicates df33ecdd as the commit introducing this issue.

commit df33ecdd9e897cf6af56e2120d44bfbcccc80a32
Author: Gao feng <gaofeng@cn.fujitsu.com>
Date:   Mon Nov 12 15:02:28 2012 +0800

    mount fuse's meminfo file to container's /proc/meminfo
    
    we already have virtualize meminfo for container through fuse filesystem,
    add function lxcContainerMountProcFuse to mount this meminfo file to
    the container's /proc/meminfo.
    
    So we can isolate container's /proc/meminfo from host now.
    
    Signed-off-by: Gao feng <gaofeng@cn.fujitsu.com>
Comment 2 eroen 2013-01-13 23:31:07 UTC
Created attachment 335540 [details, diff]
Patch to functionally revert df33ecdd

Commit df33ecdd can't be reverted trivially due to later changes, so here's a patch removing the calls to the function introduced.

This let's me boot my VMs without creating other visible complaints, but I don't make any claim to understanding the exact purpose of the removed function calls or why they cause a problem.
Comment 3 eroen 2013-01-14 01:13:16 UTC
Created attachment 335550 [details, diff]
Patch to functionally revert df33ecdd -r1

Oops, previous patch a) fails to build and b) is against latest git revision. This one works as advertised with libvirt-1.0.1 from portage.
Comment 4 Doug Goldstein (RETIRED) gentoo-dev 2013-01-24 03:57:43 UTC
Try the referenced patch. The easiest way to do this would be to do:

$ mkdir -p /etc/portage/patches/app-emulation/libvirt-1.0.1
$ wget -O /etc/portage/patches/app-emulation/libvirt-1.0.1/0001-lxc-fix.patch "http://libvirt.org/git/?p=libvirt.git;a=patch;h=ae9874e471fc61d9d654247c2fd24d9baa455afa"
$ emerge -1 libvirt
$ /etc/init.d/libvirtd reload

Please report back if this fixes your issue.
Comment 5 eroen 2013-02-05 17:19:53 UTC
Hi, sorry about the delay.

I have now tried the patch you suggested against libvirt-1.0.1, and found it does not solve the issue. It changes the traceback in the error message somewhat, thus I will attach it.

I have also tested app-emulation/libvirt-1.0.2-r1 without any local patches applied. After the update
a) All my configured VMs disappeared. A nuisance, but nontheless. They returned with a downgrade.
b) Trying to start a (necessarily newly created) LXC fails with a (subtly) different error message from before, I will attach that too.

I'm reopening the bug, feel free to yell at me if that's not what I'm supposed to do.
Comment 6 eroen 2013-02-05 17:20:34 UTC
Created attachment 338022 [details]
Error message, libvirt-1.0.1 with suggested patch
Comment 7 eroen 2013-02-05 17:21:09 UTC
Created attachment 338024 [details]
Error message, libvirt-1.0.2-r1 with no local patches
Comment 8 eroen 2013-02-05 17:25:51 UTC
Created attachment 338026 [details]
Error message, libvirt-1.0.2-r1 with no local patches v.2

Easierly diffable to earlier logs.
Comment 9 Mark (voidzero) 2013-04-12 16:49:46 UTC
Coincidentally found this bug. As we are at libvirt 1.0.4 now for ~amd64, is the bug still alive in this version?
Comment 10 eroen 2013-04-15 07:46:38 UTC
(I haven't followed new releases for a while, but used the attached patch with 1.0.1)

This problem appears to have gone away in libvirt-1.0.4 (or possibly earlier). Application LXCs seem to work fine, and OS LXCs give me a new and very different error message. Interesting times.

Closing as fixed.
Comment 11 eroen 2013-04-15 16:55:37 UTC
Disregard that, I can't type paths correctly. The same error seems to still be printed in a slightly modified format, with libvirt-1.0.4 and current -9999. Now application LXCs work, though, at least the trivial one I accidentally made. 

Toggling the fuse use-flag does not affect this.

Don't mind me putting this https://www.redhat.com/archives/libvirt-users/2013-February/msg00028.html here so I won't lose it.
Comment 12 Doug Goldstein (RETIRED) gentoo-dev 2013-06-04 21:50:23 UTC
Give it another whirl with 1.0.6. I've finally got this working for me with that.
Comment 13 eroen 2013-06-04 23:09:55 UTC
Thank you very much! With libvirt-1.0.6 booting LXCs seems to Just Work again. :-D

I have only done cursory testing, but any other issues should go in other bugs, I guess.