[Lxc-users] natty without network isolation

webcubator webcubator webcubator at mail.ru
Fri Jun 3 12:57:40 UTC 2011


Hello!

Shortly...

I want to install natty as guest without network isolation
The problem is lxc-start hangs in this case
If I add network all works fine

With this network settings all works fine
-- cut --
lxc.network.type=veth
-- ent cut --

But network is isolated and I doesn't want to isolate network

============================

Bellow details, what I do exactly:

# dpkg -l | grep lxc
ii  lxc                             0.7.4-0ubuntu7.1                           Linux containers userspace tools

# uname -a
Linux XXX 2.6.38-8-virtual #42-Ubuntu SMP Mon Apr 11 07:04:38 UTC 2011 i686 i686 i386 GNU/Linux

# lxc-create -t natty -n natty01 
Warning: 
------- 
Usually the template option is called with a configuration 
file option too, mostly to configure the network. 
eg. lxc-create -n foo -f lxc.conf -t debian 
The configuration file is often: 
lxc.network.type=macvlan 
lxc.network.link=eth0 
lxc.network.flags=up 
or alternatively: 
lxc.network.type=veth 
lxc.network.link=br0 
lxc.network.flags=up 
For more information look at lxc.conf (5) 
At this point, I assume you know what you do. 
Press <enter> to continue ... 
... press enter here ... 
debootstrap is /usr/sbin/debootstrap 
Checking cache download in /var/cache/lxc/natty/rootfs-i386 ... 
... skipped ... 
'natty01' created 

# lxc-start -n natty01 -o log -l debug -- /sbin/init --verbose
init: Handling startup event
init: mountall goal changed from stop to start
init: mountall state changed from waiting to starting
init: hostname goal changed from stop to start
init: hostname state changed from waiting to starting
init: Handling starting event
init: plymouth goal changed from stop to start
init: plymouth state changed from waiting to starting
init: hwclock goal changed from stop to start
init: hwclock state changed from waiting to starting
init: lxcmount goal changed from stop to start
init: lxcmount state changed from waiting to starting
init: Handling starting event
init: hostname state changed from starting to pre-start
init: hostname state changed from pre-start to spawned
init: hostname main process (2)
init: hostname state changed from spawned to post-start
init: hostname state changed from post-start to running
init: Handling starting event
init: plymouth state changed from starting to pre-start
init: plymouth state changed from pre-start to spawned
init: plymouth main process (3)
init: Handling starting event
init: hwclock state changed from starting to pre-start
init: hwclock state changed from pre-start to spawned
init: hwclock main process (4)
init: hwclock state changed from spawned to post-start
init: hwclock state changed from post-start to running
init: Handling starting event
init: lxcmount state changed from starting to pre-start
init: lxcmount pre-start process (5)
init: Handling started event
init: Handling started event
init: hostname main process (2) exited normally
init: hostname goal changed from start to stop
init: hostname state changed from running to stopping
init: lxcmount pre-start process (5) exited normally
init: lxcmount state changed from pre-start to spawned
init: lxcmount main process (6)
init: lxcmount state changed from spawned to post-start
init: lxcmount state changed from post-start to running
init: hwclock main process (4) exited normally
init: hwclock goal changed from start to stop
init: hwclock state changed from running to stopping
init: Handling stopping event
init: hostname state changed from stopping to killed
init: hostname state changed from killed to post-stop
init: hostname state changed from post-stop to waiting
init: Handling started event
init: Handling stopping event
init: hwclock state changed from stopping to killed
init: hwclock state changed from killed to post-stop
init: hwclock state changed from post-stop to waiting
init: Handling stopped event
init: Handling stopped event
init: plymouth main process (3) executable changed
init: lxcmount main process (6) exited normally
init: lxcmount goal changed from start to stop
init: lxcmount state changed from running to stopping
init: plymouth main process (3) became new process (7)
init: plymouth state changed from spawned to post-start
init: plymouth post-start process (8)
init: Handling stopping event
init: lxcmount state changed from stopping to killed
init: lxcmount state changed from killed to post-stop
init: lxcmount state changed from post-stop to waiting
init: Handling stopped event
init: plymouth post-start process (8) exited normally
init: plymouth state changed from post-start to running
init: mountall state changed from starting to pre-start
init: mountall state changed from pre-start to spawned
init: mountall main process (9)
init: Handling started event
init: mountall main process (9) executable changed
init: mountall main process (9) became new process (10)
init: mountall main process (10) became new process (11)
init: mountall state changed from spawned to post-start
init: mountall state changed from post-start to running
init: Handling started event
init: mountall main process (11) exited normally
init: mountall goal changed from start to stop
init: mountall state changed from running to stopping
init: Handling stopping event
init: mountall state changed from stopping to killed
init: mountall state changed from killed to post-stop
init: mountall post-stop process (23)
init: mountall post-stop process (23) exited normally
init: mountall state changed from post-stop to waiting
init: Handling stopped event

... at this point lxc-start hangs ...

The log is:

# cat ./log
      lxc-start 1307130435.747 DEBUG    lxc_conf - allocated pty '/dev/pts/2' (4/5)
      lxc-start 1307130435.748 DEBUG    lxc_conf - allocated pty '/dev/pts/3' (6/7)
      lxc-start 1307130435.748 DEBUG    lxc_conf - allocated pty '/dev/pts/4' (8/9)
      lxc-start 1307130435.748 DEBUG    lxc_conf - allocated pty '/dev/pts/5' (10/11)
      lxc-start 1307130435.749 INFO     lxc_conf - tty's configured
      lxc-start 1307130435.749 DEBUG    lxc_console - using '/dev/tty' as console
      lxc-start 1307130435.749 DEBUG    lxc_start - sigchild handler set
      lxc-start 1307130435.749 INFO     lxc_start - 'natty01' is initialized
      lxc-start 1307130435.759 DEBUG    lxc_cgroup - using cgroup mounted at '/sys/fs/cgroup'
      lxc-start 1307130435.760 DEBUG    lxc_cgroup - cgroup flags is 0x1
      lxc-start 1307130435.760 WARN     lxc_cgroup - using deprecated ns_cgroup
      lxc-start 1307130435.760 DEBUG    lxc_cgroup - '/sys/fs/cgroup/14326' renamed to '/sys/fs/cgroup/natty01'
      lxc-start 1307130435.761 INFO     lxc_conf - 'natty01' hostname has been setup
      lxc-start 1307130435.762 DEBUG    lxc_conf - mounted '/var/lib/lxc/natty01/rootfs' on '/usr/lib/lxc'
      lxc-start 1307130435.764 DEBUG    lxc_conf - mounted 'proc' on '/usr/lib/lxc/proc', type 'proc'
      lxc-start 1307130435.764 DEBUG    lxc_conf - mounted 'sysfs' on '/usr/lib/lxc/sys', type 'sysfs'
      lxc-start 1307130435.764 INFO     lxc_conf - mount points have been setup
      lxc-start 1307130435.765 INFO     lxc_conf - mount points have been setup
      lxc-start 1307130435.766 DEBUG    lxc_cgroup - using cgroup mounted at '/sys/fs/cgroup'
      lxc-start 1307130435.767 DEBUG    lxc_conf - cgroup 'devices.deny' set to 'a'
      lxc-start 1307130435.768 DEBUG    lxc_conf - cgroup 'devices.allow' set to 'c 1:3 rwm'
      lxc-start 1307130435.769 DEBUG    lxc_conf - cgroup 'devices.allow' set to 'c 1:5 rwm'
      lxc-start 1307130435.769 DEBUG    lxc_conf - cgroup 'devices.allow' set to 'c 5:1 rwm'
      lxc-start 1307130435.769 DEBUG    lxc_conf - cgroup 'devices.allow' set to 'c 5:0 rwm'
      lxc-start 1307130435.769 DEBUG    lxc_conf - cgroup 'devices.allow' set to 'c 1:9 rwm'
      lxc-start 1307130435.769 DEBUG    lxc_conf - cgroup 'devices.allow' set to 'c 1:8 rwm'
      lxc-start 1307130435.769 DEBUG    lxc_conf - cgroup 'devices.allow' set to 'c 136:* rwm'
      lxc-start 1307130435.770 DEBUG    lxc_conf - cgroup 'devices.allow' set to 'c 5:2 rwm'
      lxc-start 1307130435.770 DEBUG    lxc_conf - cgroup 'devices.allow' set to 'c 254:0 rwm'
      lxc-start 1307130435.770 INFO     lxc_conf - cgroup has been setup
      lxc-start 1307130435.770 INFO     lxc_conf - console has been setup
      lxc-start 1307130435.770 INFO     lxc_conf - 4 tty(s) has been setup
      lxc-start 1307130435.770 DEBUG    lxc_conf - mountpoint for old rootfs is '/usr/lib/lxc/mnt'
      lxc-start 1307130435.770 DEBUG    lxc_conf - pivot_root syscall to '/usr/lib/lxc' successful
      lxc-start 1307130435.771 DEBUG    lxc_conf - umounted '/mnt/dev/pts'
      lxc-start 1307130435.771 DEBUG    lxc_conf - umounted '/mnt/dev/shm'
      lxc-start 1307130435.771 DEBUG    lxc_conf - umounted '/mnt/sys/fs/fuse/connections'
      lxc-start 1307130435.772 DEBUG    lxc_conf - umounted '/mnt/sys/kernel/debug'
      lxc-start 1307130435.772 DEBUG    lxc_conf - umounted '/mnt/sys/kernel/security'
      lxc-start 1307130435.772 DEBUG    lxc_conf - umounted '/mnt/sys/fs/cgroup'
      lxc-start 1307130435.772 DEBUG    lxc_conf - umounted '/mnt/proc'
      lxc-start 1307130435.772 DEBUG    lxc_conf - umounted '/mnt/var/run'
      lxc-start 1307130435.772 DEBUG    lxc_conf - umounted '/mnt/var/lock'
      lxc-start 1307130435.772 DEBUG    lxc_conf - umounted '/mnt/dev'
      lxc-start 1307130435.772 INFO     lxc_conf - lazy unmount of '/mnt'
      lxc-start 1307130435.772 WARN     lxc_conf - failed to unmount '/mnt/sys'
      lxc-start 1307130435.772 INFO     lxc_conf - created new pts instance
      lxc-start 1307130435.772 DEBUG    lxc_conf - capabilities has been setup
      lxc-start 1307130435.772 NOTICE   lxc_conf - 'natty01' is setup.
      lxc-start 1307130435.773 NOTICE   lxc_start - exec'ing '/sbin/init'
      lxc-start 1307130435.776 NOTICE   lxc_start - '/sbin/init' started with pid '14326'
      lxc-start 1307130435.777 DEBUG    lxc_utmp - Added '/proc/14326/root/var/run' to inotifywatch
      lxc-start 1307130523.309 DEBUG    lxc_cgroup - using cgroup mounted at '/sys/fs/cgroup'
      lxc-start 1307130523.329 DEBUG    lxc_start - container init process exited
      lxc-start 1307130523.330 INFO     lxc_error - child <14326> ended on signal (9)
      lxc-start 1307130523.331 DEBUG    lxc_cgroup - using cgroup mounted at '/sys/fs/cgroup'
      lxc-start 1307130523.336 DEBUG    lxc_cgroup - '/sys/fs/cgroup/natty01' unlinked


If I add this:
-- cut --
lxc.network.type=veth
-- ent cut --

All works:

# lxc-start -n natty01 -o log -l debug -- /sbin/init --verbose
... skipped ...
init: plymouth-stop state changed from post-stop to waiting
init: Handling stopped/failed event
init: Handling stopped event

Ubuntu 11.04 natty01 /dev/console

natty01 login:


But network is isolated and I doesn't want to isolate network


More information about the lxc-users mailing list