Re: debian+networking [message #266 is a reply to message #244] |
Thu, 20 October 2005 23:32   |
|
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
|
|
|