Difference between revisions of "Container enter failed"

From OpenVZ Virtuozzo Containers Wiki
Jump to: navigation, search
m (Robot: Automated text replacement (-VPS +container))
(alternative solution for the problem)
Line 22: Line 22:
 
CONFIG_LEGACY_PTYS=y
 
CONFIG_LEGACY_PTYS=y
 
</pre>
 
</pre>
 +
 +
Another solution:
 +
 +
enter the VE  manually creating the LEGACY_PTYS devices
 +
 +
<pre>
 +
vzctl exec  101 /sbin/MAKEDEV tty
 +
vzctl exec 101 /sbin/MAKEDEV pty
 +
vzctl enter 101
 +
</pre>
 +
 +
To save the changes create a file  to force udev making LEGACY_PTYS:
 +
 +
<pre>
 +
cat > /etc/udev/makedev.d/51-udev.nodes
 +
# These device have to be created manually
 +
tty0
 +
tty1
 +
tty2
 +
tty3
 +
tty4
 +
tty5
 +
tty6
 +
tty7
 +
tty8
 +
tty9
 +
ttyp0
 +
ttyp1
 +
ttyp2
 +
ttyp3
 +
ttyp4
 +
ttyp5
 +
ttyp6
 +
ptyp0
 +
ptyp1
 +
ptyp2
 +
ptyp3
 +
ptyp4
 +
ptyp5
 +
 +
</pre>
 +
  
 
== See also ==
 
== See also ==

Revision as of 17:50, 26 March 2008

Problem: container created succesfully and started. But when trying to do

vzctl enter 101 

you get

container enter failed(?)

Using strace, you see:

# strace -ff vzctl enter
....
fstat64(...st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0)...) fail
....

Solution: Recompile the kernel with the following option:

CONFIG_LEGACY_PTYS=y

Another solution:

enter the VE manually creating the LEGACY_PTYS devices

vzctl exec  101 /sbin/MAKEDEV tty
vzctl exec 101 /sbin/MAKEDEV pty
vzctl enter 101

To save the changes create a file to force udev making LEGACY_PTYS:

cat > /etc/udev/makedev.d/51-udev.nodes
# These device have to be created manually
tty0
tty1
tty2
tty3
tty4
tty5
tty6
tty7
tty8
tty9
ttyp0
ttyp1
ttyp2
ttyp3
ttyp4
ttyp5
ttyp6
ptyp0
ptyp1
ptyp2
ptyp3
ptyp4
ptyp5


See also