Bug 1028676

Summary: Add virt-builder to RHEL 7.1
Product: Red Hat Enterprise Linux 7 Reporter: Richard W.M. Jones <rjones>
Component: libguestfsAssignee: Richard W.M. Jones <rjones>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.0CC: leiwang, ptoscano, riehecky, rsawhill, yuliu
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: libguestfs-1.27.56-1.1.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-03-05 13:43:03 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1021149, 1099976    
Bug Blocks: 1082754    

Description Richard W.M. Jones 2013-11-09 11:55:45 UTC
Description of problem:

Virt-builder is a tool for quickly customizing cloud images
of various operating systems.  For example you can do:

  virt-builder fedora-19 --format qcow2 --size 20G --install @XFCE

and get a custom Fedora 19 image with plenty of disk space and
XFCE desktop installed.

If everything is cached, the process takes between 30 seconds and
a couple of minutes.

Note this is different from Oz (it doesn't do a full install)
and different from livecd-tools (it doesn't make installers).
It is more similar to doing virt-resize + virt-sysprep.

Virt-builder is a new feature which was added in libguestfs 1.24.
Adding it to RHEL 7.1 (rebase: bug 1021149) is trivial.

However if we were just to add it, then it would offer a less-than-ideal
choice of images to install:

  $ virt-builder -l
  centos-6                 CentOS 6.4
  debian-6                 Debian 6 (Squeeze)
  debian-7                 Debian 7 (Wheezy)
  fedora-18                Fedora® 18
  fedora-19                Fedora® 19
  scientificlinux-6        Scientific Linux 6.4
  ubuntu-10.04             Ubuntu 10.04 (Lucid)
  ubuntu-12.04             Ubuntu 12.04 (Precise)
  ubuntu-13.10             Ubuntu 13.10 (Saucy)

So the real issue is not how to add it, but how and where to
host RHEL cloud images, and possibly how to make sure these
cloud images attach automatically to RHN for updates etc.

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

libguestfs 1.24
libguestfs 1.25 contains several new features which are
candidates for backporting.

Additional info:

A thread explaining how to try out virt-builder now:
http://post-office.corp.redhat.com/archives/rhos-tech/2013-November/msg00086.html

It's possible we could use this in RHOS instead of the fundamentally
insecure disk-image-builder tool.  See the thread starting here:
http://post-office.corp.redhat.com/archives/rhos-tech/2013-November/thread.html#00097

I have built a collection of RHEL cloud images internally.
To use them, do:
export VIRT_BUILDER_SOURCE=http://file.rdu.redhat.com/~rjones/builder/index.asc
and then run virt-builder as normal, eg:

$ virt-builder -l
rhel-6.1                 Red Hat Enterprise Linux 6.1
rhel-6.2                 Red Hat Enterprise Linux 6.2
rhel-6.3                 Red Hat Enterprise Linux 6.3
rhel-6.4                 Red Hat Enterprise Linux 6.4

Note that these don't use RHN.  Their yum configuration
points directly at http://download.devel.redhat.com/released/
Adding RHN support to virt-builder is TBD.

Comment 5 yuliu 2014-11-10 09:01:16 UTC
version : libguestfs-1.28.1-1.9.el7.x86_64

# virt-builder
virt-builder: virt-builder os-version
Missing 'os-version'. Use '--list' to list available template names.
#

virt-builder installed.

Comment 7 errata-xmlrpc 2015-03-05 13:43:03 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2015-0303.html