From: smagnuson_at_forzani.com
Date: Thu 12 May 2005 - 14:48:27 BST
I'm using Crux Linux (http://crux.nu/). This process works for me. I'm sure there are other ways.
* Duplicate existing vserver on same host
sudo vserver vcrux01 stop
sudo vserver vcrux02 build -m skeleton -n vcrux02 --context 200 --hostname vcrux02.domain.net --interface 172.27.12.40 --netdev eth0 --netmask 255.255.248.0 --initstyle plain
sudo touch /etc/vservers/vcrux01.conf
sudo vserver-copy vcrux01 vcrux02
* Check the configs over
cat /usr/local/etc/vservers/vcrux02/apps/init/style
plain
cat /usr/local/etc/vservers/vcrux02/interfaces/dev
eth0
cat /usr/local/etc/vservers/vcrux02/interfaces/mask
255.255.248.0
cat /usr/local/etc/vservers/vcrux02/interfaces/0/ip
172.27.12.40
cat /usr/local/etc/vservers/vcrux02/interfaces/0/name
c02
cat /usr/local/etc/vservers/vcrux02/uts/nodename
vcrux02.domain.net
cat /usr/local/etc/vservers/vcrux02/name
vcrux02
cat /usr/local/etc/vservers/vcrux02/fstab
none /proc proc defaults 0 0
none /tmp tmpfs size=16m,mode=1777 0 0
none /dev/pts devpts gid=5,mode=620 0 0
cat /usr/local/etc/vservers/crux02/context
200
sudo vi /vservers/vcrux02/etc/rc.conf
HOSTNAME=vcrux02
* Set up vserver barrier
sudo showattr -d /vservers/vcrux02
---bui- /vservers/vcrux02
sudo setattr --barrier /vservers/vcrux02
sudo showattr -d /vservers/vcrux02
---Bui- /vservers/vcrux02
* Start your new vserver
sudo /usr/local/lib/util-vserver/vprocunhide
sudo vserver-stat
CTX PROC VSZ RSS userTIME sysTIME UPTIME NAME
0 32 33.5M 3K 0m07s48 0m09s62 13h50m14 root server
sudo vserver vcrux01 start
sudo vserver vcrux02 start
sudo vserver-stat
CTX PROC VSZ RSS userTIME sysTIME UPTIME NAME
0 32 33.5M 3K 0m07s48 0m09s62 13h50m14 root server
100 4 7.4M 769 0m00s72 0m00s71 13h49m58 vcrux01
200 4 7.4M 769 0m00s83 0m00s93 13h55m46 vcrux02
* Enter newly created vserver and customize
sudo vserver vcrux02 enter
-----Original Message-----
From: vserver-bounces_at_list.linux-vserver.org
[mailto:vserver-bounces_at_list.linux-vserver.org]On Behalf Of Gilles
Sent: Wednesday, May 11, 2005 10:11 AM
To: vserver_at_list.linux-vserver.org
Subject: [Vserver] Official copy method?
Hello.
What is the recommended method for cloning a vserver,
changing on the fly what has to be changed (e.g. name,
interface, context, etc.)?
"vserver-copy" seems to deal only with the old config
layout.
Which are all the file names/contents that must be
modified when copying a vserver?
Could the people, who already have a script to do the
job, please post it to the list?
Is there a project to provide an "official" clone/copy
method?
A good starting point (?) would be the ability to retrieve
the config from several data sources, i.e. not only from
the current layout as a directory tree, but also, e.g.
from a relational or ldap database.
Thanks and best regards,
Gilles
_______________________________________________
Vserver mailing list
Vserver_at_list.linux-vserver.org
http://list.linux-vserver.org/mailman/listinfo/vserver
_______________________________________________
Vserver mailing list
Vserver_at_list.linux-vserver.org
http://list.linux-vserver.org/mailman/listinfo/vserver