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 728835 - lxc guest can not start
Summary: lxc guest can not start
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.2
Hardware: x86_64
OS: Linux
high
high
Target Milestone: rc
: ---
Assignee: Daniel Veillard
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-08-08 05:25 UTC by Min Zhan
Modified: 2011-12-06 11:23 UTC (History)
7 users (show)

Fixed In Version: libvirt-0.9.4-2.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-12-06 11:23:45 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:1513 0 normal SHIPPED_LIVE libvirt bug fix and enhancement update 2011-12-06 01:23:30 UTC

Description Min Zhan 2011-08-08 05:25:50 UTC
Description of problem:
lxc guest can not start 

Version-Release number of selected component (if applicable):
# uname -r
2.6.32-165.el6.x86_64
qemu-kvm-0.12.1.2-2.175.el6.x86_64/qemu-kvm-0.12.1.2-2.176.el6.x86_64
libvirt-0.9.4-1.el6.x86_64

How reproducible:
Always

Steps to Reproduce:
1. make sure cgroup is mounted
# lscgroup
cpuset:/
cpuset:/libvirt
cpuset:/libvirt/lxc
cpuset:/libvirt/qemu
cpuset:/libvirt/qemu/rhel5
cpuset:/libvirt/qemu/rhel61
cpu:/
cpu:/libvirt
cpu:/libvirt/lxc
cpu:/libvirt/qemu
cpu:/libvirt/qemu/rhel5
cpu:/libvirt/qemu/rhel5/vcpu0
cpu:/libvirt/qemu/rhel61
cpu:/libvirt/qemu/rhel61/vcpu0
cpuacct:/
cpuacct:/libvirt
cpuacct:/libvirt/lxc
cpuacct:/libvirt/qemu
cpuacct:/libvirt/qemu/rhel5
cpuacct:/libvirt/qemu/rhel61
memory:/
memory:/libvirt
memory:/libvirt/lxc
memory:/libvirt/qemu
memory:/libvirt/qemu/rhel5
memory:/libvirt/qemu/rhel61
devices:/
devices:/libvirt
devices:/libvirt/lxc
devices:/libvirt/qemu
devices:/libvirt/qemu/rhel5
devices:/libvirt/qemu/rhel61
freezer:/
freezer:/libvirt
freezer:/libvirt/lxc
freezer:/libvirt/qemu
freezer:/libvirt/qemu/rhel5
freezer:/libvirt/qemu/rhel61
net_cls:/
blkio:/
blkio:/libvirt
blkio:/libvirt/lxc
blkio:/libvirt/qemu
blkio:/libvirt/qemu/rhel5
blkio:/libvirt/qemu/rhel61

2. prepare guest xml
# cat toy.xml
<domain type='lxc'>
  <name>vm1</name>
  <uuid>386f5b25-43ee-9d62-4ce2-58c3809e47c1</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'>
      <mac address='52:54:00:f2:2c:ac'/>
      <source network='default'/>
      <target dev='veth0'/>
    </interface>
    <console type='pty'>
      <target port='0'/>
    </console>
  </devices>
</domain>

3. start the guest
# virsh -c lxc:///
Welcome to virsh, the virtualization interactive terminal.

Type:  'help' for help with commands
       'quit' to quit

virsh # define toy.xml
Domain vm1 defined from toy.xml

virsh # list --all
 Id Name                 State
----------------------------------
  - vm1                  shut off

virsh # start vm1
error: Failed to start domain vm1
error: internal error guest failed to start: PATH=/bin:/sbin TERM=linux LIBVIRT_LXC_UUID=386f5b25-43ee-9d62-4ce2-58c3809e47c1 LIBVIRT_LXC_NAME=vm1 /bin/sh
11:17:26.260: 1: info : libvirt version: 0.9.4, package: 1.el6 (Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>, 2011-08-03-02:08:40, x86-001.build.bos.redhat.com)
11:17:26.260: 1: error : getDevNull:265 : cannot open /dev/null: No such file or directory
11:17:26.260: 1805: info : libvirt version: 0.9.4, package: 1.el6 (Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>, 2011-08-03-02:08:40, x86-001.build.bos.redhat.com)
11:17:26.260: 1805: error : lxcControllerRun:760 : error receiving signal from container: Success

virsh # list --all
 Id Name                 State
----------------------------------
  - vm1                  shut off

  
Actual results:
As above

Expected results:
guest can start well.

Additional info:
1. no related log in /var/log/messages. 

# /var/log/libvirt/lxc/vm1.log
2011-08-07 11:47:53.840: starting up
PATH=/sbin:/usr/sbin:/bin:/usr/bin LIBVIRT_DEBUG=3 LIBVIRT_LOG_OUTPUTS=3:stderr /usr/libexec/libvirt_lxc --name vm1 --console 17 --handshake 25 --background --veth veth1
PATH=/bin:/sbin TERM=linux LIBVIRT_LXC_UUID=386f5b25-43ee-9d62-4ce2-58c3809e47c1 LIBVIRT_LXC_NAME=vm1 /bin/sh
11:47:53.896: 1: info : libvirt version: 0.9.4, package: 1.el6 (Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>, 2011-08-03-02:08:40, x86-001.build.bos.redhat.com)
11:47:53.896: 1: error : getDevNull:265 : cannot open /dev/null: No such file or directory
11:47:53.896: 9342: info : libvirt version: 0.9.4, package: 1.el6 (Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>, 2011-08-03-02:08:40, x86-001.build.bos.redhat.com)
11:47:53.896: 9342: error : lxcControllerRun:760 : error receiving signal from container: Success

2. It does not exist in libvirt-0.9.3-8.el6 and libvirt-0.9.3-7.el6. So it is a regression. Also this bug will block most lxc testing.

Test in libvirt-0.9.3-7.el6:

virsh # start vm1
Domain vm1 started

virsh # exit

# virsh -c lxc:/// console vm1
Connected to domain vm1
Escape character is ^]
sh-4.1# ls
bin        dev   images  lost+found  mnt  proc  selinux  tmp
boot        etc   lib     media          net  root  srv      usr
cgroup        home  lib64   misc          opt  sbin  sys      var
sh-4.1# exit
exit

Comment 2 Daniel Veillard 2011-08-08 07:30:12 UTC
Please test with libvirt-0.9.4-1.el6, not the old 0.9.3 builds and report,

thanks,

Daniel

Comment 3 Daniel Veillard 2011-08-08 07:34:13 UTC
ah, got confused, it was with 0.9.4, okay

Daniel

Comment 4 Daniel Berrangé 2011-08-08 09:32:49 UTC
We need to pull in this patch from upstream

https://www.redhat.com/archives/libvir-list/2011-August/msg00210.html

Comment 7 dyuan 2011-08-09 10:22:52 UTC
Verified PASS with libvirt-0.9.4-2.el6.
pkgs:
qemu-kvm-0.12.1.2-2.177.el6
kernel-2.6.32-178.el6

Comment 8 errata-xmlrpc 2011-12-06 11:23:45 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/RHBA-2011-1513.html


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