http://linux-vserver.org/api.php?action=feedcontributions&user=86.120.6.76&feedformat=atomLinux-VServer - User contributions [en]2024-03-29T11:34:30ZUser contributionsMediaWiki 1.20.2http://linux-vserver.org/util-vserver:Howto_virtualize_an_exisiting_Linux_serverutil-vserver:Howto virtualize an exisiting Linux server2009-07-13T07:51:53Z<p>86.120.6.76: /* Virtualize CentOS4 */</p>
<hr />
<div>== Virtualize CentOS4 ==<br />
<br />
* Create a regular guest<br />
vserver yourguest build ...<br />
* Empty the just created guest<br />
rm -rf /vservers/yourguest/*<br />
* Copy your old server to the previous folder<br />
rsync -av --numeric-ids --progress --partial --exclude '/proc/*' yourguest:/ /vservers/yourguest/<br />
''Why yourguest:/ shouldn't that be / ?''<br />
Answer: You're now on the host server about to copy an existing installation on another hardware.<br />
<br />
guest on the host, not the guest.<br />
* Remove the fstab<br />
rm /vservers/yourguest/etc/fstab<br />
* Remove the services that makes troubles at start<br />
rm /vservers/yourguest/etc/rc.d/init.d/network<br />
rm /vservers/yourguest/etc/rc.d/init.d/.....<br />
''What are the troubled services? What is the minimal setup to make it work?''<br />
Answer: Any hardware related services will be troubled and should be removed.<br />
* Disable Pam authentification for ssh access<br />
edit /vservers/yourguest/etc/ssh/sshd_config -> (UsePAM no)<br />
replace # Listen with Listen yourguestip (this has to been done on the host too is your host ip)<br />
* Remove the useless modules<br />
rm /etc/modprobe.conf<br />
''Do you mean editing modprobe.conf? Why delete the file?''<br />
Answer: Probing modules make no sense in a virtual environment.<br />
* Start your vserver !<br />
vserver yourguest start</div>86.120.6.76http://linux-vserver.org/util-vserver:Howto_virtualize_an_exisiting_Linux_serverutil-vserver:Howto virtualize an exisiting Linux server2009-07-11T19:05:20Z<p>86.120.6.76: /* Virtualize CentOS4 */</p>
<hr />
<div>== Virtualize CentOS4 ==<br />
<br />
* Create a regular guest<br />
vserver yourguest build ...<br />
* Empty the just created guest<br />
rm -rf /vservers/yourguest/*<br />
* Copy your old server to the previous folder<br />
rsync -rv --progress --partial --exclude '/proc/*' yourguest:/ /vservers/yourguest/<br />
''Why yourguest:/ shouldn't that be / ?''<br />
Answer: You're now on the host server about to copy an existing installation on another hardware.<br />
''Would suggest "rsync -av --numeric-ids" instead of "rsync -rv" (preserves permissions, timestamps, ...)''<br />
guest on the host, not the guest.<br />
* Remove the fstab<br />
rm /vservers/yourguest/etc/fstab<br />
* Remove the services that makes troubles at start<br />
rm /vservers/yourguest/etc/rc.d/init.d/network<br />
rm /vservers/yourguest/etc/rc.d/init.d/.....<br />
''What are the troubled services? What is the minimal setup to make it work?''<br />
Answer: Any hardware related services will be troubled and should be removed.<br />
* Disable Pam authentification for ssh access<br />
edit /vservers/yourguest/etc/ssh/sshd_config -> (UsePAM no)<br />
replace # Listen with Listen yourguestip (this has to been done on the host too is your host ip)<br />
* Remove the useless modules<br />
rm /etc/modprobe.conf<br />
''Do you mean editing modprobe.conf? Why delete the file?''<br />
Answer: Probing modules make no sense in a virtual environment.<br />
* Start your vserver !<br />
vserver yourguest start</div>86.120.6.76