<?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=Stoffell</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=Stoffell"/>
	<link rel="alternate" type="text/html" href="https://wiki.openvz.org/Special:Contributions/Stoffell"/>
	<updated>2026-05-02T15:44:11Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.31.1</generator>
	<entry>
		<id>https://wiki.openvz.org/index.php?title=Physical_to_container&amp;diff=2742</id>
		<title>Physical to container</title>
		<link rel="alternate" type="text/html" href="https://wiki.openvz.org/index.php?title=Physical_to_container&amp;diff=2742"/>
		<updated>2007-02-09T18:26:42Z</updated>

		<summary type="html">&lt;p&gt;Stoffell: /* Success Stories */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A rough description of how to migrate existing physical server into a [[VE]].&lt;br /&gt;
&lt;br /&gt;
== Prepare a new “empty” VE ==&lt;br /&gt;
For OpenVZ this would mean the following (assume you chose VE ID of 123):&lt;br /&gt;
&lt;br /&gt;
 mkdir /vz/root/123 /vz/private/123&lt;br /&gt;
 cat /etc/vz/conf/ve-vps.basic.conf-sample &amp;gt; /etc/vz/conf/123.conf&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Preparing to migrate ==&lt;br /&gt;
&lt;br /&gt;
Stop most services on a machine to be migrated. “Most” means services such as web server, databases and the like — so you will not loose your data. Just leave the bare minimum (including ssh daemon).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Copying the data ==&lt;br /&gt;
&lt;br /&gt;
Copy all your data from the machine to an OpenVZ box. Say you'll be using VE with ID of 123, then all the data should be placed to &amp;lt;code&amp;gt;/vz/private/123/&amp;lt;/code&amp;gt; directory (so there will be directories such as &amp;lt;code&amp;gt;/vz/private/123/bin&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;etc&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;var&amp;lt;/code&amp;gt; and so on). This could be done by scp or rsync.&lt;br /&gt;
&lt;br /&gt;
rsync example (run from the new HN):&lt;br /&gt;
 rsync -arvpz --exclude dev --exclude proc --exclude tmp -e &amp;quot;ssh -l root@a.b.c.d&amp;quot; root@a.b.c.d:/ /vz/private/123/&lt;br /&gt;
&lt;br /&gt;
'''Advantage:''' Your system doesn't really go down.&lt;br /&gt;
&lt;br /&gt;
Another way to do is using a live cd, booting up and use tar to dump the complete disk in a tar you save over the network or on a USB device.&lt;br /&gt;
&lt;br /&gt;
Another approach is using tar and excluding some dirs, you could do it like this:&lt;br /&gt;
&lt;br /&gt;
Create a file /tmp/excludes.excl with these contents:&lt;br /&gt;
 .bash_history&lt;br /&gt;
 /dev/*&lt;br /&gt;
 /mnt/*&lt;br /&gt;
 /tmp/*&lt;br /&gt;
 /proc/*&lt;br /&gt;
 /sys/*&lt;br /&gt;
 /usr/src/*&lt;br /&gt;
&lt;br /&gt;
Then create the tar. But remember, when the system is 'not' using udev, you have to look into /proc/ after creating your VE because some devices might not exist. (/dev/ptmx or others)&lt;br /&gt;
&lt;br /&gt;
 # tar cjpf /tmp/mysystem.tar.bz2 / -X /tmp/excludes.excl&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
'''Advantage:''' You don't need to boot from a livecd, so your system doesn't really go down.&lt;br /&gt;
&lt;br /&gt;
== Set VE parameters ==&lt;br /&gt;
&lt;br /&gt;
=== OSTEMPLATE ===&lt;br /&gt;
You have to add &amp;lt;code&amp;gt;OSTEMPLATE=xxx&amp;lt;/code&amp;gt; line to &amp;lt;code&amp;gt;/etc/vz/conf/123.conf&amp;lt;/code&amp;gt; file, where &amp;lt;code&amp;gt;xxx&amp;lt;/code&amp;gt; would be distribution name (like &amp;lt;code&amp;gt;debian-3.0&amp;lt;/code&amp;gt;) for vzctl to be able to make changes specific for this distribution.&lt;br /&gt;
&lt;br /&gt;
=== IP address(es) ===&lt;br /&gt;
Also, you have to supply an IP for a new VE:&lt;br /&gt;
 &lt;br /&gt;
 vzctl set 123 --ipadd x.x.x.x --save&lt;br /&gt;
&lt;br /&gt;
== Making adjustments ==&lt;br /&gt;
Since VE is a bit different than a real physical server, you have to edit some files inside your new VE.&lt;br /&gt;
&lt;br /&gt;
=== /etc/inittab ===&lt;br /&gt;
A VE does not have real ttys, so you have to disable getty in &amp;lt;code&amp;gt;/etc/inittab&amp;lt;/code&amp;gt; (i. e. &amp;lt;code&amp;gt;/vz/private/123/etc/inittab&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
 sed -i -e '/getty/d' /vz/private/123/etc/inittab&lt;br /&gt;
&lt;br /&gt;
=== /etc/mtab ===&lt;br /&gt;
Link &amp;lt;code&amp;gt;/etc/mtab&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;/proc/mounts&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 rm -f /vz/private/123/etc/mtab&lt;br /&gt;
 ln -s /proc/mounts /vz/private/123/etc/mtab &lt;br /&gt;
&lt;br /&gt;
=== /etc/fstab ===&lt;br /&gt;
Since you do not have any real disk partitions in a VE, /etc/fstab (or most part of it) is no longer needed. Empty it (excluding the line for /dev/pts):&lt;br /&gt;
&lt;br /&gt;
 cp /vz/private/123/etc/fstab /vz/private/123/etc/fstab.old&lt;br /&gt;
 grep devpts /vz/private/123/etc/fstab.old &amp;gt; /vz/private/123/etc/fstab&lt;br /&gt;
&lt;br /&gt;
You can also mount a devpts in a running (but not fully functional) VE:&lt;br /&gt;
 vzctl exec 123 mount -t devpts none /dev/pts&lt;br /&gt;
&lt;br /&gt;
=== /dev TTY devices ===&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
==== /dev/ptmx ====&lt;br /&gt;
Check that /dev/ptmx exists. If it does not, create with:&lt;br /&gt;
 mknod /vz/private/123/dev/ptmx c 5 2&lt;br /&gt;
&lt;br /&gt;
==== /dev/pts/ ====&lt;br /&gt;
Check that /dev/pts exists. It's a directory, if it does not exist, create with:&lt;br /&gt;
 mkdir /vz/private/123/dev/pts&lt;br /&gt;
&lt;br /&gt;
==== /dev/ttyp* and /dev/ptyp* ====&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
To copy:&lt;br /&gt;
 cp -a /dev/ttyp* /dev/ptyp* /vz/private/123/dev/&lt;br /&gt;
&lt;br /&gt;
To recreate with MAKEDEV, either&lt;br /&gt;
 /sbin/MAKEDEV -d /vz/private/123/dev ttyp ptyp&lt;br /&gt;
or&lt;br /&gt;
 cd /vz/private/123/dev &amp;amp;&amp;amp; /sbin/MAKEDEV ttyp&lt;br /&gt;
&lt;br /&gt;
=== Other ===&lt;br /&gt;
There might be other adjustments needed. Please add those here if you have more info.&lt;br /&gt;
&lt;br /&gt;
== Starting a new VE ==&lt;br /&gt;
&lt;br /&gt;
Try to start your new VE:&lt;br /&gt;
 &lt;br /&gt;
 vzctl start 123&lt;br /&gt;
&lt;br /&gt;
Now check that everything works fine. If not, see [[#Troubleshooting]] below.&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
=== Can't enter VE ===&lt;br /&gt;
&lt;br /&gt;
If you can not enter your VE (using &amp;lt;code&amp;gt;vzctl enter&amp;lt;/code&amp;gt;), you should be able to at least execute commands in it.&lt;br /&gt;
&lt;br /&gt;
First, see the [[#/dev TTY devices]] section above.&lt;br /&gt;
&lt;br /&gt;
Next, check if devpts is mounted:&lt;br /&gt;
 vzctl exec 123 mount | grep pts&lt;br /&gt;
&lt;br /&gt;
If it is not mounted, mount it:&lt;br /&gt;
 vzctl exec 123 mount -t devpts none /dev/pts&lt;br /&gt;
&lt;br /&gt;
Then, add the appropriate mount command to VE's startup scripts. On some distros, you need to have the appropriate line in VE's /etc/fstab.&lt;br /&gt;
&lt;br /&gt;
=== Other problems ===&lt;br /&gt;
If anything goes wrong, try to find out why and fix. If you have enough Linux experience, it can be handled. Also check out IRC and please report back on this page.&lt;br /&gt;
&lt;br /&gt;
== Success Stories ==&lt;br /&gt;
- Debian 3.1 Sarge with MySQL, apache2, PowerDNS&lt;br /&gt;
--[[User:Stoffell|stoffell]] 08:41, 8 February 2007 (EST)&lt;br /&gt;
&lt;br /&gt;
- Red Hat 7.2 with MySQL 3.23, apache, Chilisoft --[[User:Stoffell|stoffell]] 13:26, 9 February 2007 (EST)&lt;br /&gt;
[[Category:HOWTO]]&lt;/div&gt;</summary>
		<author><name>Stoffell</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.openvz.org/index.php?title=Physical_to_container&amp;diff=2737</id>
		<title>Physical to container</title>
		<link rel="alternate" type="text/html" href="https://wiki.openvz.org/index.php?title=Physical_to_container&amp;diff=2737"/>
		<updated>2007-02-09T12:51:25Z</updated>

		<summary type="html">&lt;p&gt;Stoffell: /* Copying the data */  rsync example&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A rough description of how to migrate existing physical server into a [[VE]].&lt;br /&gt;
&lt;br /&gt;
== Prepare a new “empty” VE ==&lt;br /&gt;
For OpenVZ this would mean the following (assume you chose VE ID of 123):&lt;br /&gt;
&lt;br /&gt;
 mkdir /vz/root/123 /vz/private/123&lt;br /&gt;
 cat /etc/vz/conf/ve-vps.basic.conf-sample &amp;gt; /etc/vz/conf/123.conf&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Preparing to migrate ==&lt;br /&gt;
&lt;br /&gt;
Stop most services on a machine to be migrated. “Most” means services such as web server, databases and the like — so you will not loose your data. Just leave the bare minimum (including ssh daemon).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Copying the data ==&lt;br /&gt;
&lt;br /&gt;
Copy all your data from the machine to an OpenVZ box. Say you'll be using VE with ID of 123, then all the data should be placed to &amp;lt;code&amp;gt;/vz/private/123/&amp;lt;/code&amp;gt; directory (so there will be directories such as &amp;lt;code&amp;gt;/vz/private/123/bin&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;etc&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;var&amp;lt;/code&amp;gt; and so on). This could be done by scp or rsync.&lt;br /&gt;
&lt;br /&gt;
rsync example (run from the new HN):&lt;br /&gt;
 rsync -arvpz --exclude dev --exclude proc --exclude tmp -e &amp;quot;ssh -l root@a.b.c.d&amp;quot; root@a.b.c.d:/ /vz/private/123/&lt;br /&gt;
&lt;br /&gt;
'''Advantage:''' Your system doesn't really go down.&lt;br /&gt;
&lt;br /&gt;
Another way to do is using a live cd, booting up and use tar to dump the complete disk in a tar you save over the network or on a USB device.&lt;br /&gt;
&lt;br /&gt;
Another approach is using tar and excluding some dirs, you could do it like this:&lt;br /&gt;
&lt;br /&gt;
Create a file /tmp/excludes.excl with these contents:&lt;br /&gt;
 .bash_history&lt;br /&gt;
 /dev/*&lt;br /&gt;
 /mnt/*&lt;br /&gt;
 /tmp/*&lt;br /&gt;
 /proc/*&lt;br /&gt;
 /sys/*&lt;br /&gt;
 /usr/src/*&lt;br /&gt;
&lt;br /&gt;
Then create the tar. But remember, when the system is 'not' using udev, you have to look into /proc/ after creating your VE because some devices might not exist. (/dev/ptmx or others)&lt;br /&gt;
&lt;br /&gt;
 # tar cjpf /tmp/mysystem.tar.bz2 / -X /tmp/excludes.excl&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
'''Advantage:''' You don't need to boot from a livecd, so your system doesn't really go down.&lt;br /&gt;
&lt;br /&gt;
== Set VE parameters ==&lt;br /&gt;
&lt;br /&gt;
=== OSTEMPLATE ===&lt;br /&gt;
You have to add &amp;lt;code&amp;gt;OSTEMPLATE=xxx&amp;lt;/code&amp;gt; line to &amp;lt;code&amp;gt;/etc/vz/conf/123.conf&amp;lt;/code&amp;gt; file, where &amp;lt;code&amp;gt;xxx&amp;lt;/code&amp;gt; would be distribution name (like &amp;lt;code&amp;gt;debian-3.0&amp;lt;/code&amp;gt;) for vzctl to be able to make changes specific for this distribution.&lt;br /&gt;
&lt;br /&gt;
=== IP address(es) ===&lt;br /&gt;
Also, you have to supply an IP for a new VE:&lt;br /&gt;
 &lt;br /&gt;
 vzctl set 123 --ipadd x.x.x.x --save&lt;br /&gt;
&lt;br /&gt;
== Making adjustments ==&lt;br /&gt;
Since VE is a bit different than a real physical server, you have to edit some files inside your new VE.&lt;br /&gt;
&lt;br /&gt;
=== /etc/inittab ===&lt;br /&gt;
A VE does not have real ttys, so you have to disable getty in &amp;lt;code&amp;gt;/etc/inittab&amp;lt;/code&amp;gt; (i. e. &amp;lt;code&amp;gt;/vz/private/123/etc/inittab&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
 sed -i -e '/getty/d' /vz/private/123/etc/inittab&lt;br /&gt;
&lt;br /&gt;
=== /etc/mtab ===&lt;br /&gt;
Link &amp;lt;code&amp;gt;/etc/mtab&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;/proc/mounts&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 rm -f /vz/private/123/etc/mtab&lt;br /&gt;
 ln -s /proc/mounts /vz/private/123/etc/mtab &lt;br /&gt;
&lt;br /&gt;
=== /etc/fstab ===&lt;br /&gt;
Since you do not have any real disk partitions in a VE, /etc/fstab (or most part of it) is no longer needed. Empty it (excluding the line for /dev/pts):&lt;br /&gt;
&lt;br /&gt;
 cp /vz/private/123/etc/fstab /vz/private/123/etc/fstab.old&lt;br /&gt;
 grep devpts /vz/private/123/etc/fstab.old &amp;gt; /vz/private/123/etc/fstab&lt;br /&gt;
&lt;br /&gt;
You can also mount a devpts in a running (but not fully functional) VE:&lt;br /&gt;
 vzctl exec 123 mount -t devpts none /dev/pts&lt;br /&gt;
&lt;br /&gt;
=== /dev TTY devices ===&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
==== /dev/ptmx ====&lt;br /&gt;
Check that /dev/ptmx exists. If it does not, create with:&lt;br /&gt;
 mknod /vz/private/123/dev/ptmx c 5 2&lt;br /&gt;
&lt;br /&gt;
==== /dev/pts/ ====&lt;br /&gt;
Check that /dev/pts exists. It's a directory, if it does not exist, create with:&lt;br /&gt;
 mkdir /vz/private/123/dev/pts&lt;br /&gt;
&lt;br /&gt;
==== /dev/ttyp* and /dev/ptyp* ====&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
To copy:&lt;br /&gt;
 cp -a /dev/ttyp* /dev/ptyp* /vz/private/123/dev/&lt;br /&gt;
&lt;br /&gt;
To recreate with MAKEDEV, either&lt;br /&gt;
 /sbin/MAKEDEV -d /vz/private/123/dev ttyp ptyp&lt;br /&gt;
or&lt;br /&gt;
 cd /vz/private/123/dev &amp;amp;&amp;amp; /sbin/MAKEDEV ttyp&lt;br /&gt;
&lt;br /&gt;
=== Other ===&lt;br /&gt;
There might be other adjustments needed. Please add those here if you have more info.&lt;br /&gt;
&lt;br /&gt;
== Starting a new VE ==&lt;br /&gt;
&lt;br /&gt;
Try to start your new VE:&lt;br /&gt;
 &lt;br /&gt;
 vzctl start 123&lt;br /&gt;
&lt;br /&gt;
Now check that everything works fine. If not, see [[#Troubleshooting]] below.&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
=== Can't enter VE ===&lt;br /&gt;
&lt;br /&gt;
If you can not enter your VE (using &amp;lt;code&amp;gt;vzctl enter&amp;lt;/code&amp;gt;), you should be able to at least execute commands in it.&lt;br /&gt;
&lt;br /&gt;
First, see the [[#/dev TTY devices]] section above.&lt;br /&gt;
&lt;br /&gt;
Next, check if devpts is mounted:&lt;br /&gt;
 vzctl exec 123 mount | grep pts&lt;br /&gt;
&lt;br /&gt;
If it is not mounted, mount it:&lt;br /&gt;
 vzctl exec 123 mount -t devpts none /dev/pts&lt;br /&gt;
&lt;br /&gt;
Then, add the appropriate mount command to VE's startup scripts. On some distros, you need to have the appropriate line in VE's /etc/fstab.&lt;br /&gt;
&lt;br /&gt;
=== Other problems ===&lt;br /&gt;
If anything goes wrong, try to find out why and fix. If you have enough Linux experience, it can be handled. Also check out IRC and please report back on this page.&lt;br /&gt;
&lt;br /&gt;
== Success Stories ==&lt;br /&gt;
- Debian 3.1 Sarge with MySQL, apache2, PowerDNS&lt;br /&gt;
--[[User:Stoffell|stoffell]] 08:41, 8 February 2007 (EST)&lt;br /&gt;
&lt;br /&gt;
[[Category:HOWTO]]&lt;/div&gt;</summary>
		<author><name>Stoffell</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.openvz.org/index.php?title=Physical_to_container&amp;diff=2736</id>
		<title>Physical to container</title>
		<link rel="alternate" type="text/html" href="https://wiki.openvz.org/index.php?title=Physical_to_container&amp;diff=2736"/>
		<updated>2007-02-09T11:22:28Z</updated>

		<summary type="html">&lt;p&gt;Stoffell: added mount command for dev/pts&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A rough description of how to migrate existing physical server into a [[VE]].&lt;br /&gt;
&lt;br /&gt;
== Prepare a new “empty” VE ==&lt;br /&gt;
For OpenVZ this would mean the following (assume you chose VE ID of 123):&lt;br /&gt;
&lt;br /&gt;
 mkdir /vz/root/123 /vz/private/123&lt;br /&gt;
 cat /etc/vz/conf/ve-vps.basic.conf-sample &amp;gt; /etc/vz/conf/123.conf&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Preparing to migrate ==&lt;br /&gt;
&lt;br /&gt;
Stop most services on a machine to be migrated. “Most” means services such as web server, databases and the like — so you will not loose your data. Just leave the bare minimum (including ssh daemon).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Copying the data ==&lt;br /&gt;
&lt;br /&gt;
Copy all your data from the machine to an OpenVZ box. Say you'll be using VE with ID of 123, then all the data should be placed to &amp;lt;code&amp;gt;/vz/private/123/&amp;lt;/code&amp;gt; directory (so there will be directories such as &amp;lt;code&amp;gt;/vz/private/123/bin&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;etc&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;var&amp;lt;/code&amp;gt; and so on). This could be done by scp or rsync.&lt;br /&gt;
&lt;br /&gt;
'''Advantage:''' Your system doesn't really go down.&lt;br /&gt;
&lt;br /&gt;
Another way to do is using a live cd, booting up and use tar to dump the complete disk in a tar you save over the network or on a USB device.&lt;br /&gt;
&lt;br /&gt;
Another approach is using tar and excluding some dirs, you could do it like this:&lt;br /&gt;
&lt;br /&gt;
Create a file /tmp/excludes.excl with these contents:&lt;br /&gt;
 .bash_history&lt;br /&gt;
 /dev/*&lt;br /&gt;
 /mnt/*&lt;br /&gt;
 /tmp/*&lt;br /&gt;
 /proc/*&lt;br /&gt;
 /sys/*&lt;br /&gt;
 /usr/src/*&lt;br /&gt;
&lt;br /&gt;
Then create the tar. But remember, when the system is 'not' using udev, you have to look into /proc/ after creating your VE because some devices might not exist. (/dev/ptmx or others)&lt;br /&gt;
&lt;br /&gt;
 # tar cjpf /tmp/mysystem.tar.bz2 / -X /tmp/excludes.excl&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
'''Advantage:''' You don't need to boot from a livecd, so your system doesn't really go down.&lt;br /&gt;
&lt;br /&gt;
== Set VE parameters ==&lt;br /&gt;
&lt;br /&gt;
=== OSTEMPLATE ===&lt;br /&gt;
You have to add &amp;lt;code&amp;gt;OSTEMPLATE=xxx&amp;lt;/code&amp;gt; line to &amp;lt;code&amp;gt;/etc/vz/conf/123.conf&amp;lt;/code&amp;gt; file, where &amp;lt;code&amp;gt;xxx&amp;lt;/code&amp;gt; would be distribution name (like &amp;lt;code&amp;gt;debian-3.0&amp;lt;/code&amp;gt;) for vzctl to be able to make changes specific for this distribution.&lt;br /&gt;
&lt;br /&gt;
=== IP address(es) ===&lt;br /&gt;
Also, you have to supply an IP for a new VE:&lt;br /&gt;
 &lt;br /&gt;
 vzctl set 123 --ipadd x.x.x.x --save&lt;br /&gt;
&lt;br /&gt;
== Making adjustments ==&lt;br /&gt;
Since VE is a bit different than a real physical server, you have to edit some files inside your new VE.&lt;br /&gt;
&lt;br /&gt;
=== /etc/inittab ===&lt;br /&gt;
A VE does not have real ttys, so you have to disable getty in &amp;lt;code&amp;gt;/etc/inittab&amp;lt;/code&amp;gt; (i. e. &amp;lt;code&amp;gt;/vz/private/123/etc/inittab&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
 sed -i -e '/getty/d' /vz/private/123/etc/inittab&lt;br /&gt;
&lt;br /&gt;
=== /etc/mtab ===&lt;br /&gt;
Link &amp;lt;code&amp;gt;/etc/mtab&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;/proc/mounts&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 rm -f /vz/private/123/etc/mtab&lt;br /&gt;
 ln -s /proc/mounts /vz/private/123/etc/mtab &lt;br /&gt;
&lt;br /&gt;
=== /etc/fstab ===&lt;br /&gt;
Since you do not have any real disk partitions in a VE, /etc/fstab (or most part of it) is no longer needed. Empty it (excluding the line for /dev/pts):&lt;br /&gt;
&lt;br /&gt;
 cp /vz/private/123/etc/fstab /vz/private/123/etc/fstab.old&lt;br /&gt;
 grep devpts /vz/private/123/etc/fstab.old &amp;gt; /vz/private/123/etc/fstab&lt;br /&gt;
&lt;br /&gt;
You can also mount a devpts in a running (but not fully functional) VE:&lt;br /&gt;
 vzctl exec 123 mount -t devpts none /dev/pts&lt;br /&gt;
&lt;br /&gt;
=== /dev TTY devices ===&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
==== /dev/ptmx ====&lt;br /&gt;
Check that /dev/ptmx exists. If it does not, create with:&lt;br /&gt;
 mknod /vz/private/123/dev/ptmx c 5 2&lt;br /&gt;
&lt;br /&gt;
==== /dev/pts/ ====&lt;br /&gt;
Check that /dev/pts exists. It's a directory, if it does not exist, create with:&lt;br /&gt;
 mkdir /vz/private/123/dev/pts&lt;br /&gt;
&lt;br /&gt;
==== /dev/ttyp* and /dev/ptyp* ====&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
To copy:&lt;br /&gt;
 cp -a /dev/ttyp* /dev/ptyp* /vz/private/123/dev/&lt;br /&gt;
&lt;br /&gt;
To recreate with MAKEDEV, either&lt;br /&gt;
 /sbin/MAKEDEV -d /vz/private/123/dev ttyp ptyp&lt;br /&gt;
or&lt;br /&gt;
 cd /vz/private/123/dev &amp;amp;&amp;amp; /sbin/MAKEDEV ttyp&lt;br /&gt;
&lt;br /&gt;
=== Other ===&lt;br /&gt;
There might be other adjustments needed. Please add those here if you have more info.&lt;br /&gt;
&lt;br /&gt;
== Starting a new VE ==&lt;br /&gt;
&lt;br /&gt;
Try to start your new VE:&lt;br /&gt;
 &lt;br /&gt;
 vzctl start 123&lt;br /&gt;
&lt;br /&gt;
Now check that everything works fine. If not, see [[#Troubleshooting]] below.&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
=== Can't enter VE ===&lt;br /&gt;
&lt;br /&gt;
If you can not enter your VE (using &amp;lt;code&amp;gt;vzctl enter&amp;lt;/code&amp;gt;), you should be able to at least execute commands in it.&lt;br /&gt;
&lt;br /&gt;
First, see the [[#/dev TTY devices]] section above.&lt;br /&gt;
&lt;br /&gt;
Next, check if devpts is mounted:&lt;br /&gt;
 vzctl exec 123 mount | grep pts&lt;br /&gt;
&lt;br /&gt;
If it is not mounted, mount it:&lt;br /&gt;
 vzctl exec 123 mount -t devpts none /dev/pts&lt;br /&gt;
&lt;br /&gt;
Then, add the appropriate mount command to VE's startup scripts. On some distros, you need to have the appropriate line in VE's /etc/fstab.&lt;br /&gt;
&lt;br /&gt;
=== Other problems ===&lt;br /&gt;
If anything goes wrong, try to find out why and fix. If you have enough Linux experience, it can be handled. Also check out IRC and please report back on this page.&lt;br /&gt;
&lt;br /&gt;
== Success Stories ==&lt;br /&gt;
- Debian 3.1 Sarge with MySQL, apache2, PowerDNS&lt;br /&gt;
--[[User:Stoffell|stoffell]] 08:41, 8 February 2007 (EST)&lt;br /&gt;
&lt;br /&gt;
[[Category:HOWTO]]&lt;/div&gt;</summary>
		<author><name>Stoffell</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.openvz.org/index.php?title=Physical_to_container&amp;diff=2735</id>
		<title>Physical to container</title>
		<link rel="alternate" type="text/html" href="https://wiki.openvz.org/index.php?title=Physical_to_container&amp;diff=2735"/>
		<updated>2007-02-09T07:27:14Z</updated>

		<summary type="html">&lt;p&gt;Stoffell: added copy method using tar with live cd or exclude file&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A rough description of how to migrate existing physical server into a [[VE]].&lt;br /&gt;
&lt;br /&gt;
== Prepare a new “empty” VE ==&lt;br /&gt;
For OpenVZ this would mean the following (assume you chose VE ID of 123):&lt;br /&gt;
&lt;br /&gt;
 mkdir /vz/root/123 /vz/private/123&lt;br /&gt;
 cat /etc/vz/conf/ve-vps.basic.conf-sample &amp;gt; /etc/vz/conf/123.conf&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Preparing to migrate ==&lt;br /&gt;
&lt;br /&gt;
Stop most services on a machine to be migrated. “Most” means services such as web server, databases and the like — so you will not loose your data. Just leave the bare minimum (including ssh daemon).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Copying the data ==&lt;br /&gt;
&lt;br /&gt;
Copy all your data from the machine to an OpenVZ box. Say you'll be using VE with ID of 123, then all the data should be placed to &amp;lt;code&amp;gt;/vz/private/123/&amp;lt;/code&amp;gt; directory (so there will be directories such as &amp;lt;code&amp;gt;/vz/private/123/bin&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;etc&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;var&amp;lt;/code&amp;gt; and so on). This could be done by scp or rsync.&lt;br /&gt;
&lt;br /&gt;
'''Advantage:''' Your system doesn't really go down.&lt;br /&gt;
&lt;br /&gt;
Another way to do is using a live cd, booting up and use tar to dump the complete disk in a tar you save over the network or on a USB device.&lt;br /&gt;
&lt;br /&gt;
Another approach is using tar and excluding some dirs, you could do it like this:&lt;br /&gt;
&lt;br /&gt;
Create a file /tmp/excludes.excl with these contents:&lt;br /&gt;
 .bash_history&lt;br /&gt;
 /dev/*&lt;br /&gt;
 /mnt/*&lt;br /&gt;
 /tmp/*&lt;br /&gt;
 /proc/*&lt;br /&gt;
 /sys/*&lt;br /&gt;
 /usr/src/*&lt;br /&gt;
&lt;br /&gt;
Then create the tar. But remember, when the system is 'not' using udev, you have to look into /proc/ after creating your VE because some devices might not exist. (/dev/ptmx or others)&lt;br /&gt;
&lt;br /&gt;
 # tar cjpf /tmp/mysystem.tar.bz2 / -X /tmp/excludes.excl&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
'''Advantage:''' You don't need to boot from a livecd, so your system doesn't really go down.&lt;br /&gt;
&lt;br /&gt;
== Set VE parameters ==&lt;br /&gt;
&lt;br /&gt;
=== OSTEMPLATE ===&lt;br /&gt;
You have to add &amp;lt;code&amp;gt;OSTEMPLATE=xxx&amp;lt;/code&amp;gt; line to &amp;lt;code&amp;gt;/etc/vz/conf/123.conf&amp;lt;/code&amp;gt; file, where &amp;lt;code&amp;gt;xxx&amp;lt;/code&amp;gt; would be distribution name (like &amp;lt;code&amp;gt;debian-3.0&amp;lt;/code&amp;gt;) for vzctl to be able to make changes specific for this distribution.&lt;br /&gt;
&lt;br /&gt;
=== IP address(es) ===&lt;br /&gt;
Also, you have to supply an IP for a new VE:&lt;br /&gt;
 &lt;br /&gt;
 vzctl set 123 --ipadd x.x.x.x --save&lt;br /&gt;
&lt;br /&gt;
== Making adjustments ==&lt;br /&gt;
Since VE is a bit different than a real physical server, you have to edit some files inside your new VE.&lt;br /&gt;
&lt;br /&gt;
=== /etc/inittab ===&lt;br /&gt;
A VE does not have real ttys, so you have to disable getty in &amp;lt;code&amp;gt;/etc/inittab&amp;lt;/code&amp;gt; (i. e. &amp;lt;code&amp;gt;/vz/private/123/etc/inittab&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
 sed -i -e '/getty/d' /vz/private/123/etc/inittab&lt;br /&gt;
&lt;br /&gt;
=== /etc/mtab ===&lt;br /&gt;
Link &amp;lt;code&amp;gt;/etc/mtab&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;/proc/mounts&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 rm -f /vz/private/123/etc/mtab&lt;br /&gt;
 ln -s /proc/mounts /vz/private/123/etc/mtab &lt;br /&gt;
&lt;br /&gt;
=== /etc/fstab ===&lt;br /&gt;
Since you do not have any real disk partitions in a VE, /etc/fstab (or most part of it) is no longer needed. Empty it (excluding the line for /dev/pts):&lt;br /&gt;
&lt;br /&gt;
 cp /vz/private/123/etc/fstab /vz/private/123/etc/fstab.old&lt;br /&gt;
 grep devpts /vz/private/123/etc/fstab.old &amp;gt; /vz/private/123/etc/fstab&lt;br /&gt;
&lt;br /&gt;
=== /dev TTY devices ===&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
==== /dev/ptmx ====&lt;br /&gt;
Check that /dev/ptmx exists. If it does not, create with:&lt;br /&gt;
 mknod /vz/private/123/dev/ptmx c 5 2&lt;br /&gt;
&lt;br /&gt;
==== /dev/pts/ ====&lt;br /&gt;
Check that /dev/pts exists. It's a directory, if it does not exist, create with:&lt;br /&gt;
 mkdir /vz/private/123/dev/pts&lt;br /&gt;
&lt;br /&gt;
==== /dev/ttyp* and /dev/ptyp* ====&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
To copy:&lt;br /&gt;
 cp -a /dev/ttyp* /dev/ptyp* /vz/private/123/dev/&lt;br /&gt;
&lt;br /&gt;
To recreate with MAKEDEV, either&lt;br /&gt;
 /sbin/MAKEDEV -d /vz/private/123/dev ttyp ptyp&lt;br /&gt;
or&lt;br /&gt;
 cd /vz/private/123/dev &amp;amp;&amp;amp; /sbin/MAKEDEV ttyp&lt;br /&gt;
&lt;br /&gt;
=== Other ===&lt;br /&gt;
There might be other adjustments needed. Please add those here if you have more info.&lt;br /&gt;
&lt;br /&gt;
== Starting a new VE ==&lt;br /&gt;
&lt;br /&gt;
Try to start your new VE:&lt;br /&gt;
 &lt;br /&gt;
 vzctl start 123&lt;br /&gt;
&lt;br /&gt;
Now check that everything works fine. If not, see [[#Troubleshooting]] below.&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
=== Can't enter VE ===&lt;br /&gt;
&lt;br /&gt;
If you can not enter your VE (using &amp;lt;code&amp;gt;vzctl enter&amp;lt;/code&amp;gt;), you should be able to at least execute commands in it.&lt;br /&gt;
&lt;br /&gt;
First, see the [[#/dev TTY devices]] section above.&lt;br /&gt;
&lt;br /&gt;
Next, check if devpts is mounted:&lt;br /&gt;
 vzctl exec 123 mount | grep pts&lt;br /&gt;
&lt;br /&gt;
If it is not mounted, mount it:&lt;br /&gt;
 vzctl exec 123 mount -t devpts none /dev/pts&lt;br /&gt;
&lt;br /&gt;
Then, add the appropriate mount command to VE's startup scripts. On some distros, you need to have the appropriate line in VE's /etc/fstab.&lt;br /&gt;
&lt;br /&gt;
=== Other problems ===&lt;br /&gt;
If anything goes wrong, try to find out why and fix. If you have enough Linux experience, it can be handled. Also check out IRC and please report back on this page.&lt;br /&gt;
&lt;br /&gt;
== Success Stories ==&lt;br /&gt;
- Debian 3.1 Sarge with MySQL, apache2, PowerDNS&lt;br /&gt;
--[[User:Stoffell|stoffell]] 08:41, 8 February 2007 (EST)&lt;br /&gt;
&lt;br /&gt;
[[Category:HOWTO]]&lt;/div&gt;</summary>
		<author><name>Stoffell</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.openvz.org/index.php?title=Physical_to_container&amp;diff=2732</id>
		<title>Physical to container</title>
		<link rel="alternate" type="text/html" href="https://wiki.openvz.org/index.php?title=Physical_to_container&amp;diff=2732"/>
		<updated>2007-02-08T13:44:23Z</updated>

		<summary type="html">&lt;p&gt;Stoffell: added info on dev-ptmx and not able to enter VE&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A rough description of how to migrate existing physical server into a [[VE]].&lt;br /&gt;
&lt;br /&gt;
What you need to do in order to migrate is:&lt;br /&gt;
&lt;br /&gt;
* Prepare an “empty” VE. For OpenVZ this would mean the following (assume you choose VE ID of 123):&lt;br /&gt;
&lt;br /&gt;
 mkdir /vz/root/123 /vz/private/123&lt;br /&gt;
 cat /etc/vz/conf/ve-vps.basic.conf-sample &amp;gt; /etc/vz/conf/123.conf&lt;br /&gt;
&lt;br /&gt;
* Stop most services on a machine to be migrated. “Most” means services such as web server, databases and the like — so you will not loose your data. Just leave the bare minimum (including ssh).&lt;br /&gt;
&lt;br /&gt;
* Copy all your data from the machine to an OpenVZ box. Say you'll be using VE with ID of 123, then all the data should be placed to &amp;lt;code&amp;gt;/vz/private/123/&amp;lt;/code&amp;gt; directory (so there will be directories such as &amp;lt;code&amp;gt;/vz/private/123/bin&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;etc&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;var&amp;lt;/code&amp;gt; and so on). This could be done by scp or rsync.&lt;br /&gt;
&lt;br /&gt;
* Set some VE parameters. You have to add &amp;lt;code&amp;gt;OSTEMPLATE=xxx&amp;lt;/code&amp;gt; line to &amp;lt;code&amp;gt;/etc/vz/conf/123.conf&amp;lt;/code&amp;gt; file, where &amp;lt;code&amp;gt;xxx&amp;lt;/code&amp;gt; would be distribution name (like &amp;lt;code&amp;gt;debian-3.0&amp;lt;/code&amp;gt;) for vzctl to be able to make changes specific for this distribution.&lt;br /&gt;
&lt;br /&gt;
: Also, you have to supply an IP for a new VE:&lt;br /&gt;
 &lt;br /&gt;
 vzctl set 123 --ipadd x.x.x.x --save&lt;br /&gt;
&lt;br /&gt;
* You have to edit some files inside a VE. For example, virtual server does not have real ttys, so you have to disable getty in &amp;lt;code&amp;gt;/etc/inittab&amp;lt;/code&amp;gt; (i. e. &amp;lt;code&amp;gt;/vz/private/123/etc/inittab&amp;lt;/code&amp;gt;). Also, link &amp;lt;code&amp;gt;/etc/mtab&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;/proc/mounts&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
 sed -i -e '/getty/d' /vz/private/123/etc/inittab&lt;br /&gt;
 rm -f /vz/private/123/etc/mtab&lt;br /&gt;
 ln -s /proc/mounts /vz/private/123/etc/mtab &lt;br /&gt;
&lt;br /&gt;
'''Also check that:'''&lt;br /&gt;
 - fstab is empty ; fstab has to be empty.&lt;br /&gt;
 - /dev/ptymx exists&lt;br /&gt;
   if it does not exist, create with: &amp;lt;code&amp;gt;vzctl exec 123 mknod /dev/ptmx c 5 2&amp;lt;/code&amp;gt;&lt;br /&gt;
 - check if /dev/pts exists&lt;br /&gt;
    it's a dir, if it does not exist, create with &amp;lt;code&amp;gt;vzctl exec 123 mkdir /dev/pts&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
: There might be other adjustments needed. Please add if you have more info.&lt;br /&gt;
&lt;br /&gt;
* Try to start your new VE:&lt;br /&gt;
 &lt;br /&gt;
 vzctl start 123&lt;br /&gt;
&lt;br /&gt;
* If your node starts but you can not enter it, you should be able to execute commands in it.&lt;br /&gt;
 check if devpts is mounted.&lt;br /&gt;
 &amp;lt;code&amp;gt;vzctl exec 123 mount&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If it is not mounted, mount it &amp;lt;code&amp;gt;vzctl exec 123 mount -t devpts none /dev/pts&amp;lt;/code&amp;gt;&lt;br /&gt;
If it does not exist, please check above to create it correctly.&lt;br /&gt;
&lt;br /&gt;
: If anything goes wrong, try to find out why and fix. If you have enough Linux experience, it can be handled.&lt;br /&gt;
: Also check out IRC and please report back on this page.&lt;br /&gt;
&lt;br /&gt;
== Success Stories ==&lt;br /&gt;
- Debian 3.1 Sarge with MySQL, apache2, PowerDNS&lt;br /&gt;
--[[User:Stoffell|stoffell]] 08:41, 8 February 2007 (EST)&lt;br /&gt;
&lt;br /&gt;
[[Category:HOWTO]]&lt;/div&gt;</summary>
		<author><name>Stoffell</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.openvz.org/index.php?title=Physical_to_container&amp;diff=2731</id>
		<title>Physical to container</title>
		<link rel="alternate" type="text/html" href="https://wiki.openvz.org/index.php?title=Physical_to_container&amp;diff=2731"/>
		<updated>2007-02-08T13:41:26Z</updated>

		<summary type="html">&lt;p&gt;Stoffell: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A rough description of how to migrate existing physical server into a [[VE]].&lt;br /&gt;
&lt;br /&gt;
What you need to do in order to migrate is:&lt;br /&gt;
&lt;br /&gt;
* Prepare an “empty” VE. For OpenVZ this would mean the following (assume you choose VE ID of 123):&lt;br /&gt;
&lt;br /&gt;
 mkdir /vz/root/123 /vz/private/123&lt;br /&gt;
 cat /etc/vz/conf/ve-vps.basic.conf-sample &amp;gt; /etc/vz/conf/123.conf&lt;br /&gt;
&lt;br /&gt;
* Stop most services on a machine to be migrated. “Most” means services such as web server, databases and the like — so you will not loose your data. Just leave the bare minimum (including ssh).&lt;br /&gt;
&lt;br /&gt;
* Copy all your data from the machine to an OpenVZ box. Say you'll be using VE with ID of 123, then all the data should be placed to &amp;lt;code&amp;gt;/vz/private/123/&amp;lt;/code&amp;gt; directory (so there will be directories such as &amp;lt;code&amp;gt;/vz/private/123/bin&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;etc&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;var&amp;lt;/code&amp;gt; and so on). This could be done by scp or rsync.&lt;br /&gt;
&lt;br /&gt;
* Set some VE parameters. You have to add &amp;lt;code&amp;gt;OSTEMPLATE=xxx&amp;lt;/code&amp;gt; line to &amp;lt;code&amp;gt;/etc/vz/conf/123.conf&amp;lt;/code&amp;gt; file, where &amp;lt;code&amp;gt;xxx&amp;lt;/code&amp;gt; would be distribution name (like &amp;lt;code&amp;gt;debian-3.0&amp;lt;/code&amp;gt;) for vzctl to be able to make changes specific for this distribution.&lt;br /&gt;
&lt;br /&gt;
: Also, you have to supply an IP for a new VE:&lt;br /&gt;
 &lt;br /&gt;
 vzctl set 123 --ipadd x.x.x.x --save&lt;br /&gt;
&lt;br /&gt;
* You have to edit some files inside a VE. For example, virtual server does not have real ttys, so you have to disable getty in &amp;lt;code&amp;gt;/etc/inittab&amp;lt;/code&amp;gt; (i. e. &amp;lt;code&amp;gt;/vz/private/123/etc/inittab&amp;lt;/code&amp;gt;). Also, link &amp;lt;code&amp;gt;/etc/mtab&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;/proc/mounts&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
 sed -i -e '/getty/d' /vz/private/123/etc/inittab&lt;br /&gt;
 rm -f /vz/private/123/etc/mtab&lt;br /&gt;
 ln -s /proc/mounts /vz/private/123/etc/mtab &lt;br /&gt;
&lt;br /&gt;
'''Also check that:'''&lt;br /&gt;
 - fstab is empty ; fstab has to be empty.&lt;br /&gt;
 - /dev/ptymx exists&lt;br /&gt;
   if it does not exist, create with: &amp;lt;code&amp;gt;vzctl exec 123 mknod /dev/ptmx c 5 2&amp;lt;/code&amp;gt;&lt;br /&gt;
 - check if /dev/pts exists&lt;br /&gt;
    it's a dir, if it does not exist, create with &amp;lt;code&amp;gt;vzctl exec 123 mkdir /dev/pts&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
: There might be other adjustments needed. Please add if you have more info.&lt;br /&gt;
&lt;br /&gt;
* Try to start your new VE:&lt;br /&gt;
 &lt;br /&gt;
 vzctl start 123&lt;br /&gt;
&lt;br /&gt;
* If your node starts but you can not enter it, you should be able to execute commands in it.&lt;br /&gt;
 check if devpts is mounted.&lt;br /&gt;
 &amp;lt;code&amp;gt;vzctl exec 123 mount&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If not, mount it &amp;lt;code&amp;gt;vzctl exec 123 mount -t devpts none /dev/pts&amp;lt;/code&amp;gt;&lt;br /&gt;
If it does &amp;quot;not exist, please check above to create it correctly.&lt;br /&gt;
&lt;br /&gt;
: If anything goes wrong, try to find out why and fix. If you have enough Linux experience, it can be handled.&lt;br /&gt;
&lt;br /&gt;
== Success Stories ==&lt;br /&gt;
- Debian 3.1 Sarge with MySQL, apache2, PowerDNS&lt;br /&gt;
--[[User:Stoffell|stoffell]] 08:41, 8 February 2007 (EST)&lt;br /&gt;
&lt;br /&gt;
[[Category:HOWTO]]&lt;/div&gt;</summary>
		<author><name>Stoffell</name></author>
		
	</entry>
</feed>