[Lxc-users] Ubuntu (maverick) container won't start (hangs at init)

Thomas Schweikle tps at vr-web.de
Wed Dec 29 13:04:22 UTC 2010


Am 29.12.2010 13:23, schrieb Mohit Chawla:
> Try this: first invoke lxc-ubuntu as:
>
> /path/to/lxc-ubuntu --name foo --path /var/lib/lxc/foo
>
> and then add the following network section to /var/lib/lxc/foo/config:
> lxc.network.type = veth
> lxc.network.flags = up
> lxc.network.link = br0
> lxc.network.name <http://lxc.network.name> = eth0
>
> And then start the container: lxc-start --name foo
>
> I was having the same error as you are (hanging on init), and this
> is what solved my issue. I am on a Lucid host (lxc 0.6.5). I am
> using the lxc-ubuntu template from lxc-0.7.3 source.

No, I've double checked: I am configuring containers network. The
only difference: setting interfaces address to 0.0.0.0 because one
stated it would be helpful doing dhcp afterwards. I removed that
line. No change. The container hangs at init. My full configuration
file is:
--- snip ----
lxc.utsname              = tps

lxc.network.type         = veth
lxc.network.flags        = up
lxc.network.link         = vb0
lxc.network.name         = eth0
lxc.network.mtu          = 1500
lxc.network.ipv4         = 0.0.0.0/0

lxc.tty                  = 4
lxc.pts                  = 1024
lxc.rootfs               = /lxc/fs/tps
#lxc.mount                = /lxc/fs/tps.fstab

lxc.cgroup.devices.deny  = a

# /dev/null and zero
lxc.cgroup.devices.allow = c 1:3 rwm
lxc.cgroup.devices.allow = c 1:5 rwm

# consoles
lxc.cgroup.devices.allow = c 5:1 rwm
lxc.cgroup.devices.allow = c 5:0 rwm
lxc.cgroup.devices.allow = c 4:0 rwm
lxc.cgroup.devices.allow = c 4:1 rwm

# /dev/{,u}random
lxc.cgroup.devices.allow = c 1:9 rwm
lxc.cgroup.devices.allow = c 1:8 rwm
lxc.cgroup.devices.allow = c 136:* rwm
lxc.cgroup.devices.allow = c 5:2 rwm

# rtc
lxc.cgroup.devices.allow = c 254:0 rwm

# mounts (was in fstab)
lxc.mount.entry = devpts /lxc/fs/tps/dev/pts  devpts\
  defaults               0 0
lxc.mount.entry = sysfs  /lxc/fs/tps/sys      sysfs\
  defaults               0 0
lxc.mount.entry = proc   /lxc/fs/tps/proc     proc\
  nodev,noexec,nosuid    0 0
lxc.mount.entry = tmpfs  /lxc/fs/tps/var/lock tmpfs\
  rw,noexec,nosuid,nodev 0 0
lxc.mount.entry = tmpfs  /lxc/fs/tps/var/run  tmpfs\
  mode=0755              0 0
--- snap ----


BTW: please send your answers to the list! ;-)

-- 
Thomas





More information about the lxc-users mailing list