Difference between revisions of "util-vserver:Howto virtualize an exisiting Linux server"

From Linux-VServer

Jump to: navigation, search
 
(Virtualize CentOS4 (or other distros?))
Line 7: Line 7:
 
* Copy your old server to the previous folder
 
* Copy your old server to the previous folder
 
  rsync -rv --progress --partial yourguest:/  /vservers/yourguest/
 
  rsync -rv --progress --partial yourguest:/  /vservers/yourguest/
 +
''Why yourguest:/ shouldn't that be / ?''
 
* Remove the fstab
 
* Remove the fstab
 
  rm /vservers/yourguest/etc/fstab
 
  rm /vservers/yourguest/etc/fstab
Line 12: Line 13:
 
  rm /vservers/yourguest/etc/rc.d/init.d/network
 
  rm /vservers/yourguest/etc/rc.d/init.d/network
 
  rm /vservers/yourguest/etc/rc.d/init.d/.....
 
  rm /vservers/yourguest/etc/rc.d/init.d/.....
 +
''What are the troubled services? What is the minimal setup to make it work?''
 
* Disable Pam authentification for ssh access
 
* Disable Pam authentification for ssh access
 
  edit /vservers/yourguest/etc/ssh/sshd_config  ->  (UsePAM no)
 
  edit /vservers/yourguest/etc/ssh/sshd_config  ->  (UsePAM no)
Line 17: Line 19:
 
* Remove the useless modules
 
* Remove the useless modules
 
  rm /etc/modprobe.conf
 
  rm /etc/modprobe.conf
 +
''Do you mean editing modprobe.conf? Why delete the file?''
 
* Start your vserver !
 
* Start your vserver !
 
  vserver yourguest start
 
  vserver yourguest start

Revision as of 10:04, 13 June 2007

Virtualize CentOS4

  • 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/
Why yourguest:/ shouldn't that be / ?
  • 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/.....
What are the troubled services? What is the minimal setup to make it work?
  • 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
Do you mean editing modprobe.conf? Why delete the file?
  • Start your vserver !
vserver yourguest start
Personal tools