[Lxc-users] lxc-console: failed to connect to tty service

Serge E. Hallyn serge.hallyn at canonical.com
Mon Mar 7 17:06:04 UTC 2011


Quoting Advait Alai (advaitalai at gmail.com):
> On Mon, Mar 7, 2011 at 9:27 PM, Serge E. Hallyn
> <serge.hallyn at canonical.com>wrote:
> 
> > Quoting Advait Alai (advaitalai at gmail.com):
> > > When I try to login to the console, I just get the message "Type <Ctrl+a
> > q>
> > > to exit the console", and no prompt. How should I define inittab to get
> > it
> > > to call getty?
> >
> > Sorry, I've deleted the previous thread.  What is the distribution+release
> > in your container?
> >
> 
> I am using the containers only to isolate network stacks (Broadly, I'm using
> each container as a virtual host in a network, with the network being
> simulated by ns3, as in
> http://www.nsnam.org/wiki/index.php/HOWTO_Use_Linux_Containers_to_set_up_virtual_networks#The_Big_Picture).
> I
> want containers to have the same rootfs as my main rootfs, which is /
> 
> So, I'm not running any separate distribution in the containers.

That howto shows to simply execute a bash shell:
	lxc-start -n container-name /bin/bash

If you want a system container with a getty, you'll need it to be
running an init, which requires a bit more setup.  You can't just
have your host's init run the getty because the resulting shell would
be in the wrong namespaces.  Though with setns that would actually
become a tempting option.

-serge




More information about the lxc-users mailing list