Unable to open pty: No such file or directory

July 17, 2008 on 9:33 pm | In OpenVZ | No Comments

# vzctl enter 1053
enter into VE  1053failed
Unable to open pty: No such file or directory
The fix is

# vzctl exec   1053 /sbin/MAKEDEV tty
# vzctl exec 1053 /sbin/MAKEDEV pty
# vzctl enter 1053

Restart that VE.

enter into VE failed Unable to open pty: No such file or directory

June 22, 2008 on 2:07 am | In OpenVZ | No Comments

f you face following error.

===============
[root@Node ~]# vzctl enter 442
enter into VE 442 failed
Unable to open pty: No such file or directory

===============

This is a well known problem with udev and openvz. A copy of /dev will fix it. You have to do it properly and check whether the dev exists or not. See, /dev/ptmx and /dev/ptyp0 both are missing on the vps. Please copy them from a working vps. Also add adding the following line to /etc/fstab of the vps.
——
none /dev/pts devpts rw 0 0
——-

VPS Commands

May 6, 2008 on 2:50 pm | In OpenVZ | No Comments

1) vzlist -a : Shows list of all the VPS’s hosted on the Node.

====================
(This
is the ID)
CTID NPROC STATUS IP_ADDR HOSTNAME
1 96 running 67.xx.xx.xxx
358 77 running 67.xx.xx.xxx
454 124 running 67.xx.xx.xxx
525 79 running 74.xx.xx.xxx
527 92 running 67.xx.xx.xxx
568 73 running 74.xx.xx.xxx
570 86 running 67.xx.xx.xxx
574 11 running 75.xx.xx.xxx
579 13 running 75.xx.xx.xxx
583 79 running 67.xx.xx.xxx

====================

2) vzctl start ID: To start the VPS.

====================
[root@virtuozzo06 ~]# vzctl start 111
Starting Container …
Container is mounted
Setup slm memory limit
Setup slm subgroup (default)
Setting devperms 20002 dev 0×7d00
Adding port redirection to Container(1): 8443 4643
Adding IP address(es) to pool:
Adding IP address(es):
arpsend: 4 is detected on another computer : 00:1a:30:38:90:00
vz-net_add WARNING: arpsend -c 1 -w 1 -D -e 67.228.31.50 -e 67.228.43.67 -e 67.228.43.78 -e 75.126.196.183 -e 10.10.16.154 eth1 FAILED
Hostname for Container set:
File resolv.conf was modified
Container start in progress…
[root@virtuozzo06 ~]#
====================

3) vzctl stop ID : To stop (Shut Down) the VPS

====================
[root@virtuozzo06 ~]# vzctl stop 111
Stopping Container …
Container was stopped
Container is unmounted
====================

4) vzctl status ID : To view the status of the particular VPS

[root@virtuozzo06 ~]# vzctl status 111
VEID 111 exist mounted running

5) vzctl stop ID –fast : to stop the VPS quickly and forcefully
====================

[root@virtuozzo06 ~]# vzctl status 111
VEID 111 exist mounted running
[root@virtuozzo06 ~]# vzctl stop 111 –fast
Stopping Container …
Container was stopped
Container is unmounted

====================

6) vzctl enter VPS_ID : To enter in a particular VPS
====================
[root@virtuozzo06 ~]# vzctl enter 111
entered into Container 111
-bash-3.00#
====================

Configuration Commands

1) vzctl set ID –hostname vps.domain.com –save : To set the Hostname of a VPS.
2) vzctl set ID –ipadd 1.2.3.4 –save : To add a new IP to the hosting VPS.
3) vzctl set ID –ipdel 1.2.3.4 –save : To delete the IP from VPS.
4) vzctl set ID –userpasswd root:new_password –save : to reset root password of a VPS.
5) vzctl set ID –nameserver 1.2.3.4 –save : To add the nameserver IP’s to the VPS.
6) vzctl exec ID command : To run any command on a VPS from Node.
7) vzyum ID install package_name : To install any package/Software on a VPS from Node.