OpenVZ Forum


Home » General » Support » debian+networking
Re: debian+networking [message #266 is a reply to message #244] Thu, 20 October 2005 23:32 Go to previous messageGo to previous message
kir is currently offline  kir
Messages: 1645
Registered: August 2005
Location: Moscow, Russia
Senior Member

Nissan, if you going to try migrating existing running systems into VPSs you might not need any templates at all.

What you need to do in order to migrate is (routhly):
1. Prepare an 'empty' VPS. For OpenVZ this would mean the following (assume you chose VPS ID of 123):
mkdir /vz/root/123 /vz/private/123
cd /etc/sysconfig/vz-scripts
cat ve-vps.basic.conf-sample > 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'll be using VPS 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).

4. Set some VPS parameters. You have to add OSTEMPLATE=xxx line to /etc/sysconfig/vz-scripts/123.conf, where xxx would be distro name (like 'debian-3.0') for vzctl to be able to make changes specific for this distro.

Also, you have to supply an IP for a new VPS:
vzctl set 123 --ipadd x.x.x.x --save

5. You have to edit some files inside a VPS. For example, virtual server does not have real ttys, so you have to disable getty in /etc/inittab (/vz/private/123/etc/inittab). Also, link /etc/mtab to /proc/mounts. There might be other adjustments needed.

6. Try to start your new VPS:
vzctl start 123

If anything goes wrong, try to find out why and fix. If you have enough Linux experience, it can be handled.


Kir Kolyshkin
http://static.openvz.org/userbars/openvz-developer.png
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message icon4.gif
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: java problem
Next Topic: Specyfiing a mac address for vz interface
Goto Forum:
  


Current Time: Mon Jul 07 00:59:07 GMT 2025

Total time taken to generate the page: 0.03479 seconds