Re: [Vserver] Copy VServer

From: Lars Hallberg <>
Date: Wed 30 Nov 2005 - 17:51:44 GMT
Message-ID: <>

Xavier Montagutelli wrote:

>On Tuesday 29 November 2005 19:12, Lars Hallberg wrote:
>>I'm new to VServer and need a way copy vservers, in short term.
>>vserver-copy don't work no more and replacment is not done yet? This is
>>a small script to (on local host only) copy a vserver.
>>What I wonder before taking it further is.... Have I missed something
>[.. script ..]
>10 cents :
>1) copy the .pkg dir, usually /vservers/.pkg/$from, which has a link under
>/etc/vservers/<vserver>/apps/pkgmgmt/base . Used if you build vservers with
>"vserver vs build"
Don't seem to have one, might be becuse I use package management internal?

Don't know howe much difference this make, but I using Ubuntu 5.10 and
the debian tools. Built my original 'guest' with somthing like:

# newvserver -v --hostname testname --domain "" --ip IPADDRESS

>$copy $confdir/$from/apps/pkgmgmt/base/. $confdir/.defaults/vdirbase/.pkg/$to
>cd $confdir/$to/apps/pkgmgmt
>ln -fs $confdir/.defaults/vdirbase/.pkg/$to base
>2) modify name automatically to avoid errors ?
>echo $to > $confdir/$to/name
>echo $to > $confdir/$to/interfaces/0/name
>ed $confdir/$to/uts/nodename <<EOF
Is that name internal to the vserver level, or is it the 'running'
hostname. Trying to make this a 'clean' copy tool (and possably make a
separate conf tool to change hostname, ip etc). It shuld alowe copy,
posably including stoping and starting to make a 'safe' backup and
stoping the source system, copy and starting the target system to make a
clean migrate. Probably options --backup and --migrate respectivly.

As most of this is to be integrated with the vserver comand, it's realy
throw away code.... But I need it short term to let pretty newbe sysadm
move services around.

>3) modify IP automatically ?
>4) modify context number automatically (if you use static context numbers,
>which is preferred) ?
Don't think I do, possably I shuld... Wher can I read about pro and con?

Thanks /LaH

Vserver mailing list
Received on Wed Nov 30 17:51:54 2005

[Next/Previous Months] [Main vserver Project Homepage] [Howto Subscribe/Unsubscribe] [Paul Sladen's vserver stuff]
Generated on Wed 30 Nov 2005 - 17:52:01 GMT by hypermail 2.1.8