VPS login problem: enter into Container VEID failed

You may receive the following message on accessing a VPS from the host server:

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

The reason behind is the missing tty/pty files OR the udev devices.

There are two ways of creating them, using the ‘MAKEDEV’ program OR copy the files from the host server itself.

Solution 1.

To create using the MAKEDEV program, execute the following commands on the host server:

# vzctl exec VEID /sbin/MAKEDEV tty
# vzctl exec VEID /sbin/MAKEDEV pty

You may need to update the startup files as well, so execute:

# vzctl exec VEID update-rc.d -f udev remove

Once the files are created, restart the VPS.

# vzctl restart VEID

Solution 2.

Directly copy the tty/pty files from the host server to a VPS with the following steps:

# cd /vz/root/<veid>/dev/
# rsync -a /dev/*  .

and restart the VPS.  You should now be able to enter the VPS.

  • To fix the issue permanently,

1. Edit the file /etc/rc.sysinit of the VPS server:

# vi /etc/rc.sysinit

2. Search the line “/sbin/start_udev” and comment it

# /sbin/start_udev

3. Add the following lines after /sbin/start_udev commented line:

# /sbin/MAKEDEV tty
# /sbin/MAKEDEV pty

4. Now, reboot your VPS

# vzctl restart VEID

where, VEID is the VPS id of the vps in question.

This entry was posted on Sunday, September 13th, 2009 and is filed under VPS Management. You can follow any responses to this entry through the RSS 2.0 feed. Both comments and pings are currently closed.

Comments are closed.