Container enter failed

From OpenVZ Linux Containers Wiki

Jump to: navigation, search


Contents

[edit] Solutions

[edit] Using strace

You can use strace to analyse the command further:

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

Recompile the kernel with the following option:

CONFIG_LEGACY_PTYS=y

[edit] LEGACY_PTYS

[edit] Temporary fix

Note: This is a temporary fix so you can enter the VE.

vzctl exec 101 /sbin/MAKEDEV tty
vzctl exec 101 /sbin/MAKEDEV pty
vzctl exec 101 mknod --mode=666 /dev/ptmx c 5 2
vzctl enter 101

[edit] Permanent fix with udev

cat > /etc/udev/makedev.d/51-udev.nodes
# These device have to be created manually
tty0
tty1
tty2
tty3
....
ttyp0
ttyp1
ttyp2
ttyp3
....
ptyp0
ptyp1
ptyp2
ptyp3
....

[edit] Permanent fix without udev

Edit the /etc/rc.d/rc.sysinit file and comment out the /sbin/start_udev line

Or you can run the following command:

sed -i 's|/sbin/start_udev|#/sbin/start_udev|g' /etc/rc.d/rc.sysinit

Warning Updates to the package which owns this file may revert your changes.

Note This was tested with CentOS VE.

[edit] Debian only

CTID=101
vzctl exec $CTID "mount -t devpts devpts /dev/pts" 
vzctl enter $CTID
CTID=101
vzctl exec $CTID apt-get remove udev
vzctl restart $CTID

[edit] See also

Personal tools
Namespaces
Variants
Actions
Navigation
Sites
Toolbox