bootstrap-vz/bootstrapvz/plugins/minimize_size
Anders Ingemann 6ae859f886 Implement locale filter in minimize_size plugin
This filter is rather aggressive, since it also hooks into the
bootstrapping process itself to prevent debootstrap from unpacking
specific locale files
2015-12-13 19:41:16 +01:00
..
assets Implement locale filter in minimize_size plugin 2015-12-13 19:41:16 +01:00
__init__.py Implement locale filter in minimize_size plugin 2015-12-13 19:41:16 +01:00
manifest-schema.yml Implement some apt minimization stuff from docker 2015-12-13 19:41:16 +01:00
README.rst Implement some apt minimization stuff from docker 2015-12-13 19:41:16 +01:00
tasks.py Implement locale filter in minimize_size plugin 2015-12-13 19:41:16 +01:00

minimize size
-------------

This plugin can be used to reduce the size of the resulting image. Often
virtual volumes are much smaller than their reported size until any data
is written to them. During the bootstrapping process temporary data like
the aptitude cache is written to the volume only to be removed again.

The minimize size plugin employs various strategies to keep a low volume
footprint:

-  Mount folders from the host into key locations of the image volume to
   avoid any unneccesary disk writes.
-  Use `zerofree <http://intgat.tigress.co.uk/rmy/uml/index.html>`__ to
   deallocate unused sectors on the volume. On an unpartitioned volume
   this will be done for the entire volume, while it will only happen on
   the root partition for partitioned volumes.
-  Use
   `vmware-vdiskmanager <https://www.vmware.com/support/ws45/doc/disks_vdiskmanager_eg_ws.html>`__
   to shrink the real volume size (only applicable when using vmdk
   backing). The tool is part of the `VMWare
   Workstation <https://my.vmware.com/web/vmware/info/slug/desktop_end_user_computing/vmware_workstation/10_0>`__
   package.
-  Tell apt to only download specific language files. See the
   `apt.conf manpage <http://manpages.debian.org/cgi-bin/man.cgi?query=apt.conf>`__
   for more details ("Languages" in the "Acquire group" section).

Settings
~~~~~~~~

-  ``zerofree``: Specifies if it should mark unallocated blocks as
   zeroes, so the volume could be better shrunk after this.
   Valid values: true, false
   Default: false
   ``optional``
-  ``shrink``: Whether the volume should be shrunk. This setting works
   best in conjunction with the zerofree tool.
   Valid values: true, false
   Default: false
   ``optional``
-  ``apt_languages``: List of languages apt should download. Use ``[none]`` to
   not download any languages at all.
   ``optional``