[pve-devel] virtual terminals in LXC

Jeremy Davis jeremy at turnkeylinux.org
Wed Sep 30 02:47:20 CEST 2015

Hi all,

TL;DR version - please scroll down if you want the background info.

The commands below (which are part of our inithooks sysvinit script) are
causing me issues. I'm hoping there is a simple answer but my google-fu
is letting me down...

# setterm -blank 0
setterm: terminal xterm does not support --blank

   -appears to be a Jessie thing...!?

# fgconsole
Couldn't get a file descriptor referring to the console

# openvt -f -c 8 -s -w -- /usr/lib/inithooks/run
Couldn't get a file descriptor referring to the console

# chvt 1
Couldn't get a file descriptor referring to the console

So the last 3 all appear to be issues related to consoles inside of LXC.
I ran an strace to see if that might give me more hints for googling but
it didn't really help.

From my reading I'm guessing that this is expected behaviour? But I have
no idea how I might work around them? Any suggestions or suggested
reading materials (links etc) are warmly welcome! :)

Jeremy Davis
TurnKey Linux

Background info

Alon & Liraz (the TurnKey co-founders) are currently away and I am
trying to finalise the LXC container build for Proxmox.

We (as in TurnKey Linux) have been providing a TurnKey "channel" in
Proxmox VE for downloading TurnKey Linux OVZ templates for some time now
(baked into PVE since v2.0 IIRC).

With the recent release of TurnKey Linux v14.0[1] and ProxmoxVE v4.0
shift to LXC, I have been doing some testing with LXC containers.

[1] https://www.turnkeylinux.org/blog/turnkey-14-0-release

With only minor modification (remove systemd and install sysvinit &
systemd-shim) to our existing scripts I can produce LXC templates which
appear to work fine under LXC in ProxmoxVE v4.0beta.

However it appears that our initialisation hooks (inithooks[2] - where
you set things like MySQL password; web app admin password, etc) aren't
auto running. Under PVE v3.x when you opened the console window from
within Proxmox our v13.0 (Debian Wheezy based) templates would open
straight to the inithooks ready for input.

[2] https://github.com/turnkeylinux/inithooks

Digging a little deeper it appears that it is because inside an LXC
container the above console related commands do not work...

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <http://lists.proxmox.com/pipermail/pve-devel/attachments/20150930/8b1a7f3f/attachment.sig>

More information about the pve-devel mailing list