http://linux-vserver.org/api.php?action=feedcontributions&user=205.175.123.100&feedformat=atomLinux-VServer - User contributions [en]2024-03-28T10:43:08ZUser contributionsMediaWiki 1.20.2http://linux-vserver.org/util-vserver:Howto_virtualize_an_exisiting_Linux_serverutil-vserver:Howto virtualize an exisiting Linux server2007-12-05T22:13:26Z<p>205.175.123.100: /* 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 />
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>205.175.123.100