Open main menu

OpenVZ Virtuozzo Containers Wiki β

Changes

Physical to container

12 bytes added, 12:01, 27 October 2007
Various language and typo cleanups
Naturally, you can only do this when the critical services (MySQL, apache, ..) are stopped and your /tmp filesystem is big enough to contain your tar.
'''Advantage:''' You don't need to boot from a livecdlive cd, so your system doesn't really go down.
== Setting VE parameters ==
It may be nessessary if server you are migrating is badly configured and it is hard to find all hard-coded net interfaces settings and so on.
veth inteface may me be included into bridge to allow seamless old installation access.
== Making adjustments ==
Since VE is a bit different than to a real physical server, you have to edit some files inside your new VE.
=== /etc/inittab ===
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 distributions <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 needs to have some entries in /dev. This can either be /dev/ttyp* and /dev/ptyp*, or /dev/ptmx and mounted /dev/pts.
===== /dev/ptmx =====
====/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
To see which services are enabled:
* RedHat/Fedora/SUSE: <code>/sbin/chkconfig --list</code>
* Debian: Use '<code>Use ' rcconf </code>' (ncurses) or <code>update-rc.d</code>( See: http://www.debianadmin.com/manage-linux-init-or-startup-scripts.html )</code>
* Gentoo: <code>/sbin/rc-update show</code>
38
edits