http://wiki.linux-vserver.org/index.php?title=Migrating_from_OpenVZ_to_Linux-Vserver&feed=atom&action=historyMigrating from OpenVZ to Linux-Vserver - Revision history2024-03-29T10:15:46ZRevision history for this page on the wikiMediaWiki 1.20.2http://wiki.linux-vserver.org/index.php?title=Migrating_from_OpenVZ_to_Linux-Vserver&diff=5033&oldid=prevGlenn: catchg2011-10-21T21:22:15Z<p>catchg</p>
<table class='diff diff-contentalign-left'>
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr style='vertical-align: top;'>
<td colspan='2' style="background-color: white; color:black;">← Older revision</td>
<td colspan='2' style="background-color: white; color:black;">Revision as of 21:22, 21 October 2011</td>
</tr><tr><td colspan="2" class="diff-lineno">Line 66:</td>
<td colspan="2" class="diff-lineno">Line 66:</td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>Welcome back!</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>Welcome back!</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div>[[Category:<del class="diffchange diffchange-inline">Documentation</del>]]</div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div>[[Category:<ins class="diffchange diffchange-inline">Migration</ins>]]</div></td></tr>
</table>Glennhttp://wiki.linux-vserver.org/index.php?title=Migrating_from_OpenVZ_to_Linux-Vserver&diff=4880&oldid=prevGlenn: +cat2011-10-21T19:19:31Z<p>+cat</p>
<table class='diff diff-contentalign-left'>
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr style='vertical-align: top;'>
<td colspan='2' style="background-color: white; color:black;">← Older revision</td>
<td colspan='2' style="background-color: white; color:black;">Revision as of 19:19, 21 October 2011</td>
</tr><tr><td colspan="2" class="diff-lineno">Line 65:</td>
<td colspan="2" class="diff-lineno">Line 65:</td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>Welcome back!</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>Welcome back!</div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;">[[Category:Documentation]]</ins></div></td></tr>
</table>Glennhttp://wiki.linux-vserver.org/index.php?title=Migrating_from_OpenVZ_to_Linux-Vserver&diff=3223&oldid=prevFluor: quick transcript of an openvz to linux-vserver migration2008-08-12T13:19:01Z<p>quick transcript of an openvz to linux-vserver migration</p>
<p><b>New page</b></p><div>So, you've repeatedely heard that [http://openvz.org/ OpenVZ] was hip, better than [http://linux-vserver.org/ Linux-Vserver] even, and thought you'd give it a try? So did we! However, you weren't as pleased as you were supposed to be, and kept thinking back about how Linux-Vserver was cool for you? Well, if that's your case too, here's how we moved back to Linux-Vserver in a few simple keystrokes.<br />
<br />
== System info ==<br />
<br />
=== Kernels ===<br />
<br />
We are running [http://debian.org/ Debian GNU/Linux], in its testing flavour (pre-release Lenny, frozen package base). For OpenVZ, we were using [http://packages.debian.org/sid/linux-image-2.6.26-1-openvz-686 Debian kernel 2.6.26 with OpenVZ patches]. For Linux-Vserver, we are using [http://packages.debian.org/lenny/linux-image-2.6.25-2-vserver-686 Debian kernel 2.6.25 with Linux-Vserver patches].<br />
<br />
=== Paths ===<br />
<br />
We created our OpenVZ CTs under ''/srv/vps/$VEID/{private,root}/'', and our vservers under ''/srv/vservers/''.<br />
<br />
== Migrating ==<br />
<br />
=== Copying data ===<br />
<br />
After rebooting under the -vserver kernel, here's how we migrated each VPS, using the 'rsync method':<br />
<br />
<pre><br />
[sudo] vserver $vname build -m rsync \<br />
--hostname $vhostname \<br />
--interface $interface:$ip \<br />
--context $ctx -- \<br />
--source /srv/vps/$veid/private/ -o -va<br />
</pre><br />
<br />
So, for migrating an OpenVZ CT named [http://en.wikipedia.org/wiki/Seitan 'seitan'] using '192.168.66.6' on 'eth0', in context '666', the command would look like:<br />
<br />
<pre><br />
sudo vserver seitan build -m rsync \<br />
--hostname seitan \ <br />
--interface eth0:192.168.66.6/24 \<br />
--context 666 -- \<br />
--source /srv/vps/seitan/private/ -o -va<br />
</pre><br />
<br />
Note the trailing ''-o -va'', which allows us to follow rsync as it goes.<br />
<br />
=== Fix daemons ===<br />
<br />
When rsync is done, we can't start our vservers yet, because some of the system daemons that OpenVZ allows are not compatible with a Vserver environment. Let's remove their startup links, then!<br />
<br />
To do so, let's chroot into our freshly migrated vserver:<br />
<br />
<pre>sudo chroot /srv/vservers/seitan/</pre><br />
<br />
Once inside, let's unlink all the undesired daemons:<br />
<br />
<pre><br />
for undesired in klogd hwclock.sh setserial urandom networking umountfs halt reboot ; <br />
do update-rc.d -f $undesired remove ;<br />
done<br />
</pre><br />
<br />
=== Enjoy ===<br />
<br />
Let's log out of the chroot, and start our vserver!<br />
<br />
<pre><br />
exit<br />
sudo vserver seitan start<br />
</pre><br />
<br />
It should work fine, provided some of your daemons don't depend upon bind mounts from host, which then need to be integrated into the fstab for each of your vservers.<br />
<br />
Welcome back!</div>Fluor