hi everyone,
i am running lucid server amd64 and recently tried to set up lxc.
i read through the following during my setup:
the first issue i ran into was that my /var was on a separate partition (see https://bugs.launchpad.net/ubuntu/+s...xc/+bug/566827 and http://www.mail-archive.com/lxc-user.../msg00261.html). the resolution to this (for me) was to pull the latest lxc from the git repository (http://lxc.sourceforge.net/) and install it.
so i don't know if the problem i am facing now is a result of using the latest code from the git repository, but i cannot seem to log into the container.
if i try to use sudo lxc-console -n something, then i simply get a screen
Code:
Type <Ctrl+a q> to exit the console
additionally, i've set up sshd on the container and when i attempt to ssh to the container's ip address, i get
Code:
PTY allocation request failed on channel 0
if i look at the auth.log in the container, then it appears that the login of the user i am ssh-ing with is successful, but we see
Code:
May 31 03:34:06 localhost sshd[51]: Server listening on 0.0.0.0 port 22.
May 31 03:34:06 localhost sshd[51]: Server listening on :: port 22.
May 31 03:37:10 localhost sshd[97]: Accepted password for someuser from 192.168.1.31 port 40696 ssh2
May 31 03:37:10 localhost sshd[97]: pam_unix(sshd:session): session opened for user someuser by (uid=0)
May 31 03:37:10 localhost sshd[97]: error: openpty: No such file or directory
May 31 03:37:10 localhost sshd[109]: error: session_pty_req: session 0 alloc failed
i came across the following discussion of this issue
but i appear to have the ptmx device in /path/to/container/rootfs/dev
Code:
total 16
drwxr-xr-x 4 root root 4096 2010-05-30 22:46 .
drwxr-xr-x 26 root root 4096 2010-05-31 03:34 ..
crw------- 1 root root 5, 1 2010-05-31 03:34 console
crw-rw-rw- 1 root root 1, 7 2010-05-30 22:46 full
prw------- 1 root root 0 2010-05-30 22:46 initctl
crw-rw-rw- 1 root root 1, 3 2010-05-30 22:46 null
crw-rw-rw- 1 root root 5, 2 2010-05-30 22:46 ptmx
drwxr-xr-x 2 root root 4096 2010-05-30 22:46 pts
crw-rw-rw- 1 root root 1, 8 2010-05-30 22:46 random
drwxrwxrwt 2 root root 4096 2010-05-30 22:46 shm
crw-rw-rw- 1 root root 5, 0 2010-05-30 22:46 tty
crw-rw-rw- 1 root root 4, 0 2010-05-30 22:46 tty0
crw-rw-rw- 1 root root 4, 1 2010-05-30 22:46 tty1
crw-rw-rw- 1 root root 4, 2 2010-05-30 22:46 tty2
crw-rw-rw- 1 root root 4, 3 2010-05-30 22:46 tty3
crw-rw-rw- 1 root root 4, 4 2010-05-30 22:46 tty4
crw-rw-rw- 1 root root 1, 9 2010-05-30 22:46 urandom
crw-rw-rw- 1 root root 1, 5 2010-05-30 22:46 zero
i thought maybe there was something preventing me from accessing the container due to the init scripts, but i tried a variety of options and nothing has been successful. currently in my /path/to/container/rootfs/etc/init
Code:
total 168
drwxr-xr-x 2 root root 4096 2010-05-31 02:55 .
drwxr-xr-x 52 root root 4096 2010-05-30 23:02 ..
-rw-r--r-- 1 root root 518 2010-03-12 22:29 console-setup.conf
-rw-r--r-- 1 root root 356 2010-04-02 00:13 control-alt-delete.conf.distrib
-rw-r--r-- 1 root root 297 2010-04-15 06:51 cron.conf
-rw-r--r-- 1 root root 273 2010-02-24 18:26 dmesg.conf.distrib
-rw-r--r-- 1 root root 312 2010-03-10 19:00 hostname.conf
-rw-r--r-- 1 root root 557 2010-03-22 17:54 hwclock.conf.distrib
-rw-r--r-- 1 root root 444 2010-03-22 17:54 hwclock-save.conf.distrib
-rw-r--r-- 1 root root 676 2010-05-30 22:52 lxc.conf
-rw-r--r-- 1 root root 367 2010-04-14 04:36 module-init-tools.conf
-rw-r--r-- 1 root root 747 2010-04-26 05:53 mountall.conf
-rw-r--r-- 1 root root 349 2010-04-26 05:53 mountall-net.conf.distrib
-rw-r--r-- 1 root root 261 2010-04-26 05:53 mountall-reboot.conf.distrib
-rw-r--r-- 1 root root 1201 2010-04-26 05:53 mountall-shell.conf.distrib
-rw-r--r-- 1 root root 427 2010-04-26 05:53 mounted-dev.conf
-rw-r--r-- 1 root root 1149 2010-04-26 05:53 mounted-tmp.conf
-rw-r--r-- 1 root root 490 2010-04-26 05:53 mounted-varrun.conf
-rw-r--r-- 1 root root 332 2010-02-20 04:30 networking.conf
-rw-r--r-- 1 root root 493 2010-02-20 04:30 network-interface.conf
-rw-r--r-- 1 root root 1221 2010-02-20 04:30 network-interface-security.conf
-rw-r--r-- 1 root root 996 2010-04-27 08:35 plymouth.conf.distrib
-rw-r--r-- 1 root root 326 2010-04-27 08:35 plymouth-log.conf.distrib
-rw-r--r-- 1 root root 888 2010-04-27 08:35 plymouth-splash.conf.distrib
-rw-r--r-- 1 root root 731 2010-04-27 08:35 plymouth-stop.conf.distrib
-rw-r--r-- 1 root root 293 2009-12-16 19:34 procps.conf
-rw-r--r-- 1 root root 387 2010-04-02 00:13 rc.conf
-rw-r--r-- 1 root root 822 2010-04-02 00:13 rcS.conf
-rw-r--r-- 1 root root 1534 2010-05-30 22:49 rc-sysinit.conf
-rw-r--r-- 1 root root 280 2010-02-24 18:26 rsyslog.conf
-rw-r--r-- 1 root root 615 2010-03-08 16:11 ssh.conf
-rw-r--r-- 1 root root 228 2010-04-02 00:13 tty1.conf
-rw-r--r-- 1 root root 213 2010-04-02 00:13 tty2.conf.distrib
-rw-r--r-- 1 root root 213 2010-04-02 00:13 tty3.conf.distrib
-rw-r--r-- 1 root root 213 2010-04-02 00:13 tty4.conf.distrib
-rw-r--r-- 1 root root 213 2010-04-02 00:13 tty5.conf.distrib
-rw-r--r-- 1 root root 213 2010-04-02 00:13 tty6.conf.distrib
-rw-r--r-- 1 root root 316 2010-04-19 09:29 udev.conf
-rw-r--r-- 1 root root 769 2010-04-19 09:29 udev-finish.conf
-rw-r--r-- 1 root root 356 2010-04-19 09:29 udevmonitor.conf
-rw-r--r-- 1 root root 318 2010-04-19 09:29 udevtrigger.conf
-rw-r--r-- 1 root root 313 2010-04-02 00:13 upstart-udev-bridge.conf
note that the files ending in .distrib have been
Code:
dpkg-divert --rename /path/to/file
.
any suggestions or ideas are very welcome. i am a bit puzzled as to why i cannot seem to log into the container through the console or through ssh.
all of my container configuration is following the resources listed at the top of this post. but if there is something specifically needed, please let me know.
EDIT:
I also wanted to mention that i receive the following message on my host console when the container is started
Code:
init: lxc pre-start process (2) terminated with status 32
i've added /path/to/container/rootfs/etc/init/lxc.conf from http://github.com/phbaer/lxc-tools/b...ter/lxc-ubuntu
Code:
# LXC – Fix init sequence to have LXC containers boot with upstart
# description “Fix LXC container - Lucid”
start on startup
task
pre-start script
mount -t proc proc /proc
mount -t devpts devpts /dev/pts
mount -t sysfs sys /sys
mount -t tmpfs varrun /var/run
mount -t tmpfs varlock /var/lock
mkdir -p /var/run/network
touch /var/run/utmp
chmod 664 /var/run/utmp
chown root.utmp /var/run/utmp
if [ "$(find /etc/network/ -name upstart -type f)" ]; then
chmod -x /etc/network/*/upstart || true
fi
end script
script
start networking
initctl emit filesystem --no-wait
initctl emit local-filesystems --no-wait
initctl emit virtual-filesystems --no-wait
init 2
end script
Bookmarks