[Lxc-users] (no subject)
lxc at jelmail.com
lxc at jelmail.com
Tue Sep 14 19:51:58 UTC 2010
Hello,
I have been using LXC and getting on ok. However, today, I encountered a
problem after shutting down a container. I currently have 3 containers that
all start fine on boot.
Starting a container after shutting it down (from inside with "halt") now
gives this:
# lxc-start -n mycontainer
lxc-start: Permission denied - failed to create pty #0
lxc-start: failed to create the ttys
lxc-start: failed to initialize the container
I also noticed that I can't ssh into a running container which worked fine
until I saw the above happen. I now get this:
# ssh root at 10.0.200.2
root at 10.0.200.2's password:
PTY allocation request failed on channel 0
Now I have seen a few things on google about the latter but these have not
helped. Specifically, I do have /dev/pts/ptmx defined. My configs are below:
# lxc-checkconfig
--- Namespaces ---
Namespaces: enabled
Utsname namespace: enabled
Ipc namespace: enabled
Pid namespace: enabled
User namespace: enabled
Network namespace: enabled
Multiple /dev/pts instances: enabled
--- Control groups ---
Cgroup: enabled
Cgroup namespace: enabled
Cgroup device: enabled
Cgroup sched: enabled
Cgroup cpu account: enabled
Cgroup memory controller: enabled
Cgroup cpuset: enabled
--- Misc ---
Veth pair device: enabled
Macvlan: enabled
Vlan: enabled
# cat /etc/lxc/mycontainer.conf
# hostname
lxc.utsname = mycontainer
#
# network
# if the network is not defined then the container
# will be able to use the host's network
lxc.network.type = veth
lxc.network.flags = up
lxc.network.link = br0
lxc.network.name = eth0
lxc.network.mtu = 1500
lxc.network.ipv4 = 10.0.200.2/8
#
# only explicit device access
lxc.cgroup.devices.deny = a
#
# Memory Devices
lxc.cgroup.devices.allow = c 1:3 rwm # /dev/null null stream
lxc.cgroup.devices.allow = c 1:5 rwm # /dev/zero zero stream
lxc.cgroup.devices.allow = c 1:7 rwm # /dev/full full stream
lxc.cgroup.devices.allow = c 1:8 rwm # /dev/urandom blocking random stream
lxc.cgroup.devices.allow = c 1:9 rwm # /dev/random non blocking stream
#
# Terminals
lxc.tty =1 # allow one tty
lxc.cgroup.devices.allow = c 4:0 rwm # /dev/tty0 current virtual
terminal
lxc.cgroup.devices.allow = c 5:0 rwm # /dev/tty current tty device
lxc.cgroup.devices.allow = c 5:1 rwm # /dev/console system console
lxc.cgroup.devices.allow = c 5:2 rwm # /dev/ptmx pseudo terminal
creator
lxc.cgroup.devices.allow = c 136:* rwm # /dev/pts/* psuedo terminal slaves
#
# root filesystem
lxc.rootfs = /srv/lxc/mycontainer
#
# mounts
lxc.mount = /etc/lxc/mycontainer.fstab
# cat /etc/lxc/mycontainer.fstab
none /srv/lxc/mycontainer/dev/pts devpts defaults 0 0
none /srv/lxc/mycontainer/dev/shm tmpfs defaults 0 0
none /srv/lxc/mycontainer/proc proc defaults 0 0
none /srv/lxc/mycontainer/sys sysfs defaults 0 0
>From the container...
$ ls -lR /dev
/dev:
total 4
crw-rw-rw- 1 root tty 136, 2 Sep 14 15:20 console
crw-rw-rw- 1 root root 1, 7 Sep 12 17:34 full
prw------- 1 root root 0 Sep 14 10:27 initctl
drwxr-xr-x 2 root root 4096 Sep 13 11:50 input
srw-rw-rw- 1 root root 0 Sep 14 15:20 log
crw-rw-rw- 1 root root 1, 3 Sep 12 17:34 null
crw-rw-rw- 1 root root 195, 0 Sep 12 17:54 nvidia0
crw-rw-rw- 1 root root 195, 255 Sep 12 17:54 nvidiactl
crw-rw-rw- 1 root root 5, 2 Sep 14 20:50 ptmx
drwxr-xr-x 2 root root 0 Sep 14 15:20 pts
crw-rw-rw- 1 root root 1, 8 Sep 12 17:34 random
drwxrwxrwt 2 root root 40 Sep 14 15:20 shm
crw-rw-rw- 1 root root 5, 0 Sep 14 20:07 tty
crw-rw-rw- 1 root root 4, 0 Sep 12 17:35 tty0
crw------- 1 root root 136, 1 Sep 14 15:20 tty1
crw-rw-rw- 1 root root 4, 9 Sep 12 17:54 tty9
crw-rw-rw- 1 root root 1, 9 Sep 12 17:34 urandom
crw-rw-rw- 1 root root 1, 5 Sep 12 17:34 zero
/dev/input:
total 0
crw-rw-rw- 1 root root 13, 63 Sep 12 17:55 mice
/dev/pts:
total 0
crw--w---- 1 root tty 136, 0 Sep 14 15:20 0
crw------- 1 root root 136, 1 Sep 14 15:20 1
crw--w---- 1 john tty 136, 10 Sep 14 20:08 10
crw-rw-rw- 1 root tty 136, 2 Sep 14 15:20 2
crw------- 1 john users 136, 3 Sep 14 20:40 3
crw------- 1 john users 136, 4 Sep 14 20:50 4
crw--w---- 1 john tty 136, 6 Sep 14 20:50 6
crw--w---- 1 root tty 136, 7 Sep 14 20:50 7
c--------- 1 root root 5, 2 Sep 14 15:20 ptmx
/dev/shm:
total 0
I have also seen this appear on some console windows:
Cannot chmod /dev/pts/4 to 620 currently 600: Read-only file system
If I reboot it will work fine but I can't keep rebooting my host every time
I want to re-start a container. I would appreciate any help on this. Thanks.
--------------------------------------------------------------------
mail2web.com - Microsoft® Exchange solutions from a leading provider -
http://link.mail2web.com/Business/Exchange
More information about the lxc-users
mailing list