[lxc-users] Console issues

Peter Steele pwsteele at gmail.com
Thu Jan 28 23:25:27 UTC 2016


As I've explained in this mailing list before, I create my own custom 
CentOS template that has some history, being initially used as a 
template for KVM based virtual machines, then OpenVZ based containers, 
then libvirt-lxc containers, and now finally we're tackling LXC. One 
issue I've noted is that when I create a container using my custom 
template lxc-console does not work. When I connect I get something like 
this:

# lxc-console -n vm-00
Connected to tty 1
Type <Ctrl+a q> to exit the console, <Ctrl+a Ctrl+a> to enter Ctrl+a itself

and then at this point it basically hangs, just consuming whatever I 
type but not attaching to the console and giving me feedback. If I use 
same config file for the container but use the CentOS download template 
instead, the console works as expected.

In comparing the two cases, I've noticed that when I'm running with the 
downloaded template, I get a set of five getty processes:

# ps aux|grep agetty
root        37  0.0  0.0   6452   800 pts/0    Ss+  22:45   0:00 
/sbin/agetty --noclear --keep-baud pts/0 115200 38400 9600 vt220
root        38  0.0  0.0   6452   796 pts/1    Ss+  22:45   0:00 
/sbin/agetty --noclear --keep-baud pts/1 115200 38400 9600 vt220
root        40  0.0  0.0   6452   804 pts/2    Ss+  22:45   0:00 
/sbin/agetty --noclear --keep-baud pts/2 115200 38400 9600 vt220
root        41  0.0  0.0   6452   808 pts/3    Ss+  22:45   0:00 
/sbin/agetty --noclear --keep-baud pts/3 115200 38400 9600 vt220
root        42  0.0  0.0   6452   796 lxc/console Ss+ 22:45   0:00 
/sbin/agetty --noclear --keep-baud console 115200 38400 9600 vt220

Using my own template, I only get a single console process:

# ps aux|grep agetty
root       279  0.0  0.0   6424   792 lxc/console Ss+ 13:57   0:00 
/sbin/agetty --noclear --keep-baud console 115200 38400 9600

If I go ahead and start the processes manually, then lxc-console appears 
to work as expected. My question, what am I missing in my template that 
causes this behavior, or more specifically, results in the required 
agetty processes failing to start when the container is started?

Peter



More information about the lxc-users mailing list