[Libguestfs] Can cloud images be added to 'virt-builder --list' ?

Richard W.M. Jones rjones at redhat.com
Sat Dec 9 22:00:31 UTC 2017


On Sat, Dec 09, 2017 at 11:23:26PM +0200, Yaniv Kaul wrote:
> They are quite thinner than regular EL7 images, and can be an excellent
> starting point to build images. How can one add them to the repo?

I think the easiest for us and likely for you too is not to try adding
them to the libguestfs.org/download/builder repo, but instead to ship
your own repository.

Provide an ‘index’ (or ‘index.asc’) file somewhere on a publib
webserver.  For examples see:

  http://download.opensuse.org/repositories/Virtualization:/virt-builder-images/images/index
  http://builder.libguestfs.org/index.asc

You will also need to create a GPG key to sign the index file.

Provide both the GPG *public* key and the location of the index file
to virt-builder, usually in the /etc/virt-builder/repos.d/ directory
or (for a single user) in $HOME/.config/virt-builder/repos.d/ in this
format:

$ cat /etc/virt-builder/repos.d/opensuse.conf 
[opensuse.org]
uri=http://download.opensuse.org/repositories/Virtualization:/virt-builder-images/images/index
gpgkey=file:///etc/virt-builder/repos.d/opensuse.gpg

If you want virt-builder upstream to ship your repo file and public
key then that's totally fine.  Submit a patch to add that to the
builder/ subdirectory, as opensuse has done (see
builder/opensuse.conf.in, builder/opensuse.gpg and there are some
small Makefile changes too).

On the other hand you may prefer to ship these files separately, but
then packaging that becomes your problem.  Having it in upstream
virt-builder will mean it is available to all users out of the box on
every Linux distro.

There are various tools now available to create and manage index
files, including virt-builder-repository (written by Cédric CC'd) and
virt-index-validate (written by myself and Pino also CC'd).

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-builder quickly builds VMs from scratch
http://libguestfs.org/virt-builder.1.html




More information about the Libguestfs mailing list