<?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=87.194.177.60</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=87.194.177.60"/>
	<link rel="alternate" type="text/html" href="https://wiki.openvz.org/Special:Contributions/87.194.177.60"/>
	<updated>2026-04-19T14:18:25Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.31.1</generator>
	<entry>
		<id>https://wiki.openvz.org/index.php?title=Talk:Physical_to_container&amp;diff=8304</id>
		<title>Talk:Physical to container</title>
		<link rel="alternate" type="text/html" href="https://wiki.openvz.org/index.php?title=Talk:Physical_to_container&amp;diff=8304"/>
		<updated>2010-03-11T16:43:31Z</updated>

		<summary type="html">&lt;p&gt;87.194.177.60: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== RSync Command ==&lt;br /&gt;
Please check the following command,  Ive used with success:&lt;br /&gt;
 rsync -arvpz --numeric-ids --exclude dev --exclude proc --exclude tmp --exclude mnt --exclude sys -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;
== Migration Script ==&lt;br /&gt;
&lt;br /&gt;
I composed a little Script to migrate a Debian Sarge Box to OpenVZ. (Some System specific steps have been removed)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/bin/sh&lt;br /&gt;
echo &amp;quot;Stopping VE 300...&amp;quot;&lt;br /&gt;
vzctl stop 300&lt;br /&gt;
echo &amp;quot;Creating base filesystem /dev /proc ...&amp;quot;&lt;br /&gt;
mknod /vz/private/300/dev/ptmx c 5 2&lt;br /&gt;
mkdir /vz/private/300/dev/pts&lt;br /&gt;
rm -f /vz/private/300/dev/null&lt;br /&gt;
mknod /vz/private/300/dev/null c 1 3&lt;br /&gt;
chmod o+rw /vz/private/300/dev/null&lt;br /&gt;
echo &amp;quot;Copy the tty's to VE and Set Permissions&amp;quot;&lt;br /&gt;
cp -r /dev/ttyp* /dev/ptyp* /vz/private/300/dev/&lt;br /&gt;
chmod o+wx /vz/private/300/dev/*typ*&lt;br /&gt;
echo &amp;quot;Creating /dev/random and Set Permissions&amp;quot;&lt;br /&gt;
mknod -m 644 /vz/private/300/dev/random c 1 8&lt;br /&gt;
mknod -m 644 /vz/private/300/dev/urandom c 1 9&lt;br /&gt;
chown root:root /vz/private/300/dev/random /vz/private/300/dev/urandom&lt;br /&gt;
echo &amp;quot;clearing mtab / fstab...&amp;quot;&lt;br /&gt;
echo -n &amp;gt; /vz/private/300/etc/fstab&lt;br /&gt;
rm /vz/private/300/etc/mtab&lt;br /&gt;
ln -s /proc/mounts /vz/private/300/etc/mtab&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Use Dummy ==&lt;br /&gt;
&lt;br /&gt;
Having been completely clueless about Openvz three days ago I first created a dummy container based on the same distribution I wanted to migrate. This helped me greatly to understand what was needed and also allowed to use the dummy as a template for /dev and the conf file. Disregarding the time to setup the host system the actual migration from the physical machine with tar ball took me two hours and the migrated container started up on second attempt after first complaining about disk size. I increased that and it runs. I am very impressed by the ease of it all.&lt;br /&gt;
&lt;br /&gt;
== /proc in fstab ==&lt;br /&gt;
&lt;br /&gt;
Often it is ''wise'' to keep proc mount in fstab, if the OS doesn't make it by itself. --[[User:Grin|Grin]] 11:49, 9 December 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
: Thanks for noting this! I have modified the page accordingly, please check --[[User:Kir|Kir]] 11:56, 9 December 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
:: Seems fine, thanks, Kir. --[[User:Grin|Grin]] 20:22, 9 December 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
== rsync before taking everything down ==&lt;br /&gt;
&lt;br /&gt;
You might want to mention that it's possible to run the rsync command for copying data while the physical server is still operating normally (i.e. before you shut down its services), which will allow you to transfer most of the data before shutting down everything. If you then run rsync for a second time once everything has shut down, it will only need to transfer anything that was changed since the last rsync run, reducing the amount of downtime required.&lt;/div&gt;</summary>
		<author><name>87.194.177.60</name></author>
		
	</entry>
</feed>