<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.openvz.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Jasond</id>
	<title>OpenVZ Virtuozzo Containers Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.openvz.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Jasond"/>
	<link rel="alternate" type="text/html" href="https://wiki.openvz.org/Special:Contributions/Jasond"/>
	<updated>2026-05-15T20:15:41Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.31.1</generator>
	<entry>
		<id>https://wiki.openvz.org/index.php?title=Migration_from_Linux-VServer_to_OpenVZ&amp;diff=8009</id>
		<title>Migration from Linux-VServer to OpenVZ</title>
		<link rel="alternate" type="text/html" href="https://wiki.openvz.org/index.php?title=Migration_from_Linux-VServer_to_OpenVZ&amp;diff=8009"/>
		<updated>2009-12-21T23:58:20Z</updated>

		<summary type="html">&lt;p&gt;Jasond: /* Ubuntu udev */  formatting chages&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Roughstub}}&lt;br /&gt;
&lt;br /&gt;
This article describes the migration from Linux-VServer to OpenVZ.&lt;br /&gt;
&lt;br /&gt;
== Details of migration process ==&lt;br /&gt;
&lt;br /&gt;
=== Initial conditions ===&lt;br /&gt;
&lt;br /&gt;
The following example of Linux-VServer based solution was used for the experiment:&lt;br /&gt;
&lt;br /&gt;
* Kernel linux-2.6.17.13 was patched by the patch-2.6.17.13-vs2.0.2.1.diff and rebuild;&lt;br /&gt;
* Util-vserver-0.30.211 tools were used for creating containers;&lt;br /&gt;
&lt;br /&gt;
  # vserver-info&lt;br /&gt;
  Versions:&lt;br /&gt;
  Kernel: 2.6.17.13-vs2.0.2.1&lt;br /&gt;
  VS-API: 0x00020002&lt;br /&gt;
  util-vserver: 0.30.211; Dec  5 2006, 17:10:21&lt;br /&gt;
 &lt;br /&gt;
  Features:&lt;br /&gt;
  CC: gcc, gcc (GCC) 3.4.3 20041212 (Red Hat 3.4.3-9.EL4)&lt;br /&gt;
  CXX: g++, g++ (GCC) 3.4.3 20041212 (Red Hat 3.4.3-9.EL4)&lt;br /&gt;
  CPPFLAGS: ''&lt;br /&gt;
  CFLAGS: '-g -O2 -std=c99 -Wall -pedantic -W -funit-at-a-time'&lt;br /&gt;
  CXXFLAGS: '-g -O2 -ansi -Wall -pedantic -W -fmessage-length=0 -funit-at-a-time'&lt;br /&gt;
  build/host: i686-pc-linux-gnu/i686-pc-linux-gnu&lt;br /&gt;
  Use dietlibc: yes&lt;br /&gt;
  Build C++ programs: yes&lt;br /&gt;
  Build C99 programs: yes&lt;br /&gt;
  Available APIs: v13,net&lt;br /&gt;
  ext2fs Source: kernel&lt;br /&gt;
  syscall(2) invocation: alternative&lt;br /&gt;
  vserver(2) syscall#: 273/glibc&lt;br /&gt;
 &lt;br /&gt;
  Paths:&lt;br /&gt;
  prefix: /usr/local&lt;br /&gt;
  sysconf-Directory: ${prefix}/etc&lt;br /&gt;
  cfg-Directory: ${prefix}/etc/vservers&lt;br /&gt;
  initrd-Directory: $(sysconfdir)/init.d&lt;br /&gt;
  pkgstate-Directory: ${prefix}/var/run/vservers&lt;br /&gt;
  vserver-Rootdir: /vservers&lt;br /&gt;
  #&lt;br /&gt;
&lt;br /&gt;
VServer v345 was built using vserver vX build utility and populated by using the tarballed template of Fedora Core 4.&lt;br /&gt;
 &lt;br /&gt;
  # vserver v345 start&lt;br /&gt;
  Starting system logger:                                    [  OK  ]&lt;br /&gt;
  Initializing random number generator:                      [  OK  ]&lt;br /&gt;
  Starting crond: l:                                         [  OK  ]&lt;br /&gt;
  Starting atd:                                              [  OK  ]&lt;br /&gt;
  # vserver v345 enter&lt;br /&gt;
  [/]# ls -l&lt;br /&gt;
  total 44&lt;br /&gt;
  drwxr-xr-x    2 root     root         4096 Oct 26  2004 bin&lt;br /&gt;
  drwxr-xr-x    3 root     root         4096 Dec  8 17:16 dev&lt;br /&gt;
  drwxr-xr-x   27 root     root         4096 Dec  8 15:21 etc&lt;br /&gt;
  -rw-r--r--    1 root     root            0 Dec  8 15:33 halt&lt;br /&gt;
  drwxr-xr-x    2 root     root         4096 Jan 24  2003 home&lt;br /&gt;
  drwxr-xr-x    7 root     root         4096 Oct 26  2004 lib&lt;br /&gt;
  drwxr-xr-x    2 root     root         4096 Jan 24  2003 mnt&lt;br /&gt;
  drwxr-xr-x    3 root     root         4096 Oct 26  2004 opt&lt;br /&gt;
  -rw-r--r--    1 root     root            0 Dec  7 20:17 poweroff&lt;br /&gt;
  dr-xr-xr-x   80 root     root            0 Dec  8 11:38 proc&lt;br /&gt;
  drwxr-x---    2 root     root         4096 Dec  7 20:17 root&lt;br /&gt;
  drwxr-xr-x    2 root     root         4096 Oct 26  2004 sbin&lt;br /&gt;
  drwxrwxrwt    2 root     root           40 Dec  8 17:16 tmp&lt;br /&gt;
  drwxr-xr-x   15 root     root         4096 Jul 27  2004 usr&lt;br /&gt;
  drwxr-xr-x   17 root     root         4096 Oct 26  2004 var&lt;br /&gt;
  [/]# sh&lt;br /&gt;
  sh-2.05b#&lt;br /&gt;
  .........&lt;br /&gt;
&lt;br /&gt;
As a result we obtain running virtual environment v345:&lt;br /&gt;
&lt;br /&gt;
  # vserver-stat&lt;br /&gt;
 &lt;br /&gt;
  CTX   PROC    VSZ    RSS  userTIME   sysTIME    UPTIME NAME&lt;br /&gt;
  0       51  90.9M  26.3M   0m58s75   2m42s57  33m45s93 root server&lt;br /&gt;
  49153    4  10.2M   2.8M   0m00s00   0m00s11  21m45s42 v345&lt;br /&gt;
 &lt;br /&gt;
  # &lt;br /&gt;
&lt;br /&gt;
=== Starting migration to OpenVZ ===&lt;br /&gt;
&lt;br /&gt;
Downloading and installing the stable OpenVZ kernel.&lt;br /&gt;
&lt;br /&gt;
Install the OpenVZ kernel, as described in [[Quick installation]]. &lt;br /&gt;
&lt;br /&gt;
After the kernel is installed, reboot the machine. After rebooting and logging in you will see the following reply on vserver-stat call:&lt;br /&gt;
&lt;br /&gt;
  # vserver-stat&lt;br /&gt;
  can not change context: migrate kernel feature missing and 'compat' API disabled: Function not implemented&lt;br /&gt;
&lt;br /&gt;
It is a natural thing that now virtual environment v345 is unavailable. The following steps will be devoted to making it&lt;br /&gt;
work over OpenVZ kernel.&lt;br /&gt;
&lt;br /&gt;
=== Downloading and installing vzctl package ===&lt;br /&gt;
&lt;br /&gt;
OpenVZ solution requires installing a set of tools: vzctl and vzquota packages. Download and install it, as described in [[quick installation]].&lt;br /&gt;
&lt;br /&gt;
If rpm complains about unresolved dependencies, you'll have to satisfy them first, then repeat the installation.&lt;br /&gt;
Then launch the OpenVZ:&lt;br /&gt;
&lt;br /&gt;
  # /sbin/service vz start&lt;br /&gt;
  Starting OpenVZ:                                           [  OK  ]&lt;br /&gt;
  Bringing up interface venet0:                              [  OK  ]&lt;br /&gt;
  Configuring interface venet0:                              [  OK  ]&lt;br /&gt;
&lt;br /&gt;
Currently vzlist utility is unable to find any containers:&lt;br /&gt;
  # vzlist&lt;br /&gt;
  Containers not found&lt;br /&gt;
&lt;br /&gt;
=== Updating different configurations  ===&lt;br /&gt;
&lt;br /&gt;
Move the existing guest OSs to the right place:&lt;br /&gt;
&lt;br /&gt;
  # cd /vz&lt;br /&gt;
  # mkdir private&lt;br /&gt;
  # mkdir private/345&lt;br /&gt;
  # mv /vservers/v345 /vz/private/345&lt;br /&gt;
&lt;br /&gt;
Now it is time for creating configuration files for OpenVZ container. Use the basic sample&lt;br /&gt;
configuration presented in /etc/sysconfig/vz-scripts/ve-vps.basic.conf-sample file:&lt;br /&gt;
&lt;br /&gt;
  # cd /etc/sysconfig/vz-scripts&lt;br /&gt;
  # cp ve-vps.basic.conf-sample 345.conf&lt;br /&gt;
&lt;br /&gt;
Now, let's set some parameters for the new container.&lt;br /&gt;
&lt;br /&gt;
First, we need to tell which distro the container is running:&lt;br /&gt;
  # echo &amp;quot;OSTEMPLATE=&amp;quot;fedora-core-4&amp;quot; &amp;gt;&amp;gt; 345.conf&lt;br /&gt;
&lt;br /&gt;
Then we set a few more parameters:&lt;br /&gt;
  vzctl set 345 --onboot yes --save # to make it start upon reboot&lt;br /&gt;
  vzctl set 345 --ipadd 192.168.0.145 --save&lt;br /&gt;
  vzctl set 345 --hostname test345.my.org --save&lt;br /&gt;
&lt;br /&gt;
== Testing how the guest OSs successfully work over OpenVZ ==&lt;br /&gt;
&lt;br /&gt;
Now you can start a container:&lt;br /&gt;
&lt;br /&gt;
 # vzctl start 345&lt;br /&gt;
&lt;br /&gt;
and see if it's running:&lt;br /&gt;
  # vzlist -a&lt;br /&gt;
  CTID      NPROC  STATUS  IP_ADDR         HOSTNAME&lt;br /&gt;
  345          5   running 192.168.0.145   test345.my.org&lt;br /&gt;
&lt;br /&gt;
You can run commands in it:&lt;br /&gt;
&lt;br /&gt;
  # vzctl exec 345 ls -l&lt;br /&gt;
  total 48&lt;br /&gt;
  drwxr-xr-x    2 root     root         4096 Oct 26  2004 bin&lt;br /&gt;
  drwxr-xr-x    3 root     root         4096 Dec 11 12:42 dev&lt;br /&gt;
  drwxr-xr-x   27 root     root         4096 Dec 11 12:44 etc&lt;br /&gt;
  -rw-r--r--    1 root     root            0 Dec 11 12:13 fastboot&lt;br /&gt;
  -rw-r--r--    1 root     root            0 Dec  8 15:33 halt&lt;br /&gt;
  drwxr-xr-x    2 root     root         4096 Jan 24  2003 home&lt;br /&gt;
  drwxr-xr-x    7 root     root         4096 Oct 26  2004 lib&lt;br /&gt;
  drwxr-xr-x    2 root     root         4096 Jan 24  2003 mnt&lt;br /&gt;
  drwxr-xr-x    3 root     root         4096 Oct 26  2004 opt&lt;br /&gt;
  -rw-r--r--    1 root     root            0 Dec  7 20:17 poweroff&lt;br /&gt;
  dr-xr-xr-x   70 root     root            0 Dec 11 12:42 proc&lt;br /&gt;
  drwxr-x---    2 root     root         4096 Dec  7 20:17 root&lt;br /&gt;
  drwxr-xr-x    2 root     root         4096 Dec 11 12:13 sbin&lt;br /&gt;
  drwxrwxrwt    2 root     root         4096 Dec  8 12:40 tmp&lt;br /&gt;
  drwxr-xr-x   15 root     root         4096 Jul 27  2004 usr&lt;br /&gt;
  drwxr-xr-x   17 root     root         4096 Oct 26  2004 var&lt;br /&gt;
&lt;br /&gt;
== Issues ==&lt;br /&gt;
&lt;br /&gt;
=== Networking ===&lt;br /&gt;
&lt;br /&gt;
==== Starting networking in VEs ====&lt;br /&gt;
&lt;br /&gt;
The vserver-originating containers do not initialize network at all. Thus one needs to use following command to enable networking start (inside of the migrated container):&lt;br /&gt;
 cd /etc/rcS.d&lt;br /&gt;
 ln -s ../init.d/networking S40networking&lt;br /&gt;
&lt;br /&gt;
==== Migrating your VServer Shorewall setup ====&lt;br /&gt;
&lt;br /&gt;
If you had the [http://www.shorewall.net/ Shorewall firewall] running on the hardware node to route traffic to and from your guests, here are a couple of advices, provided you want a networking setup close to what you had with Vserver (i.e. running &amp;lt;code&amp;gt;vnet&amp;lt;/code&amp;gt; interfaces, not &amp;lt;code&amp;gt;veth&amp;lt;/code&amp;gt; ones) :&lt;br /&gt;
* do not use the &amp;lt;code&amp;gt;venet0&amp;lt;/code&amp;gt; interface in Shorewall's configuration as the &amp;lt;code&amp;gt;vz&amp;lt;/code&amp;gt; service starts after Shorewall (at least on Debian) and thus the interface does not exist when Shorewall starts. Do not use &amp;lt;code&amp;gt;detect&amp;lt;/code&amp;gt; for the broadcast in &amp;lt;code&amp;gt;/etc/shorewall/interfaces&amp;lt;/code&amp;gt;.&lt;br /&gt;
* for your VEs to be able to talk to each other, use the &amp;lt;code&amp;gt;routeback&amp;lt;/code&amp;gt; option for &amp;lt;code&amp;gt;venet0&amp;lt;/code&amp;gt; (and others) in &amp;lt;code&amp;gt;/etc/shorewall/interfaces&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== IP src from VEs ====&lt;br /&gt;
&lt;br /&gt;
If you run a mail server in a VE, and if the hardware node has multiple network interfaces, you may have mail routing issues because of the originated IP address of the packets coming from the hardware node. Simply specify an interface in &amp;lt;code&amp;gt;/etc/vz/vz.conf&amp;lt;/code&amp;gt; :&lt;br /&gt;
&amp;lt;pre&amp;gt;VE_ROUTE_SRC_DEV=&amp;quot;iface_name&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Disk space information ===&lt;br /&gt;
&lt;br /&gt;
Disk space information is empty. Do the following to fix:&lt;br /&gt;
 rm /etc/mtab&lt;br /&gt;
 ln -s /proc/mounts /etc/mtab&lt;br /&gt;
&lt;br /&gt;
=== /dev ===&lt;br /&gt;
&lt;br /&gt;
Vserver mounts /dev/pts filesystem for container transparently, whereas openvz does not. To compensate the ommission, you need to move aside /dev directory in the vserver-originating container and copy /dev directory from openvz based container.&lt;br /&gt;
&lt;br /&gt;
=== Ubuntu udev ===&lt;br /&gt;
&lt;br /&gt;
Additionally, Ubuntu based vservers have the udev package installed which prevents access to the console in openvz. This error message is an example of the problem:&lt;br /&gt;
&lt;br /&gt;
 # vzctl enter 345&lt;br /&gt;
 enter into CT 345 failed&lt;br /&gt;
 Unable to open pty: No such file or directory&lt;br /&gt;
&lt;br /&gt;
The fix is to remove the udev package from the guest:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 # vzctl exec 345 'dpkg --force-depends --purge udev'&lt;br /&gt;
 (Reading database ... dpkg: udev: dependency problems, but removing anyway as you request:&lt;br /&gt;
  initramfs-tools depends on udev (&amp;gt;= 117-5).&lt;br /&gt;
 15227 files and directories currently installed.)&lt;br /&gt;
 Removing udev ...&lt;br /&gt;
 Purging configuration files for udev ...&lt;br /&gt;
 dpkg - warning: while removing udev, directory `/lib/udev/devices/net' not empty so not removed.&lt;br /&gt;
 dpkg - warning: while removing udev, directory `/lib/udev/devices' not empty so not removed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now restart the container, you should now be able to use the console.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 # vzctl restart 345&lt;br /&gt;
 Restarting container&lt;br /&gt;
 ...&lt;br /&gt;
  &amp;lt;SNIP&amp;gt;&lt;br /&gt;
 ...&lt;br /&gt;
 Container start in progress...&lt;br /&gt;
&lt;br /&gt;
 # vzctl enter 345&lt;br /&gt;
 entered into CT 345&lt;br /&gt;
 root@test:/#&lt;br /&gt;
&lt;br /&gt;
=== /proc ===&lt;br /&gt;
&lt;br /&gt;
The /proc filesystem is not automatically mounted by openvz. So the vserver needs to mount it itself. The simplests (not the best) way it can be done, is by sticking following command at the end of /etc/init.d/bootmisc.sh:&lt;br /&gt;
 mount /proc&lt;br /&gt;
&lt;br /&gt;
[[Category:HOWTO]]&lt;/div&gt;</summary>
		<author><name>Jasond</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.openvz.org/index.php?title=Migration_from_Linux-VServer_to_OpenVZ&amp;diff=8008</id>
		<title>Migration from Linux-VServer to OpenVZ</title>
		<link rel="alternate" type="text/html" href="https://wiki.openvz.org/index.php?title=Migration_from_Linux-VServer_to_OpenVZ&amp;diff=8008"/>
		<updated>2009-12-21T23:52:53Z</updated>

		<summary type="html">&lt;p&gt;Jasond: /* /dev */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Roughstub}}&lt;br /&gt;
&lt;br /&gt;
This article describes the migration from Linux-VServer to OpenVZ.&lt;br /&gt;
&lt;br /&gt;
== Details of migration process ==&lt;br /&gt;
&lt;br /&gt;
=== Initial conditions ===&lt;br /&gt;
&lt;br /&gt;
The following example of Linux-VServer based solution was used for the experiment:&lt;br /&gt;
&lt;br /&gt;
* Kernel linux-2.6.17.13 was patched by the patch-2.6.17.13-vs2.0.2.1.diff and rebuild;&lt;br /&gt;
* Util-vserver-0.30.211 tools were used for creating containers;&lt;br /&gt;
&lt;br /&gt;
  # vserver-info&lt;br /&gt;
  Versions:&lt;br /&gt;
  Kernel: 2.6.17.13-vs2.0.2.1&lt;br /&gt;
  VS-API: 0x00020002&lt;br /&gt;
  util-vserver: 0.30.211; Dec  5 2006, 17:10:21&lt;br /&gt;
 &lt;br /&gt;
  Features:&lt;br /&gt;
  CC: gcc, gcc (GCC) 3.4.3 20041212 (Red Hat 3.4.3-9.EL4)&lt;br /&gt;
  CXX: g++, g++ (GCC) 3.4.3 20041212 (Red Hat 3.4.3-9.EL4)&lt;br /&gt;
  CPPFLAGS: ''&lt;br /&gt;
  CFLAGS: '-g -O2 -std=c99 -Wall -pedantic -W -funit-at-a-time'&lt;br /&gt;
  CXXFLAGS: '-g -O2 -ansi -Wall -pedantic -W -fmessage-length=0 -funit-at-a-time'&lt;br /&gt;
  build/host: i686-pc-linux-gnu/i686-pc-linux-gnu&lt;br /&gt;
  Use dietlibc: yes&lt;br /&gt;
  Build C++ programs: yes&lt;br /&gt;
  Build C99 programs: yes&lt;br /&gt;
  Available APIs: v13,net&lt;br /&gt;
  ext2fs Source: kernel&lt;br /&gt;
  syscall(2) invocation: alternative&lt;br /&gt;
  vserver(2) syscall#: 273/glibc&lt;br /&gt;
 &lt;br /&gt;
  Paths:&lt;br /&gt;
  prefix: /usr/local&lt;br /&gt;
  sysconf-Directory: ${prefix}/etc&lt;br /&gt;
  cfg-Directory: ${prefix}/etc/vservers&lt;br /&gt;
  initrd-Directory: $(sysconfdir)/init.d&lt;br /&gt;
  pkgstate-Directory: ${prefix}/var/run/vservers&lt;br /&gt;
  vserver-Rootdir: /vservers&lt;br /&gt;
  #&lt;br /&gt;
&lt;br /&gt;
VServer v345 was built using vserver vX build utility and populated by using the tarballed template of Fedora Core 4.&lt;br /&gt;
 &lt;br /&gt;
  # vserver v345 start&lt;br /&gt;
  Starting system logger:                                    [  OK  ]&lt;br /&gt;
  Initializing random number generator:                      [  OK  ]&lt;br /&gt;
  Starting crond: l:                                         [  OK  ]&lt;br /&gt;
  Starting atd:                                              [  OK  ]&lt;br /&gt;
  # vserver v345 enter&lt;br /&gt;
  [/]# ls -l&lt;br /&gt;
  total 44&lt;br /&gt;
  drwxr-xr-x    2 root     root         4096 Oct 26  2004 bin&lt;br /&gt;
  drwxr-xr-x    3 root     root         4096 Dec  8 17:16 dev&lt;br /&gt;
  drwxr-xr-x   27 root     root         4096 Dec  8 15:21 etc&lt;br /&gt;
  -rw-r--r--    1 root     root            0 Dec  8 15:33 halt&lt;br /&gt;
  drwxr-xr-x    2 root     root         4096 Jan 24  2003 home&lt;br /&gt;
  drwxr-xr-x    7 root     root         4096 Oct 26  2004 lib&lt;br /&gt;
  drwxr-xr-x    2 root     root         4096 Jan 24  2003 mnt&lt;br /&gt;
  drwxr-xr-x    3 root     root         4096 Oct 26  2004 opt&lt;br /&gt;
  -rw-r--r--    1 root     root            0 Dec  7 20:17 poweroff&lt;br /&gt;
  dr-xr-xr-x   80 root     root            0 Dec  8 11:38 proc&lt;br /&gt;
  drwxr-x---    2 root     root         4096 Dec  7 20:17 root&lt;br /&gt;
  drwxr-xr-x    2 root     root         4096 Oct 26  2004 sbin&lt;br /&gt;
  drwxrwxrwt    2 root     root           40 Dec  8 17:16 tmp&lt;br /&gt;
  drwxr-xr-x   15 root     root         4096 Jul 27  2004 usr&lt;br /&gt;
  drwxr-xr-x   17 root     root         4096 Oct 26  2004 var&lt;br /&gt;
  [/]# sh&lt;br /&gt;
  sh-2.05b#&lt;br /&gt;
  .........&lt;br /&gt;
&lt;br /&gt;
As a result we obtain running virtual environment v345:&lt;br /&gt;
&lt;br /&gt;
  # vserver-stat&lt;br /&gt;
 &lt;br /&gt;
  CTX   PROC    VSZ    RSS  userTIME   sysTIME    UPTIME NAME&lt;br /&gt;
  0       51  90.9M  26.3M   0m58s75   2m42s57  33m45s93 root server&lt;br /&gt;
  49153    4  10.2M   2.8M   0m00s00   0m00s11  21m45s42 v345&lt;br /&gt;
 &lt;br /&gt;
  # &lt;br /&gt;
&lt;br /&gt;
=== Starting migration to OpenVZ ===&lt;br /&gt;
&lt;br /&gt;
Downloading and installing the stable OpenVZ kernel.&lt;br /&gt;
&lt;br /&gt;
Install the OpenVZ kernel, as described in [[Quick installation]]. &lt;br /&gt;
&lt;br /&gt;
After the kernel is installed, reboot the machine. After rebooting and logging in you will see the following reply on vserver-stat call:&lt;br /&gt;
&lt;br /&gt;
  # vserver-stat&lt;br /&gt;
  can not change context: migrate kernel feature missing and 'compat' API disabled: Function not implemented&lt;br /&gt;
&lt;br /&gt;
It is a natural thing that now virtual environment v345 is unavailable. The following steps will be devoted to making it&lt;br /&gt;
work over OpenVZ kernel.&lt;br /&gt;
&lt;br /&gt;
=== Downloading and installing vzctl package ===&lt;br /&gt;
&lt;br /&gt;
OpenVZ solution requires installing a set of tools: vzctl and vzquota packages. Download and install it, as described in [[quick installation]].&lt;br /&gt;
&lt;br /&gt;
If rpm complains about unresolved dependencies, you'll have to satisfy them first, then repeat the installation.&lt;br /&gt;
Then launch the OpenVZ:&lt;br /&gt;
&lt;br /&gt;
  # /sbin/service vz start&lt;br /&gt;
  Starting OpenVZ:                                           [  OK  ]&lt;br /&gt;
  Bringing up interface venet0:                              [  OK  ]&lt;br /&gt;
  Configuring interface venet0:                              [  OK  ]&lt;br /&gt;
&lt;br /&gt;
Currently vzlist utility is unable to find any containers:&lt;br /&gt;
  # vzlist&lt;br /&gt;
  Containers not found&lt;br /&gt;
&lt;br /&gt;
=== Updating different configurations  ===&lt;br /&gt;
&lt;br /&gt;
Move the existing guest OSs to the right place:&lt;br /&gt;
&lt;br /&gt;
  # cd /vz&lt;br /&gt;
  # mkdir private&lt;br /&gt;
  # mkdir private/345&lt;br /&gt;
  # mv /vservers/v345 /vz/private/345&lt;br /&gt;
&lt;br /&gt;
Now it is time for creating configuration files for OpenVZ container. Use the basic sample&lt;br /&gt;
configuration presented in /etc/sysconfig/vz-scripts/ve-vps.basic.conf-sample file:&lt;br /&gt;
&lt;br /&gt;
  # cd /etc/sysconfig/vz-scripts&lt;br /&gt;
  # cp ve-vps.basic.conf-sample 345.conf&lt;br /&gt;
&lt;br /&gt;
Now, let's set some parameters for the new container.&lt;br /&gt;
&lt;br /&gt;
First, we need to tell which distro the container is running:&lt;br /&gt;
  # echo &amp;quot;OSTEMPLATE=&amp;quot;fedora-core-4&amp;quot; &amp;gt;&amp;gt; 345.conf&lt;br /&gt;
&lt;br /&gt;
Then we set a few more parameters:&lt;br /&gt;
  vzctl set 345 --onboot yes --save # to make it start upon reboot&lt;br /&gt;
  vzctl set 345 --ipadd 192.168.0.145 --save&lt;br /&gt;
  vzctl set 345 --hostname test345.my.org --save&lt;br /&gt;
&lt;br /&gt;
== Testing how the guest OSs successfully work over OpenVZ ==&lt;br /&gt;
&lt;br /&gt;
Now you can start a container:&lt;br /&gt;
&lt;br /&gt;
 # vzctl start 345&lt;br /&gt;
&lt;br /&gt;
and see if it's running:&lt;br /&gt;
  # vzlist -a&lt;br /&gt;
  CTID      NPROC  STATUS  IP_ADDR         HOSTNAME&lt;br /&gt;
  345          5   running 192.168.0.145   test345.my.org&lt;br /&gt;
&lt;br /&gt;
You can run commands in it:&lt;br /&gt;
&lt;br /&gt;
  # vzctl exec 345 ls -l&lt;br /&gt;
  total 48&lt;br /&gt;
  drwxr-xr-x    2 root     root         4096 Oct 26  2004 bin&lt;br /&gt;
  drwxr-xr-x    3 root     root         4096 Dec 11 12:42 dev&lt;br /&gt;
  drwxr-xr-x   27 root     root         4096 Dec 11 12:44 etc&lt;br /&gt;
  -rw-r--r--    1 root     root            0 Dec 11 12:13 fastboot&lt;br /&gt;
  -rw-r--r--    1 root     root            0 Dec  8 15:33 halt&lt;br /&gt;
  drwxr-xr-x    2 root     root         4096 Jan 24  2003 home&lt;br /&gt;
  drwxr-xr-x    7 root     root         4096 Oct 26  2004 lib&lt;br /&gt;
  drwxr-xr-x    2 root     root         4096 Jan 24  2003 mnt&lt;br /&gt;
  drwxr-xr-x    3 root     root         4096 Oct 26  2004 opt&lt;br /&gt;
  -rw-r--r--    1 root     root            0 Dec  7 20:17 poweroff&lt;br /&gt;
  dr-xr-xr-x   70 root     root            0 Dec 11 12:42 proc&lt;br /&gt;
  drwxr-x---    2 root     root         4096 Dec  7 20:17 root&lt;br /&gt;
  drwxr-xr-x    2 root     root         4096 Dec 11 12:13 sbin&lt;br /&gt;
  drwxrwxrwt    2 root     root         4096 Dec  8 12:40 tmp&lt;br /&gt;
  drwxr-xr-x   15 root     root         4096 Jul 27  2004 usr&lt;br /&gt;
  drwxr-xr-x   17 root     root         4096 Oct 26  2004 var&lt;br /&gt;
&lt;br /&gt;
== Issues ==&lt;br /&gt;
&lt;br /&gt;
=== Networking ===&lt;br /&gt;
&lt;br /&gt;
==== Starting networking in VEs ====&lt;br /&gt;
&lt;br /&gt;
The vserver-originating containers do not initialize network at all. Thus one needs to use following command to enable networking start (inside of the migrated container):&lt;br /&gt;
 cd /etc/rcS.d&lt;br /&gt;
 ln -s ../init.d/networking S40networking&lt;br /&gt;
&lt;br /&gt;
==== Migrating your VServer Shorewall setup ====&lt;br /&gt;
&lt;br /&gt;
If you had the [http://www.shorewall.net/ Shorewall firewall] running on the hardware node to route traffic to and from your guests, here are a couple of advices, provided you want a networking setup close to what you had with Vserver (i.e. running &amp;lt;code&amp;gt;vnet&amp;lt;/code&amp;gt; interfaces, not &amp;lt;code&amp;gt;veth&amp;lt;/code&amp;gt; ones) :&lt;br /&gt;
* do not use the &amp;lt;code&amp;gt;venet0&amp;lt;/code&amp;gt; interface in Shorewall's configuration as the &amp;lt;code&amp;gt;vz&amp;lt;/code&amp;gt; service starts after Shorewall (at least on Debian) and thus the interface does not exist when Shorewall starts. Do not use &amp;lt;code&amp;gt;detect&amp;lt;/code&amp;gt; for the broadcast in &amp;lt;code&amp;gt;/etc/shorewall/interfaces&amp;lt;/code&amp;gt;.&lt;br /&gt;
* for your VEs to be able to talk to each other, use the &amp;lt;code&amp;gt;routeback&amp;lt;/code&amp;gt; option for &amp;lt;code&amp;gt;venet0&amp;lt;/code&amp;gt; (and others) in &amp;lt;code&amp;gt;/etc/shorewall/interfaces&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== IP src from VEs ====&lt;br /&gt;
&lt;br /&gt;
If you run a mail server in a VE, and if the hardware node has multiple network interfaces, you may have mail routing issues because of the originated IP address of the packets coming from the hardware node. Simply specify an interface in &amp;lt;code&amp;gt;/etc/vz/vz.conf&amp;lt;/code&amp;gt; :&lt;br /&gt;
&amp;lt;pre&amp;gt;VE_ROUTE_SRC_DEV=&amp;quot;iface_name&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Disk space information ===&lt;br /&gt;
&lt;br /&gt;
Disk space information is empty. Do the following to fix:&lt;br /&gt;
 rm /etc/mtab&lt;br /&gt;
 ln -s /proc/mounts /etc/mtab&lt;br /&gt;
&lt;br /&gt;
=== /dev ===&lt;br /&gt;
&lt;br /&gt;
Vserver mounts /dev/pts filesystem for container transparently, whereas openvz does not. To compensate the ommission, you need to move aside /dev directory in the vserver-originating container and copy /dev directory from openvz based container.&lt;br /&gt;
&lt;br /&gt;
=== Ubuntu udev ===&lt;br /&gt;
&lt;br /&gt;
Additionally, Ubuntu based vservers have the udev package installed which prevents access to the console in openvz. This error message is an example of the problem:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
# vzctl enter 101&lt;br /&gt;
enter into CT 101 failed&lt;br /&gt;
Unable to open pty: No such file or directory&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The fix is to remove the udev package from the guest:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
# vzctl exec 101 'dpkg --force-depends --purge udev'&lt;br /&gt;
(Reading database ... dpkg: udev: dependency problems, but removing anyway as you request:&lt;br /&gt;
 initramfs-tools depends on udev (&amp;gt;= 117-5).&lt;br /&gt;
15227 files and directories currently installed.)&lt;br /&gt;
Removing udev ...&lt;br /&gt;
Purging configuration files for udev ...&lt;br /&gt;
dpkg - warning: while removing udev, directory `/lib/udev/devices/net' not empty so not removed.&lt;br /&gt;
dpkg - warning: while removing udev, directory `/lib/udev/devices' not empty so not removed.&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now restart the container, you should now be able to use the console.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
# vzctl restart 101&lt;br /&gt;
Restarting container&lt;br /&gt;
...&lt;br /&gt;
 &amp;lt;SNIP&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
Container start in progress...&lt;br /&gt;
&lt;br /&gt;
# vzctl enter 101&lt;br /&gt;
entered into CT 101&lt;br /&gt;
root@test:/#&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== /proc ===&lt;br /&gt;
&lt;br /&gt;
The /proc filesystem is not automatically mounted by openvz. So the vserver needs to mount it itself. The simplests (not the best) way it can be done, is by sticking following command at the end of /etc/init.d/bootmisc.sh:&lt;br /&gt;
 mount /proc&lt;br /&gt;
&lt;br /&gt;
[[Category:HOWTO]]&lt;/div&gt;</summary>
		<author><name>Jasond</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.openvz.org/index.php?title=Migration_from_Linux-VServer_to_OpenVZ&amp;diff=8007</id>
		<title>Migration from Linux-VServer to OpenVZ</title>
		<link rel="alternate" type="text/html" href="https://wiki.openvz.org/index.php?title=Migration_from_Linux-VServer_to_OpenVZ&amp;diff=8007"/>
		<updated>2009-12-21T23:51:23Z</updated>

		<summary type="html">&lt;p&gt;Jasond: Added note to remove udev from ubuntu guest&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Roughstub}}&lt;br /&gt;
&lt;br /&gt;
This article describes the migration from Linux-VServer to OpenVZ.&lt;br /&gt;
&lt;br /&gt;
== Details of migration process ==&lt;br /&gt;
&lt;br /&gt;
=== Initial conditions ===&lt;br /&gt;
&lt;br /&gt;
The following example of Linux-VServer based solution was used for the experiment:&lt;br /&gt;
&lt;br /&gt;
* Kernel linux-2.6.17.13 was patched by the patch-2.6.17.13-vs2.0.2.1.diff and rebuild;&lt;br /&gt;
* Util-vserver-0.30.211 tools were used for creating containers;&lt;br /&gt;
&lt;br /&gt;
  # vserver-info&lt;br /&gt;
  Versions:&lt;br /&gt;
  Kernel: 2.6.17.13-vs2.0.2.1&lt;br /&gt;
  VS-API: 0x00020002&lt;br /&gt;
  util-vserver: 0.30.211; Dec  5 2006, 17:10:21&lt;br /&gt;
 &lt;br /&gt;
  Features:&lt;br /&gt;
  CC: gcc, gcc (GCC) 3.4.3 20041212 (Red Hat 3.4.3-9.EL4)&lt;br /&gt;
  CXX: g++, g++ (GCC) 3.4.3 20041212 (Red Hat 3.4.3-9.EL4)&lt;br /&gt;
  CPPFLAGS: ''&lt;br /&gt;
  CFLAGS: '-g -O2 -std=c99 -Wall -pedantic -W -funit-at-a-time'&lt;br /&gt;
  CXXFLAGS: '-g -O2 -ansi -Wall -pedantic -W -fmessage-length=0 -funit-at-a-time'&lt;br /&gt;
  build/host: i686-pc-linux-gnu/i686-pc-linux-gnu&lt;br /&gt;
  Use dietlibc: yes&lt;br /&gt;
  Build C++ programs: yes&lt;br /&gt;
  Build C99 programs: yes&lt;br /&gt;
  Available APIs: v13,net&lt;br /&gt;
  ext2fs Source: kernel&lt;br /&gt;
  syscall(2) invocation: alternative&lt;br /&gt;
  vserver(2) syscall#: 273/glibc&lt;br /&gt;
 &lt;br /&gt;
  Paths:&lt;br /&gt;
  prefix: /usr/local&lt;br /&gt;
  sysconf-Directory: ${prefix}/etc&lt;br /&gt;
  cfg-Directory: ${prefix}/etc/vservers&lt;br /&gt;
  initrd-Directory: $(sysconfdir)/init.d&lt;br /&gt;
  pkgstate-Directory: ${prefix}/var/run/vservers&lt;br /&gt;
  vserver-Rootdir: /vservers&lt;br /&gt;
  #&lt;br /&gt;
&lt;br /&gt;
VServer v345 was built using vserver vX build utility and populated by using the tarballed template of Fedora Core 4.&lt;br /&gt;
 &lt;br /&gt;
  # vserver v345 start&lt;br /&gt;
  Starting system logger:                                    [  OK  ]&lt;br /&gt;
  Initializing random number generator:                      [  OK  ]&lt;br /&gt;
  Starting crond: l:                                         [  OK  ]&lt;br /&gt;
  Starting atd:                                              [  OK  ]&lt;br /&gt;
  # vserver v345 enter&lt;br /&gt;
  [/]# ls -l&lt;br /&gt;
  total 44&lt;br /&gt;
  drwxr-xr-x    2 root     root         4096 Oct 26  2004 bin&lt;br /&gt;
  drwxr-xr-x    3 root     root         4096 Dec  8 17:16 dev&lt;br /&gt;
  drwxr-xr-x   27 root     root         4096 Dec  8 15:21 etc&lt;br /&gt;
  -rw-r--r--    1 root     root            0 Dec  8 15:33 halt&lt;br /&gt;
  drwxr-xr-x    2 root     root         4096 Jan 24  2003 home&lt;br /&gt;
  drwxr-xr-x    7 root     root         4096 Oct 26  2004 lib&lt;br /&gt;
  drwxr-xr-x    2 root     root         4096 Jan 24  2003 mnt&lt;br /&gt;
  drwxr-xr-x    3 root     root         4096 Oct 26  2004 opt&lt;br /&gt;
  -rw-r--r--    1 root     root            0 Dec  7 20:17 poweroff&lt;br /&gt;
  dr-xr-xr-x   80 root     root            0 Dec  8 11:38 proc&lt;br /&gt;
  drwxr-x---    2 root     root         4096 Dec  7 20:17 root&lt;br /&gt;
  drwxr-xr-x    2 root     root         4096 Oct 26  2004 sbin&lt;br /&gt;
  drwxrwxrwt    2 root     root           40 Dec  8 17:16 tmp&lt;br /&gt;
  drwxr-xr-x   15 root     root         4096 Jul 27  2004 usr&lt;br /&gt;
  drwxr-xr-x   17 root     root         4096 Oct 26  2004 var&lt;br /&gt;
  [/]# sh&lt;br /&gt;
  sh-2.05b#&lt;br /&gt;
  .........&lt;br /&gt;
&lt;br /&gt;
As a result we obtain running virtual environment v345:&lt;br /&gt;
&lt;br /&gt;
  # vserver-stat&lt;br /&gt;
 &lt;br /&gt;
  CTX   PROC    VSZ    RSS  userTIME   sysTIME    UPTIME NAME&lt;br /&gt;
  0       51  90.9M  26.3M   0m58s75   2m42s57  33m45s93 root server&lt;br /&gt;
  49153    4  10.2M   2.8M   0m00s00   0m00s11  21m45s42 v345&lt;br /&gt;
 &lt;br /&gt;
  # &lt;br /&gt;
&lt;br /&gt;
=== Starting migration to OpenVZ ===&lt;br /&gt;
&lt;br /&gt;
Downloading and installing the stable OpenVZ kernel.&lt;br /&gt;
&lt;br /&gt;
Install the OpenVZ kernel, as described in [[Quick installation]]. &lt;br /&gt;
&lt;br /&gt;
After the kernel is installed, reboot the machine. After rebooting and logging in you will see the following reply on vserver-stat call:&lt;br /&gt;
&lt;br /&gt;
  # vserver-stat&lt;br /&gt;
  can not change context: migrate kernel feature missing and 'compat' API disabled: Function not implemented&lt;br /&gt;
&lt;br /&gt;
It is a natural thing that now virtual environment v345 is unavailable. The following steps will be devoted to making it&lt;br /&gt;
work over OpenVZ kernel.&lt;br /&gt;
&lt;br /&gt;
=== Downloading and installing vzctl package ===&lt;br /&gt;
&lt;br /&gt;
OpenVZ solution requires installing a set of tools: vzctl and vzquota packages. Download and install it, as described in [[quick installation]].&lt;br /&gt;
&lt;br /&gt;
If rpm complains about unresolved dependencies, you'll have to satisfy them first, then repeat the installation.&lt;br /&gt;
Then launch the OpenVZ:&lt;br /&gt;
&lt;br /&gt;
  # /sbin/service vz start&lt;br /&gt;
  Starting OpenVZ:                                           [  OK  ]&lt;br /&gt;
  Bringing up interface venet0:                              [  OK  ]&lt;br /&gt;
  Configuring interface venet0:                              [  OK  ]&lt;br /&gt;
&lt;br /&gt;
Currently vzlist utility is unable to find any containers:&lt;br /&gt;
  # vzlist&lt;br /&gt;
  Containers not found&lt;br /&gt;
&lt;br /&gt;
=== Updating different configurations  ===&lt;br /&gt;
&lt;br /&gt;
Move the existing guest OSs to the right place:&lt;br /&gt;
&lt;br /&gt;
  # cd /vz&lt;br /&gt;
  # mkdir private&lt;br /&gt;
  # mkdir private/345&lt;br /&gt;
  # mv /vservers/v345 /vz/private/345&lt;br /&gt;
&lt;br /&gt;
Now it is time for creating configuration files for OpenVZ container. Use the basic sample&lt;br /&gt;
configuration presented in /etc/sysconfig/vz-scripts/ve-vps.basic.conf-sample file:&lt;br /&gt;
&lt;br /&gt;
  # cd /etc/sysconfig/vz-scripts&lt;br /&gt;
  # cp ve-vps.basic.conf-sample 345.conf&lt;br /&gt;
&lt;br /&gt;
Now, let's set some parameters for the new container.&lt;br /&gt;
&lt;br /&gt;
First, we need to tell which distro the container is running:&lt;br /&gt;
  # echo &amp;quot;OSTEMPLATE=&amp;quot;fedora-core-4&amp;quot; &amp;gt;&amp;gt; 345.conf&lt;br /&gt;
&lt;br /&gt;
Then we set a few more parameters:&lt;br /&gt;
  vzctl set 345 --onboot yes --save # to make it start upon reboot&lt;br /&gt;
  vzctl set 345 --ipadd 192.168.0.145 --save&lt;br /&gt;
  vzctl set 345 --hostname test345.my.org --save&lt;br /&gt;
&lt;br /&gt;
== Testing how the guest OSs successfully work over OpenVZ ==&lt;br /&gt;
&lt;br /&gt;
Now you can start a container:&lt;br /&gt;
&lt;br /&gt;
 # vzctl start 345&lt;br /&gt;
&lt;br /&gt;
and see if it's running:&lt;br /&gt;
  # vzlist -a&lt;br /&gt;
  CTID      NPROC  STATUS  IP_ADDR         HOSTNAME&lt;br /&gt;
  345          5   running 192.168.0.145   test345.my.org&lt;br /&gt;
&lt;br /&gt;
You can run commands in it:&lt;br /&gt;
&lt;br /&gt;
  # vzctl exec 345 ls -l&lt;br /&gt;
  total 48&lt;br /&gt;
  drwxr-xr-x    2 root     root         4096 Oct 26  2004 bin&lt;br /&gt;
  drwxr-xr-x    3 root     root         4096 Dec 11 12:42 dev&lt;br /&gt;
  drwxr-xr-x   27 root     root         4096 Dec 11 12:44 etc&lt;br /&gt;
  -rw-r--r--    1 root     root            0 Dec 11 12:13 fastboot&lt;br /&gt;
  -rw-r--r--    1 root     root            0 Dec  8 15:33 halt&lt;br /&gt;
  drwxr-xr-x    2 root     root         4096 Jan 24  2003 home&lt;br /&gt;
  drwxr-xr-x    7 root     root         4096 Oct 26  2004 lib&lt;br /&gt;
  drwxr-xr-x    2 root     root         4096 Jan 24  2003 mnt&lt;br /&gt;
  drwxr-xr-x    3 root     root         4096 Oct 26  2004 opt&lt;br /&gt;
  -rw-r--r--    1 root     root            0 Dec  7 20:17 poweroff&lt;br /&gt;
  dr-xr-xr-x   70 root     root            0 Dec 11 12:42 proc&lt;br /&gt;
  drwxr-x---    2 root     root         4096 Dec  7 20:17 root&lt;br /&gt;
  drwxr-xr-x    2 root     root         4096 Dec 11 12:13 sbin&lt;br /&gt;
  drwxrwxrwt    2 root     root         4096 Dec  8 12:40 tmp&lt;br /&gt;
  drwxr-xr-x   15 root     root         4096 Jul 27  2004 usr&lt;br /&gt;
  drwxr-xr-x   17 root     root         4096 Oct 26  2004 var&lt;br /&gt;
&lt;br /&gt;
== Issues ==&lt;br /&gt;
&lt;br /&gt;
=== Networking ===&lt;br /&gt;
&lt;br /&gt;
==== Starting networking in VEs ====&lt;br /&gt;
&lt;br /&gt;
The vserver-originating containers do not initialize network at all. Thus one needs to use following command to enable networking start (inside of the migrated container):&lt;br /&gt;
 cd /etc/rcS.d&lt;br /&gt;
 ln -s ../init.d/networking S40networking&lt;br /&gt;
&lt;br /&gt;
==== Migrating your VServer Shorewall setup ====&lt;br /&gt;
&lt;br /&gt;
If you had the [http://www.shorewall.net/ Shorewall firewall] running on the hardware node to route traffic to and from your guests, here are a couple of advices, provided you want a networking setup close to what you had with Vserver (i.e. running &amp;lt;code&amp;gt;vnet&amp;lt;/code&amp;gt; interfaces, not &amp;lt;code&amp;gt;veth&amp;lt;/code&amp;gt; ones) :&lt;br /&gt;
* do not use the &amp;lt;code&amp;gt;venet0&amp;lt;/code&amp;gt; interface in Shorewall's configuration as the &amp;lt;code&amp;gt;vz&amp;lt;/code&amp;gt; service starts after Shorewall (at least on Debian) and thus the interface does not exist when Shorewall starts. Do not use &amp;lt;code&amp;gt;detect&amp;lt;/code&amp;gt; for the broadcast in &amp;lt;code&amp;gt;/etc/shorewall/interfaces&amp;lt;/code&amp;gt;.&lt;br /&gt;
* for your VEs to be able to talk to each other, use the &amp;lt;code&amp;gt;routeback&amp;lt;/code&amp;gt; option for &amp;lt;code&amp;gt;venet0&amp;lt;/code&amp;gt; (and others) in &amp;lt;code&amp;gt;/etc/shorewall/interfaces&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== IP src from VEs ====&lt;br /&gt;
&lt;br /&gt;
If you run a mail server in a VE, and if the hardware node has multiple network interfaces, you may have mail routing issues because of the originated IP address of the packets coming from the hardware node. Simply specify an interface in &amp;lt;code&amp;gt;/etc/vz/vz.conf&amp;lt;/code&amp;gt; :&lt;br /&gt;
&amp;lt;pre&amp;gt;VE_ROUTE_SRC_DEV=&amp;quot;iface_name&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Disk space information ===&lt;br /&gt;
&lt;br /&gt;
Disk space information is empty. Do the following to fix:&lt;br /&gt;
 rm /etc/mtab&lt;br /&gt;
 ln -s /proc/mounts /etc/mtab&lt;br /&gt;
&lt;br /&gt;
=== /dev ===&lt;br /&gt;
&lt;br /&gt;
Vserver mounts /dev/pts filesystem for container transparently, whereas openvz does not. To compensate the ommission, you need to move aside /dev directory in the vserver-originating container and copy /dev directory from openvz based container.&lt;br /&gt;
&lt;br /&gt;
Additionally, Ubuntu based vservers have the udev package installed which prevents access to the console in openvz. This error message is an example of the problem:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
# vzctl enter 101&lt;br /&gt;
enter into CT 101 failed&lt;br /&gt;
Unable to open pty: No such file or directory&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The fix is to remove the udev package from the guest:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
# vzctl exec 101 'dpkg --force-depends --purge udev'&lt;br /&gt;
(Reading database ... dpkg: udev: dependency problems, but removing anyway as you request:&lt;br /&gt;
 initramfs-tools depends on udev (&amp;gt;= 117-5).&lt;br /&gt;
15227 files and directories currently installed.)&lt;br /&gt;
Removing udev ...&lt;br /&gt;
Purging configuration files for udev ...&lt;br /&gt;
dpkg - warning: while removing udev, directory `/lib/udev/devices/net' not empty so not removed.&lt;br /&gt;
dpkg - warning: while removing udev, directory `/lib/udev/devices' not empty so not removed.&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now restart the container, you should now be able to use the console.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
# vzctl restart 101&lt;br /&gt;
Restarting container&lt;br /&gt;
...&lt;br /&gt;
 &amp;lt;SNIP&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
Container start in progress...&lt;br /&gt;
&lt;br /&gt;
# vzctl enter 101&lt;br /&gt;
entered into CT 101&lt;br /&gt;
root@test:/#&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== /proc ===&lt;br /&gt;
&lt;br /&gt;
The /proc filesystem is not automatically mounted by openvz. So the vserver needs to mount it itself. The simplests (not the best) way it can be done, is by sticking following command at the end of /etc/init.d/bootmisc.sh:&lt;br /&gt;
 mount /proc&lt;br /&gt;
&lt;br /&gt;
[[Category:HOWTO]]&lt;/div&gt;</summary>
		<author><name>Jasond</name></author>
		
	</entry>
</feed>