[Vserver] Transparently Creating Multiple Instances of Vservers Using COW?

From: EKC <webmaster_at_generalsynthesis.com>
Date: Sat 03 Jun 2006 - 02:20:08 BST
Message-ID: <355a4e960606021820n69a82c89k81f16e04e65dae09@mail.gmail.com>

Hello,

Given a running vserver <parent_vserver>, I would like to create
multiple <child_vserver> instances of the running parent vserver as
quickly as possible.

Currently, I am doing this by:
==Creating the parent vserver:==
1) Building the <parent_vserver> from scratch using: 'vserver
parent_vserver debootstrap...'
2) Running 'vserver parent_vserver hashify'
==Stopping The Parent vserver==
1) vserver parent_vserver stop
==Creating an instance of the parent:==
1) vserver child_vserver build -m skeleton --interface eth0:192.168.1.2
2) rm -rf /vservers/child_vserver/*
3) vcopy --manually -v /vservers/child_vserver ' ' /vservers/parent_vserver ' '
4) vserver child_vserver hashify
5) vserver child_vserver start
==Restarting the parent_vserver:==
1) vserver parent_vserver start

Question: This procedure is _very_ slow to execute (on the order of
minutes); is there a faster way to do this? Also, can a copy and
hashify a running vserver without stopping it first?

Specifically: I want to use the COW feature of linux-vserver to create
copies of vservers. Ideally, I would create a copy by creating a hard
link to the parent_vserver and passing the hard link to 'vserver
<hard_link_to_parent_vserver> start'. How would I go about doing this?
This would allow me to clone vservers almost instantly. COW would take
care of copying files from the hashified parent vserver to the child
vserver when the child vserver reads/writes/renames/chmods/chowns a
file.

I'm really hoping there's a way to do this.

Thanks for vserver! And thanks in advance for your help.

EKC
_______________________________________________
Vserver mailing list
Vserver@list.linux-vserver.org
http://list.linux-vserver.org/mailman/listinfo/vserver
Received on Sat Jun 3 02:20:34 2006

[Next/Previous Months] [Main vserver Project Homepage] [Howto Subscribe/Unsubscribe] [Paul Sladen's vserver stuff]
Generated on Sat 03 Jun 2006 - 02:20:38 BST by hypermail 2.1.8