Editing Cloning ploop containers

Jump to: navigation, search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 1: Line 1:
 
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 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.
+
This method lets you very quickly create thousands of identical containers. This might be useful for example in testing.
  
 
== Legacy OpenVZ ==
 
== Legacy OpenVZ ==
Line 34: Line 34:
 
# Need to run <code>vzpkg</code> instead of <code>vztmpl-dl</code>
 
# 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 remove <code>VEID=</code> line from the "donor" config file
# Need to copy <code>.ve.layout</code> from the donor private area#
+
# 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">
 
<source lang="bash">
Line 53: Line 52:
 
for CT in $(seq 1000 2000); do \
 
for CT in $(seq 1000 2000); do \
 
       mkdir -p /vz/private/$CT/root.hdd /vz/root/$CT; \
 
       mkdir -p /vz/private/$CT/root.hdd /vz/root/$CT; \
       ln /vz/private/$SRCID/root.hdd/root.hds /vz/private/$CT/root.hdd/root.hds; \
+
       ln /vz/private/$SRCID/root.hdd/root.hdd /vz/private/$CT/root.hdd/root.hdd; \
 
       cp -nr /vz/private/$SRCID/root.hdd /vz/private/$CT/; \
 
       cp -nr /vz/private/$SRCID/root.hdd /vz/private/$CT/; \
 
       cp /etc/vz/conf/$SRCID.conf /etc/vz/conf/$CT.conf; \
 
       cp /etc/vz/conf/$SRCID.conf /etc/vz/conf/$CT.conf; \
 
       cp -a /vz/private/50/.ve.layout /vz/private/$CT/; \
 
       cp -a /vz/private/50/.ve.layout /vz/private/$CT/; \
 
done
 
done
 
vzctl set $SRCID --disabled yes --save # make sure we don't use it
 
 
</source>
 
</source>
 
[[Category: Storage]]
 

Please note that all contributions to OpenVZ Virtuozzo Containers Wiki may be edited, altered, or removed by other contributors. If you don't want your writing to be edited mercilessly, then don't submit it here.
If you are going to add external links to an article, read the External links policy first!

To edit this page, please answer the question that appears below (more info):

Cancel Editing help (opens in new window)