HowTo: Enable console login for OpenVZ Debian containers (V2.2 and later)

If anyone with large clusters are looking for an easy way to update all the current vms on the cluster to work with the new VNC change, let me know.

I wrote a bash script that can be ran on the hostnode that will log into all the cts on the host... check which operating system is running and make the modification specified in this thread.. then reboots the vm and continues to the next vm.

If you are interested in this bash script please send me an email crivera305@gmail.com only asking for $25


I had to write this script because we currently have over 600 vms and going 1 by 1 to update 1 line in a file for each vm is very time consuming. I hope this helps!


Sample code with actions remove is posted below:


#!/bin/bash


OSINFO=`tail /etc/redhat-release`
if [ "$OSINFO" == "" ]
then
OSINFO1=`cat /etc/issue`


if [[ "$OSINFO1" == *Debian* ]]
then
echo "Debian"
elif [[ "$OSINFO1" == *Ubuntu* ]]
then
echo "Ubuntu"
fi
echo $OSINFO1
elif [[ "${OSINFO}" == *5.* ]]
then
echo "CentOS 5";
elif [[ "${OSINFO}" == *6.* ]]
then
echo "CentOS 6";


fi
 
I followed the guide to enable login in openvz containers.


In Debian and CentOS containers everything is correct, but I can not run Ubuntu changes but I follow the steps in the guide.


I downloaded the Ubuntu 12.04 Standard template "ubuntu-12.04-standard_12.04-1_i386.tar.gz" has already configured the directory init tty1.conf but when the container started just do not see the login.


Should we do more than it shows the guide?


Thanks for everything
 
Hi Tom,

Yes, I followed the guide but for example, if I download the template from the Proxmox web interface and have the changes made. Anyway, if I do not get work.


Not to do

The content of tty1.conf is:

# tty1 - getty
#
# This service maintains a getty on tty1 from the point the system is
# started until it is shut down again.


start on stopped rc RUNLEVEL=[2345] and (
not-container or
container CONTAINER=lxc or
container CONTAINER=lxc-libvirt)


stop on runlevel [!2345]


respawn
exec /sbin/getty -8 38400 tty1

Thanks!
 
no. you need to do it like the howto. your tty1.conf is different - follow exactly the howto.
 
I do not know it. but as ubuntu 8 is more ore less outdated just use the workaround (vzctl enter ...).
 
The problem is that we connect to containers from java vnc. Is there any way to open a connection using the command vncterm enter vzctl vzctl VMID instead of console?


What should we use to do so?


/usr/bin/vncterm -rfbport 5931 -timeout 10 -authpath /vms/105 -perm VM.Console -c /usr/bin/dtach -A /var/run/dtach/vzctlconsole105 -r winch -z /usr/sbin/vzctl console 105

/usr/bin/dtach -A /var/run/dtach/vzctlconsole105 -r winch -z /usr/sbin/vzctl console 105

Thanks!
 
just connect to the host via VNC shell, then do a 'vzctl enter VMID'
 
can be a solution, but our clients don't access to the node, I liked use command in proxmox 1.9

/usr/bin/vncterm -rfbport 5900 -timeout 1 -rfbwait 300000 -c /usr/sbin/vzctl enter VMID

but is not possible

Thanks!
 
1.9? you are in the wrong forum here.
 
A "free" script, or a patch would be nice - i've only 14 CT's running, but "time" is such a special thing for selfemployed people ;)
 
I don't understand why you would implement a new console that breaks useability. I mean, using Proxmox 2.2 I now have to do this manually for every container that exists and gets installed. What kind of sense does it make to perform manual intervention to make something work EVERY TIME a new VM gets installed?
 
I don't understand why you would implement a new console that breaks useability. I mean, using Proxmox 2.2 I now have to do this manually for every container that exists and gets installed. What kind of sense does it make to perform manual intervention to make something work EVERY TIME a new VM gets installed?
Hi,
the big effort of the new console is that's a real console is. Before you can't run a long running job on the console, because the process died after a short time (or if you close the console).
Perhaps you (or the pve-team for the supported templates?) should modify the template, to enable the console automaticly?

Udo
 
Hi,
the big effort of the new console is that's a real console is. Before you can't run a long running job on the console, because the process died after a short time (or if you close the console).
Perhaps you (or the pve-team for the supported templates?) should modify the template, to enable the console automatically?

Udo

The templates definitely need updated. How would I go about doing that myself? I'm a little baffled this wasn't done beforehand.
 
The templates definitely need updated. How would I go about doing that myself? I'm a little baffled this wasn't done beforehand.

Our templates are already updated to support the new console. So you probably talk about third-party templates?
 
Our templates are already updated to support the new console. So you probably talk about third-party templates?

I tried the Proxmox templates a few days ago, or so... They didn't work. I'll try them again.

EDIT: They still do NOT work. I downloaded the Ubuntu 12.04 template directly in Proxmox and all I have is the "Press ESC to detach". Enter does nothing. I had to enter the container and manually perform the fix....
 
Last edited by a moderator:
we maintain the Debian templates, not Ubuntu, CentOS, Fedora ...

but there are very easy howto´s to enable the console. but as most use Debian, just use them and be happy.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!