FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu Server Development

 
 
LinkBack Thread Tools
 
Old 03-29-2010, 12:41 AM
Osvaldo Filho
 
Default LXC Without TTY. Why? SSH: PTY allocation request failed on channel 0

SSH: PTY allocation request failed on channel 0

Where my tty?

lxc-ps --lxc

CONTAINER PID TTY TIME CMD
prizm1 1330 ? 00:00:00 init
prizm1 1406 ? 00:00:00 upstart-udev-br
prizm1 1420 ? 00:00:00 udevd
prizm1 1427 ? 00:00:00 getty
prizm1 1434 ? 00:00:00 getty
prizm1 1700 ? 00:00:00 sshd
prizm1 1702 ? 00:00:00 apache2
prizm1 1722 ? 00:00:00 getty
prizm1 1723 ? 00:00:00 apache2
prizm1 1724 ? 00:00:00 apache2
prizm1 1725 ? 00:00:00 apache2
prizm1 1726 ? 00:00:00 apache2
prizm1 1727 ? 00:00:00 apache2
prizm1 1903 ? 00:00:00 apache2

---------------------------------------------------

Script for /dev

#!/bin/bash

# bodhi.zazen's lxc-config
# Makes default devices needed in lxc containers
# modified from http://lxc.teegra.net/

ROOT=$(pwd)
DEV=${ROOT}/rootfs/dev
if [ $ROOT = '/' ]; then
printf "33[22;35m
DO NOT RUN ON THE HOST NODE

"
tput sgr0
exit 1
fi
if [ ! -d $DEV ]; then
printf "33[01;33m
Run this script in rootfs

"
tput sgr0
exit 1
fi
rm -rf ${DEV}
mkdir ${DEV}
mknod -m 666 ${DEV}/null c 1 3
mknod -m 666 ${DEV}/zero c 1 5
mknod -m 666 ${DEV}/random c 1 8
mknod -m 666 ${DEV}/urandom c 1 9
mkdir -m 755 ${DEV}/pts
mkdir -m 1777 ${DEV}/shm
mknod -m 666 ${DEV}/tty c 5 0
mknod -m 666 ${DEV}/tty0 c 4 0
mknod -m 666 ${DEV}/tty1 c 4 1
mknod -m 666 ${DEV}/tty2 c 4 2
mknod -m 666 ${DEV}/tty3 c 4 3
mknod -m 600 ${DEV}/console c 5 1
mknod -m 666 ${DEV}/full c 1 7
mknod -m 600 ${DEV}/initctl p
mknod -m 666 ${DEV}/ptmx c 5 2

exit 0

-----------------------------------------------
My config.lxc

lxc.utsname = prizm1
lxc.network.type = veth
lxc.network.flags = up
lxc.network.link = br0
lxc.network.ipv4 = 192.168.1.13/24
lxc.network.hwaddr = 00:16:EC:7E:E5:19
lxc.network.name = eth0
lxc.mount = /home/lxc/prizm/fstab
lxc.rootfs = /home/lxc/prizm/rootfs

lxc.tty = 0
#lxc.pseudo = 1024

#lxc.cgroup.devices.deny = a # Deny all access to devices
# /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
lxc.cgroup.devices.allow = c 4:2 rwm
lxc.cgroup.devices.allow = c 4:3 rwm

# /dev/{,u}random
lxc.cgroup.devices.allow = c 1:9 rwm
lxc.cgroup.devices.allow = c 1:8 rwm
# /dev/pts/* - pts namespaces are "coming soon"
lxc.cgroup.devices.allow = c 136:* rwm
lxc.cgroup.devices.allow = c 5:2 rwm
# rtc
lxc.cgroup.devices.allow = c 254:0 rwm

--
ubuntu-server mailing list
ubuntu-server@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server
More info: https://wiki.ubuntu.com/ServerTeam
 

Thread Tools




All times are GMT. The time now is 12:18 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org