RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 861564 - fail to start lxc os container
Summary: fail to start lxc os container
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.4
Hardware: x86_64
OS: Linux
high
high
Target Milestone: rc
: ---
Assignee: Michal Privoznik
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-09-29 07:59 UTC by zhenfeng wang
Modified: 2013-02-21 07:25 UTC (History)
8 users (show)

Fixed In Version: libvirt-0.10.2-2.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-02-21 07:25:31 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2013:0276 0 normal SHIPPED_LIVE Moderate: libvirt security, bug fix, and enhancement update 2013-02-20 21:18:26 UTC

Description zhenfeng wang 2012-09-29 07:59:48 UTC
Description of problem:
fail to start lxc os container

Version-Release number of selected component (if applicable):
libvirt-0.10.2-1.el6.x86_64
qemu-kvm-0.12.1.2-2.316.el6.x86_64
kernel-2.6.32-309.el6.x86_64

How reproducible:
100%

Steps to Reproduce
1.  create a root filesytem with febootstrap
#febootstrap --groupinstall="base" "Fedora 15" /tmp/fe15 http://download.englab.nay.redhat.com/pub/fedora/linux/releases/15/Fedora/i386/os/

2.  define a OS container with following xml:
# virsh -c lxc:/// dumpxml fedora-rawhide
<domain type='lxc'>
  <name>fedora-rawhide</name>
  <uuid>6222c8db-8764-9c54-8fed-2646b8c4ef78</uuid>
  <memory unit='KiB'>524288</memory>
  <currentMemory unit='KiB'>524288</currentMemory>
  <vcpu placement='static'>1</vcpu>
  <os>
    <type arch='x86_64'>exe</type>
    <init>/sbin/init</init>
  </os>
  <clock offset='utc'/>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>destroy</on_crash>
  <devices>
    <emulator>/usr/libexec/libvirt_lxc</emulator>
    <filesystem type='mount' accessmode='passthrough'>
      <source dir='/tmp/fe15'/>
      <target dir='/'/>
    </filesystem>
    <interface type='network'>
      <mac address='52:54:00:f0:1e:4c'/>
      <source network='default'/>
    </interface>
    <console type='pty'>
      <target type='lxc' port='0'/>
    </console>
  </devices>
</domain>
# virsh -c lxc:/// define fedora-rawhide.xml
Domain toy defined from toy.xml

3. start container
# virsh -c lxc:/// start fedora-rawhide
error: Failed to start domain fedora-rawhide
error: internal error guest failed to start: PATH=/bin:/sbin TERM=linux container=lxc-libvirt container_uuid=6222c8db-8764-9c54-8fed-2646b8c4ef78 LIBVIRT_LXC_UUID=6222c8db-8764-9c54-8fed-2646b8c4ef78 LIBVIRT_LXC_NAME=fedora-rawhide /sbin/init
2012-09-29 07:42:38.899+0000: 1: info : libvirt version: 0.10.2, package: 1.el6 (Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>, 2012-09-24-04:06:26, x86-009.build.bos.redhat.com)
2012-09-29 07:42:38.899+0000: 1: error : lxcContainerGetSubtree:1199 : Failed to read /proc/mounts: No such file or directory
2012-09-29 07:42:38.914+0000: 24656: info : libvirt version: 0.10.2, package: 1.el6 (Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>, 2012-09-24-04:06:26, x86-009.build.bos.redhat.com)
2012-09-29 07:42:38.914+0000: 24656: error : virLXCControllerRun:1412 : Unable to send container continue message: Broken pipe

Actual results:
Fail to start

Expected results:
the lxc os container should start successfully and no reporting error
Additional info
libvirtd.log

2012-09-29 07:42:38.927+0000: 23361: error : virNetSocketReadWire:1176 : Cannot recv data: Connection reset by peer
2012-09-29 07:42:39.027+0000: 23364: error : virLXCProcessStart:1145 : internal error guest failed to start: PATH=/bin:/sbin TERM=linux container=lxc-libvirt container_uuid=6222c8db-8764-9c54-8fed-2646b8c4ef78 LIBVIRT_LXC_UUID=6222c8db-8764-9c54-8fed-2646b8c4ef78 LIBVIRT_LXC_NAME=fedora-rawhide /sbin/init
2012-09-29 07:42:38.899+0000: 1: info : libvirt version: 0.10.2, package: 1.el6 (Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>, 2012-09-24-04:06:26, x86-009.build.bos.redhat.com)
2012-09-29 07:42:38.899+0000: 1: error : lxcContainerGetSubtree:1199 : Failed to read /proc/mounts: No such file or directory
2012-09-29 07:42:38.914+0000: 24656: info : libvirt version: 0.10.2, package: 1.el6 (Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>, 2012-09-24-04:06:26, x86-009.build.bos.redhat.com)
2012-09-29 07:42:38.914+0000: 24656: error : virLXCControllerRun:1412 : Unable to send container continue message: Broken pipe

2012-09-29 07:42:39.031+0000: 23364: error : virNetDevSetOnline:536 : Cannot get interface flags on 'veth0': No such device
2012-09-29 07:42:39.099+0000: 23361: error : virLXCProcessStop:701 : internal error Invalid PID -1 for container
2012-09-29 07:42:39.099+0000: 23361: error : virLXCProcessStop:701 : internal error Invalid PID -1 for container

Comment 2 zhenfeng wang 2012-09-29 08:39:59 UTC
This issue is only exsited on the lxc os container ,but not in the lxc application  container, the lxc application container  can start successfully now ,you can reference the bug 857341

Comment 3 Daniel Berrangé 2012-10-01 07:57:27 UTC
We need this fix from upstream:

commit 1532bd498a879494bb1e4757a54fce796eab368c
Author: Daniel P. Berrange <berrange>
Date:   Tue Sep 25 16:24:10 2012 +0100

    Fix start of containers with custom root filesystem
    
    A prefix change to unmount the SELinux filesystem broke starting
    of LXC containers with a custom root filesystem

Comment 4 zhenfeng wang 2012-10-08 03:32:46 UTC
As it works on libvirt-0.9.10-21.el6.x86_64, so mark this bug a regression bug.

Comment 8 Wayne Sun 2012-10-09 08:00:28 UTC
pkgs:
libvirt-0.10.2-2.el6.x86_64
kernel-2.6.32-306.el6.x86_64

steps
following exact steps as in description
# virsh -c lxc:/// list --all
 Id    Name                           State
----------------------------------------------------
 -     fedora-rawhide                 shut off

# virsh -c lxc:/// dumpxml fedora-rawhide
<domain type='lxc'>
  <name>fedora-rawhide</name>
  <uuid>6222c8db-8764-9c54-8fed-2646b8c4ef78</uuid>
  <memory unit='KiB'>524288</memory>
  <currentMemory unit='KiB'>524288</currentMemory>
  <vcpu placement='static'>1</vcpu>
  <os>
    <type arch='i686'>exe</type>
    <init>/sbin/init</init>
  </os>
  <clock offset='utc'/>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>destroy</on_crash>
  <devices>
    <emulator>/usr/libexec/libvirt_lxc</emulator>
    <filesystem type='mount' accessmode='passthrough'>
      <source dir='/tmp/fe15'/>
      <target dir='/'/>
    </filesystem>
    <interface type='network'>
      <mac address='52:54:00:f0:1e:4c'/>
      <source network='default'/>
    </interface>
    <console type='pty'>
      <target type='lxc' port='0'/>
    </console>
  </devices>
</domain>

# virsh -c lxc:/// start fedora-rawhide
Domain fedora-rawhide started

# virsh -c lxc:/// list --all
 Id    Name                           State
----------------------------------------------------
 22330 fedora-rawhide                 running

This is working now.

Comment 9 errata-xmlrpc 2013-02-21 07:25:31 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHSA-2013-0276.html


Note You need to log in before you can comment on or make changes to this bug.