Go Back   Cloud Computing > Support > vps hosting
 

Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 05-24-11, 01:06
BOD Member
 
Join Date: Dec 2010
Posts: 170
Default How Migrate physical server into Virtual Private server(VPS)?

Please help me with your suggestion.
Reply With Quote
  #2 (permalink)  
Old 05-24-11, 02:19
BOD Member
 
Join Date: Nov 2010
Posts: 277
Default

You will have to follow the following steps :

1. Prepare an “empty” VPS Hosting. For OpenVZ which mean the following (assume you choose VE ID of 123):
Quote:
mkdir /vz/root/123 /vz/private/123
cat /etc/vz/conf/ve-VPS Hosting.basic.conf-sample > /etc/vz/conf/123.conf
2. Stop most services on a machine to be migrated. “Most” means services such as web server, databases and the like — so you will not loose your data. Just leave the bare minimum (including ssh).

3. Copy all your data from the machine to an OpenVZ box. Say you will be utilizing VE with ID of 123, then all the data should be placed to /vz/private/123/ directory (so there will be directories such as /vz/private/123/bin, etc, var and so on). This could be done by scp or rsync.

4. Set some VE parameters. You have to add OSTEMPLATE=xxx line to /etc/vz/conf/123.conf file, where xxx would be distribution name (like debian-3.0) for vzctl to be capable to make changes specific for this distribution.

Also, you have to supply an IP for a new VE:
Quote:
vzctl set 123 --ipadd x.x.x.x --save
5. You have to edit some files inside a VE. For example, virtual server doesn't have real ttys, so you have to disable getty in /etc/inittab (i. e. /vz/private/123/etc/inittab). Also, link /etc/mtab to /proc/mounts.
Quote:
sed -i -e '/getty/d' /vz/private/123/etc/inittab
rm -f /vz/private/123/etc/mtab
ln -s /proc/mounts /vz/private/123/etc/mtab
There might be other adjustments needed.

6. Try to start your new VE:
Quote:
vzctl start 123
Reply With Quote
  #3 (permalink)  
Old 05-24-11, 03:30
BOD Member
 
Join Date: Apr 2011
Posts: 82
Default

Well all the steps you mentioned are for OpenVZ, but I have several virtual machines where I am using Xen HVM and Linux KVM based virtualization platform. So let me know whether these guidelines are compatible with other virtualization platforms or not?
Reply With Quote
  #4 (permalink)  
Old 05-24-11, 03:40
BOD Member
 
Join Date: Dec 2010
Posts: 142
Default

Quote:
Originally Posted by debasri View Post
You will have to follow the following steps :

1. Prepare an “empty” VPS Hosting. For OpenVZ which mean the following (assume you choose VE ID of 123):


2. Stop most services on a machine to be migrated. “Most” means services such as web server, databases and the like — so you will not loose your data. Just leave the bare minimum (including ssh).

3. Copy all your data from the machine to an OpenVZ box. Say you will be utilizing VE with ID of 123, then all the data should be placed to /vz/private/123/ directory (so there will be directories such as /vz/private/123/bin, etc, var and so on). This could be done by scp or rsync.

4. Set some VE parameters. You have to add OSTEMPLATE=xxx line to /etc/vz/conf/123.conf file, where xxx would be distribution name (like debian-3.0) for vzctl to be capable to make changes specific for this distribution.

Also, you have to supply an IP for a new VE:


5. You have to edit some files inside a VE. For example, virtual server doesn't have real ttys, so you have to disable getty in /etc/inittab (i. e. /vz/private/123/etc/inittab). Also, link /etc/mtab to /proc/mounts.

There might be other adjustments needed.

6. Try to start your new VE:
If it shows any error then what can I do?
Reply With Quote
  #5 (permalink)  
Old 05-24-11, 04:07
Moderator
 
Join Date: Nov 2010
Posts: 476
Default

Normally it completes but if it shows any error then we will have to manually solve it.
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump


All times are GMT -6. The time now is 00:32.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
Copyright 1999-2012, BODHost Ltd. All rights reserved.