Bug 1291339 - [RFE] Add support for layered/composable images in virt-builder repos
[RFE] Add support for layered/composable images in virt-builder repos
Status: NEW
Product: Virtualization Tools
Classification: Community
Component: libguestfs (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Richard W.M. Jones
Depends On:
  Show dependency treegraph
Reported: 2015-12-14 10:41 EST by David Caro
Modified: 2016-06-26 19:52 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description David Caro 2015-12-14 10:41:19 EST
Description of problem:
I'm running my own virt-builder repo, and I want to be able to host there just the diffs for my custom images based on the images from libguestfs (or from my own base images), and let virt-builder just pull the big base image once and just the small diffs for any other images based on that one.

For example, I have two centos-6 templates that were created with virt-builder and virt-sysprep, one with some packages installed and another with another set of packages, and I'm publishing them on my own virt-builder repo, so when I run virt-builder to create images based on my custom templates, it has to pull the full templates  twice, when if I could be using disk snapshots with the diffs, it would only be pulling the base disk once, and then two small diffs with the specific changed for each.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:

Actual results:

Expected results:

Additional info:
Comment 1 Richard W.M. Jones 2016-01-04 06:55:34 EST
I wonder what the size savings are here.  Most virt-builder
templates -- containing just @core packages -- are around 200-300 MB
(sparsified and xz compressed).

I prepared two new templates containing inkscape (a typical
graphical application) and gcc+gdb (a typical non-graphical
development toolsuite) with a common base:

$ virt-builder fedora-23
$ qemu-img create -f qcow2 -b fedora-23.img gcc+gdb.qcow2
$ qemu-img create -f qcow2 -b fedora-23.img inkscape.qcow2
$ virt-customize -a gcc+gdb.qcow2 --install gcc,gdb
$ virt-customize -a inkscape.qcow2 --install inkscape

After xz-compressing the output, the sizes of these overlay
templates are:

188M	gcc+gdb.qcow2.xz
265M	inkscape.qcow2.xz

Note that to download the above would involve downloading the base
template (cached, so only once), which is 248 MB so:

188M + 248M = 436M   gcc+gdb
265M + 248M = 513M   inkscape

Now I prepared templates without backing files:

$ virt-builder fedora-23 --install gcc,gdb --output gcc+gdb.raw
$ virt-builder fedora-23 --install inkscape --output inkscape.raw

After xz-compressing the output, the sizes of these self-contained
templates are:

393M	gcc+gdb.raw.xz
462M	inkscape.raw.xz

Note You need to log in before you can comment on or make changes to this bug.