Open main menu

OpenVZ Virtuozzo Containers Wiki β

Changes

Physical to container

439 bytes added, 16:25, 25 June 2012
/etc/fstab
=== /etc/fstab ===
Since you do not have any real disk partitions in a container, /etc/fstab (or most part of it) is no longer needed. Empty it (excluding the lines for <code>/dev/pts</code>, <code>/proc</code>, <code>/sys</code> and such):
<source lang="bash">
mv /vz/private/123/etc/fstab /vz/private/123/etc/fstab.old
egrep '/dev/pts|/dev/shm|/proc|/sys' /vz/private/123/etc/fstab.old > /vz/private/123/etc/fstab
</source>
You can also mount a devpts in a running (but not fully functional) container:
vzctl exec 123 mount -t devpts none /dev/pts
 
A still better approach would be simply to copy the <code>/etc/fstab</code> from a previously created container from a template of the same or similar distribution. In the case of RedHat/CentOS 5 this is:
<source lang="bash">
none /dev/pts devpts rw 0 0
</source>
and for RedHat/CentOS 6:
<source lang="bash">
none /dev/pts devpts rw,gid=5,mode=620 0 0
</source>
=== /dev ===
19
edits