Changes

Jump to: navigation, search

Physical to container

684 bytes added, 12:23, 28 August 2007
explained /dev
vzctl exec 123 mount -t devpts none /dev/pts
=== /dev TTY devices === ==== Introduction: static /dev ====In order for VE to work, some nodes should be present in VE's /dev. For modern distributions, udev is taking care of it. For a variety of reasons udev doesn't make much sense in a VE, so the best thing to do is to disable udev and create needed device nodes manually. Note that in some distrubutions <code>/dev</code> is mounted on tmpfs — this will not work in case of static /dev. So what you need to do is find out where <code>/dev</code> is being mounted on tmpfs and remove this. This is highly distribution-dependent; please add info for your distro here. After you made sure your /dev is static, populate it with needed device nodes. ==== tty device nodes ==== 
In order for vzctl enter to work, a VE need to have some entries in /dev. This can either be /dev/ttyp* and /dev/ptyp*, or /dev/ptmx and mounted /dev/pts.
===== /dev/ptmx =====
Check that /dev/ptmx exists. If it does not, create with:
mknod /vz/private/123/dev/ptmx c 5 2
===== /dev/pts/ =====
Check that /dev/pts exists. It's a directory, if it does not exist, create with:
mkdir /vz/private/123/dev/pts
===== /dev/ttyp* and /dev/ptyp* =====
Check that /dev/ttyp* and /dev/ptyp* files are there. If not, you have to create those, either by using /sbin/MAKEDEV, or by copying them from the host system.
or
cd /vz/private/123/dev && /sbin/MAKEDEV ttyp
 
====/dev/null====
Make sure sure /dev/null is not a file or directory, if unsure remove and recreate, If this is not correct sshd will not start correctly
rm -f /vz/private/123/dev/null
mknod /vz/private/123/dev/null c 1 3
=== Other devices ===
===/proc===
Make sure the /proc directory exists
ls -la /vz/private/123/ | grep proc
If it does'nt exist, Make it
mkdir /vz/private/123/proc
==== /dev/urandom ====
Check that /dev/urandom exists. If it does not, create with:
mknod /vz/private/123/dev/urandom c 1 9
 
===/proc===
Make sure the /proc directory exists:
ls -la /vz/private/123/ | grep proc
 
If it doesn't, create it:
mkdir /vz/private/123/proc
=== /etc/init.d services ===

Navigation menu