Util-vserver:Howto virtualize an exisiting Linux server: Difference between revisions

From Linix VServer
Jump to navigationJump to search
No edit summary
(Restored content from Wayback Machine)
 
(12 intermediate revisions by 6 users not shown)
Line 1: Line 1:
<div id="content">
<span id="top"></span>
<span id="util-vserverhowto-virtualize-an-exisiting-linux-server"></span>
= util-vserver:Howto virtualize an exisiting Linux server =
<div id="bodyContent">
<span id="siteSub"></span>
=== From Linux-VServer ===
<div id="contentSub">
</div>
<div id="jump-to-nav">
Jump to: [[#column-one|navigation]], [[#searchInput|search]]
</div>
<div class="editsection" style="float:right;margin-left:5px;">
[<nowiki/>[[index.php?title=util-vserver:Howto_virtualize_an_exisiting_Linux_server&action=edit&section=1|edit]]]
</div>
<span id="Virtualize_CentOS4"></span>
<span id="virtualize-centos4"></span>
== Virtualize CentOS4 ==
== Virtualize CentOS4 ==


* Create a regular guest
* Create a regular guest
vserver yourguest build ...
 
<pre>vserver yourguest build ...</pre>
* Empty the just created guest
* Empty the just created guest
rm -rf /vservers/yourguest/*
 
<pre>rm -rf /vservers/yourguest/*</pre>
* Copy your old server to the previous folder
* Copy your old server to the previous folder
rsync -rv --progress --partial yourguest:/  /vservers/yourguest/
 
''Why yourguest:/ shouldn't that be / ?''
<pre>rsync -rv --progress --partial yourguest:/  /vservers/yourguest/</pre>
Answer: You're now on the host server about to copy an existing installation on another hardware.
guest on the host, not the guest.
* Remove the fstab
* Remove the fstab
rm /vservers/yourguest/etc/fstab
 
<pre>rm /vservers/yourguest/etc/fstab</pre>
* Remove the services that makes troubles at start
* Remove the services that makes troubles at start
rm /vservers/yourguest/etc/rc.d/init.d/network
 
rm /vservers/yourguest/etc/rc.d/init.d/.....
<pre>rm /vservers/yourguest/etc/rc.d/init.d/network
''What are the troubled services? What is the minimal setup to make it work?''
rm /vservers/yourguest/etc/rc.d/init.d/.....</pre>
* Disable Pam authentification for ssh access
* Disable Pam authentification for ssh access
edit /vservers/yourguest/etc/ssh/sshd_config  -> (UsePAM no)
 
replace # Listen with Listen yourguestip (this has to been done on the host too is your host ip)
<pre>edit /vservers/yourguest/etc/ssh/sshd_config  -&gt; (UsePAM no)
replace # Listen with Listen yourguestip (this has to been done on the host too is your host ip)</pre>
* Remove the useless modules
* Remove the useless modules
rm /etc/modprobe.conf
 
''Do you mean editing modprobe.conf? Why delete the file?''
<pre>rm /etc/modprobe.conf</pre>
* Start your vserver !
* Start your vserver !
vserver yourguest start
 
<pre>vserver yourguest start</pre>
<div class="printfooter">
 
Retrieved from &quot;http://wiki.linux-vserver.org/util-vserver:Howto_virtualize_an_exisiting_Linux_server&quot;
 
</div>
<div class="visualClear">
 
 
 
</div>
 
</div>
 
</div>

Latest revision as of 00:49, 11 November 2025

util-vserver:Howto virtualize an exisiting Linux server[edit]

From Linux-VServer[edit]


Jump to: navigation, search

[edit]

Virtualize CentOS4[edit]

  • Create a regular guest
vserver yourguest build ...
  • Empty the just created guest
rm -rf /vservers/yourguest/*
  • Copy your old server to the previous folder
rsync -rv --progress --partial yourguest:/  /vservers/yourguest/
  • Remove the fstab
rm /vservers/yourguest/etc/fstab
  • Remove the services that makes troubles at start
rm /vservers/yourguest/etc/rc.d/init.d/network
rm /vservers/yourguest/etc/rc.d/init.d/.....
  • Disable Pam authentification for ssh access
edit /vservers/yourguest/etc/ssh/sshd_config  ->  (UsePAM no)
replace # Listen with Listen yourguestip (this has to been done on the host too is your host ip)
  • Remove the useless modules
rm /etc/modprobe.conf
  • Start your vserver !
vserver yourguest start