[Lxc-users] starting container requires re-login?

张章 zhang_zhang at live.com
Thu May 10 01:23:36 UTC 2012


forget to mention: the br0 is correctly configured. In container, after I type command "ifconfig eth0 10.5.0.122 netmask 255.255.255.0", the container  can ping my host machine.

Z. ZhangNational Research Center for intelligent Computing Systems,ICT, Chinese Academy of Sciences 


 

From: zhang_zhang at live.com
To: list at fajar.net
Date: Thu, 10 May 2012 01:17:01 +0000
CC: lxc-users at lists.sourceforge.net
Subject: Re: [Lxc-users] starting container requires re-login?





Many thanks

I switch to Ubuntu 12.04 and use lxc-ubuntu to prepare my filesystem. Then I add the network part to config file like:

lxc.utsname = amd64
lxc.tty = 4
lxc.pts = 1024
lxc.rootfs = /lxc/rootfs
lxc.mount  = /lxc/fstab
lxc.network.type = veth
lxc.network.flags = up
lxc.network.link = br0
lxc.network.name = eth0
lxc.network.ipv4 = 10.5.0.122/24

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
#fuse
lxc.cgroup.devices.allow = c 10:229 rwm

And now container can start , but the network fails to be configured with the ip i assigned. 
After i login to container, and get the ip like "inet addr:69.69.69.23 " 

Do i miss something?

Many Thanks!

Z. ZhangNational Research Center for intelligent Computing Systems,ICT, Chinese Academy of Sciences 


 

> Date: Wed, 9 May 2012 16:32:05 +0700
> Subject: Re: [Lxc-users] starting container requires re-login?
> From: list at fajar.net
> To: zhang_zhang at live.com
> CC: lxc-users at lists.sourceforge.net
> 
> On Wed, May 9, 2012 at 4:26 PM, 张章 <zhang_zhang at live.com> wrote:
> > hello
> >
> > i have configured the lxc with basic settings like this:
> >     lxc.ustname = lxc1
> >     lxc.network.type = veth
> >     lxc.network.flags = up
> >     lxc.network.link = br0
> >     lxc.network.name = eth0
> >     lxc.network.ipv4 = 192.168.1.122/24
> >     lxc.rootfs = /lxc/rootfs
> >     lxc.mount = /lxc/fstab
> >
> > and the filesystem to be mount is fresh using
> > debootstrap --arch amd64 lucid /lxc/rootfs http://archive.ubuntu.com/ubuntu
> > After typing command: lxc-create and lxc-start, the host system requires me
> > to re-login. Then I do it and try to connect the just lauched container
> > using ssh,but i get the following error:
> > PTY allocation request failed on channel 0
> > stdin:is not a tty
> > could anyone offer some help? you are warmly welcome!
> > Thanks a lot!
> 
> My guess is you somehow mixed up the host and container's tty.
> Possibly due to incomplete container config file.
> 
> You didn't mention what your host is. If it's not ubuntu precise,
> better upgrade.
> 
> As for the guest container, there are other modifications needed, so
> ONLY using debootstrap is not enough. I suggest you create it using
> "lxc-create -n name_of_your_container -t ubuntu -- -r lucid" instead,
> or look at /usr/lib/lxc/templates/lxc-ubuntu to see what modifications
> are needed.
> 
> -- 
> Fajar
 		 	   		  

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Lxc-users mailing list
Lxc-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-users 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20120510/bfbdb322/attachment.html>


More information about the lxc-users mailing list