Bug 1291339 - [RFE] Add support for layered/composable images in virt-builder repos
Summary: [RFE] Add support for layered/composable images in virt-builder repos
Keywords:
Status: NEW
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libguestfs
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Richard W.M. Jones
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-12-14 15:41 UTC by David Caro
Modified: 2018-07-18 14:46 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description David Caro 2015-12-14 15:41:19 UTC
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:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Richard W.M. Jones 2016-01-04 11:55:34 UTC
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.