Changes

Jump to: navigation, search

Cloning ploop containers

212 bytes added, 01:18, 1 September 2015
fixed vz7 script; added a note on disk space
This describes a non-official and unsupported method of cloning ploop containers. It uses shared base ploop delta (this configuration is not officially supported but apparently works just fine).
This method lets you very quickly create thousands of identical containers, saving a lot of disk space as well. This might be useful for example in testing, but should not be used in production.
== Legacy OpenVZ ==
# Need to run <code>vzpkg</code> instead of <code>vztmpl-dl</code>
# Need to remove <code>VEID=</code> line from the "donor" config file
# Need to copy <code>.ve.layout</code> from the donor private area## Base delta name is <code>root.hds</code> not <code>root.hdd</code>
<source lang="bash">
for CT in $(seq 1000 2000); do \
mkdir -p /vz/private/$CT/root.hdd /vz/root/$CT; \
ln /vz/private/$SRCID/root.hdd/root.hdd hds /vz/private/$CT/root.hdd/root.hddhds; \
cp -nr /vz/private/$SRCID/root.hdd /vz/private/$CT/; \
cp /etc/vz/conf/$SRCID.conf /etc/vz/conf/$CT.conf; \
cp -a /vz/private/50/.ve.layout /vz/private/$CT/; \
done
 
vzctl set $SRCID --disabled yes --save # make sure we don't use it
</source>

Navigation menu