Categories: Linux Hosting, OpenVZ
SSH logout while keeping programs running
June 9th, 2009ubuntu: apt-get install screen
centos/redhat: yum install screen
# screen
# [enter your commands here]
Detach screen:
CTRL+a d
Now you can safely "exit" SSH. Processes keep running.
To re-enter the detached screen:
# screen -x
ssh server in virtual machine (container) doesn't work
May 12th, 2009From within a 'broken' CT enter:
mknod -m 666 /dev/random c 1 8
mknod -m 444 /dev/urandom c 1 9
If this doesn't work....Jimmy Tang listed the minimal set of devices nodes:
mknod -m 600 /dev/console c 5 1
mknod -m 666 /dev/tty c 5 0
mknod -m 666 /dev/full c 1 7
mknod -m 600 /dev/initctl p
mknod -m 666 /dev/null c 1 3
mknod -m 666 /dev/ptmx c 5 2
mkdir /dev/pts
mknod -m 666 /dev/random c 1 8
mknod -m 444 /dev/urandom c 1 9
mknod -m 666 /dev/zero c 1 5
Reference:
http://www.tchpc.tcd.ie/~jtang/blog/posts/Creating_the_minimum_needed_device_nodes_for_openvz/
OpenVZ server crash CentOS5 when iptables changes
December 30th, 2007On a CentOS 5 HN (hardware node) it seems that the server machine itself crashes after making changes in iptables (e.g. with system-config-securitylevel-tui)! The whole machine hangs and becomes unresponsive.
Luckily this doesn't occur when you make changes in iptables from within a VE (virtual environment).
In order to avoid this problem you'll have to stop your OpenVZ services temporarily, make your firewall changes and restart OpenVZ.
# /etc/init.d/vz stop
# system-config-securitylevel-tui
# /etc/init.d/vz start
This problem didn't occur in older kernels but definitely in vzkernel-2.6.18-53.el5.028stab051.1
You can read a threat about this here: http://forum.openvz.org/index.php?t=msg&goto=21273
openvz Server refused to allocate pty solution
October 16th, 2007SSH returns: "Server refused to allocate pty" upon login.
OR:
"enter into VE 101 failed
Unable to open pty: No such file or directory"
This solution is for CentOS VE's.
At the HN (hardware node) enter (replace 101 with your VE-id / CT-id):
# vzctl exec 101 /sbin/MAKEDEV tty
# vzctl exec 101 /sbin/MAKEDEV pty
Then enter the VE/CT:
# vzctl enter 101
And make sure the udev rpm is gone:
...else the problem comes back after a VE reboot.
# rpm -e --nodeps udev
If the problem persists after reboot, repeat the steps above and create the following file within the VE/CT:
/etc/udev/makedev.d/51-udev.nodes
...with these contents:
# These device have to be created manually
tty0
tty1
tty2
tty3
ttyp0
ttyp1
ttyp2
ttyp3
ptyp0
ptyp1
ptyp2
ptyp3
references:
http://forum.openvz.org/index.php?t=msg&goto=14953
http://wiki.openvz.org/Container_enter_failed
bash_history not working in VE (virtual environment) of openvz
October 14th, 2007Add the following line to file /root/.bashrc
HISTFILE=/root/.bash_history
Now, .bash_history will be created and filled!