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 769752 - Fail to start LXC guest
Summary: Fail to start LXC guest
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.3
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Libvirt Maintainers
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-12-22 04:48 UTC by Rita Wu
Modified: 2013-07-03 01:44 UTC (History)
9 users (show)

Fixed In Version: libvirt-0.9.9-1.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-06-20 06:39:48 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2012:0748 0 normal SHIPPED_LIVE Low: libvirt security, bug fix, and enhancement update 2012-06-19 19:31:38 UTC

Description Rita Wu 2011-12-22 04:48:08 UTC
Description of problem:
Fail to start LXC guest

Version-Release number of selected component (if applicable):
# rpm -qa|grep libvirt
libvirt-debuginfo-0.9.8-1.el6.x86_64
libvirt-devel-0.9.8-1.el6.x86_64
libvirt-client-0.9.8-1.el6.x86_64
libvirt-0.9.8-1.el6.x86_64
libvirt-python-0.9.8-1.el6.x86_64


How reproducible:
100%

Steps to Reproduce:
1. Define a LXC guest
# cat single_toy.xml 
<domain type='lxc'>
  <name>single_toy</name>
  <uuid>386f5b25-43ee-9d62-4ce2-62c3809e47c1</uuid>
  <memory>500000</memory>
  <currentMemory>500000</currentMemory>
  <vcpu>1</vcpu>
  <os>
    <type arch='x86_64'>exe</type>
    <init>/bin/sh</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>
    <interface type='network'>
      <source network='default'/>
    </interface>
    <console type='pty'>
      <target port='0'/>
    </console>
  </devices>
</domain>

# virsh -c lxc:/// define single_toy.xml 
Domain single_toy defined from single_toy.xml


2. Start the LXC guest 
# virsh -c lxc:/// start single_toy
error: Failed to start domain single_toy
error: internal error guest failed to start: 2011-12-22 02:44:08.576+0000: 17944: info : libvirt version: 0.9.8, package: 1.el6 (Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>, 2011-12-08-10:01:37, x86-008.build.bos.redhat.com)
2011-12-22 02:44:08.576+0000: 17944: error : lxcControllerRun:1393 : unsupported configuration: Expected exactly one TTY fd
  
Actual results:
as step2 mentioned

Expected results:
Start LXC successfully.

Additional info:
it works with libvirt-0.9.4-23.el6.x86_64, so mark it as Regression

Comment 2 Dave Allan 2011-12-22 17:11:41 UTC
Dan, does this look familiar?

Comment 3 Daniel Berrangé 2011-12-22 17:50:59 UTC
Fix upstream

commit 4d82fa688ee4a1d30013e8b3be0151f2c4deace1
Author: Daniel P. Berrange <berrange>
Date:   Thu Dec 8 14:57:13 2011 +0000

    When checking nttyFDs to see if it is != 1, be sure to use '1' and not '-1'
    
    * src/lxc/lxc_controller.c: Fix check for tty count

Comment 5 Alex Jia 2012-01-10 10:07:49 UTC
The issue has been fixed on libvirt-0.9.9-1.el6.x86_64:

# virsh -c lxc:/// define toy.xml 
Domain toy defined from toy.xml

# virsh -c lxc:/// start toy
Domain toy started

# virsh -c lxc:/// list
 Id Name                 State
----------------------------------
24091 toy                  running

Comment 6 Alex Jia 2012-02-13 05:38:03 UTC
For libvirt-0.9.10-0rc2.el6.x86_64, you will meet the following known issue:

# virsh -c lxc:/// start toy
error: Failed to start domain toy
error: internal error Child process (PATH=/sbin:/usr/sbin:/bin:/usr/bin LIBVIRT_DEBUG=3 LIBVIRT_LOG_OUTPUTS=3:stderr /usr/libexec/libvirt_lxc --name toy --console 48 --handshake 51 --background --veth veth1) status unexpected: exit status 1

The above issue has been fixed on upstream:

commit d474dbaddebfce8a2f6cfc4d2c4a9c50c2fab6df
Author: Daniel P. Berrange <berrange>
Date:   Wed Feb 8 14:21:28 2012 +0000

    Populate /dev/std{in,out,err} symlinks in LXC containers
    
    Some applications expect /dev/std{in,out,err} to exist. Populate
    them during container startup as symlinks to /proc/self/fd

Comment 7 dyuan 2012-02-17 06:48:09 UTC
(In reply to comment #6)
> For libvirt-0.9.10-0rc2.el6.x86_64, you will meet the following known issue:
> 
> # virsh -c lxc:/// start toy
> error: Failed to start domain toy
> error: internal error Child process (PATH=/sbin:/usr/sbin:/bin:/usr/bin
> LIBVIRT_DEBUG=3 LIBVIRT_LOG_OUTPUTS=3:stderr /usr/libexec/libvirt_lxc --name
> toy --console 48 --handshake 51 --background --veth veth1) status unexpected:
> exit status 1
> 
> The above issue has been fixed on upstream:
> 
> commit d474dbaddebfce8a2f6cfc4d2c4a9c50c2fab6df
> Author: Daniel P. Berrange <berrange>
> Date:   Wed Feb 8 14:21:28 2012 +0000
> 
>     Populate /dev/std{in,out,err} symlinks in LXC containers
> 
>     Some applications expect /dev/std{in,out,err} to exist. Populate
>     them during container startup as symlinks to /proc/self/fd

It works fine with libvirt-0.9.10-1.el6 now.

Comment 8 Huang Wenlong 2012-03-07 05:16:37 UTC
I can reproduce this bug in RHEL7 

libvirt-0.9.7-3.el7.x86_64
qemu-kvm-0.15.1-3.2.el7.x86_64

add comment to track this bug ,we will test it again after RHEL7 libvirt upgrade to 0.9.10 from 0.9.7 .

Wenlong

Comment 10 errata-xmlrpc 2012-06-20 06:39:48 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-2012-0748.html


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