<?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=Ganesh</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=Ganesh"/>
	<link rel="alternate" type="text/html" href="https://wiki.openvz.org/Special:Contributions/Ganesh"/>
	<updated>2026-06-14T03:01:19Z</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=2413</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=2413"/>
		<updated>2006-10-18T05:59:34Z</updated>

		<summary type="html">&lt;p&gt;Ganesh: &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).&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;
: There might be other adjustments needed.&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 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;
[[Category:HOWTO]]&lt;/div&gt;</summary>
		<author><name>Ganesh</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.openvz.org/index.php?title=Physical_to_container&amp;diff=2408</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=2408"/>
		<updated>2006-10-13T11:01:56Z</updated>

		<summary type="html">&lt;p&gt;Ganesh: &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).&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 /etc/mtab&lt;br /&gt;
 ln -s /proc/mounts /vz/private/123/etc/mtab &lt;br /&gt;
&lt;br /&gt;
: There might be other adjustments needed.&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 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;
[[Category:HOWTO]]&lt;/div&gt;</summary>
		<author><name>Ganesh</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.openvz.org/index.php?title=Physical_to_container&amp;diff=2407</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=2407"/>
		<updated>2006-10-13T09:59:16Z</updated>

		<summary type="html">&lt;p&gt;Ganesh: &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).&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' /etc/inittab&lt;br /&gt;
 rm -f /etc/mtab&lt;br /&gt;
 ln -s /proc/mounts /etc/mtab &lt;br /&gt;
&lt;br /&gt;
: There might be other adjustments needed.&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 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;
[[Category:HOWTO]]&lt;/div&gt;</summary>
		<author><name>Ganesh</name></author>
		
	</entry>
</feed>