[Users] how can i easily replicate a container?

Scott Dowdle dowdle at montanalinux.org
Fri Sep 7 11:14:04 EDT 2012


Rene,

----- Original Message -----
> Sometimes it's useful to replicate a container, for example for
> testing.  It seems very quick to make a snapshot using vzctl chkpnt,
> but is there a way to restore this as a new container?

I haven't worked with ploop-based containers so maybe it is different for them... but with a non-ploop container... to duplicate it... all you have to do is copy the container filesystem (preferably while it isn't running) and config... then edit the config to a make the new container unique... and then start the new container.  Each time a container is started, its settings in the config (hostname, ip address, disk quota, nameserver, etc) are injected into the filesystem and then it is started.

TYL,
-- 
Scott Dowdle
704 Church Street
Belgrade, MT 59714
(406)388-0827 [home]
(406)994-3931 [work]


More information about the Users mailing list