.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Podwrapper::Man 1.52.2 (Pod::Simple 3.45) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "virt-builder-repository 1" .TH virt-builder-repository 1 2024-10-13 guestfs-tools-1.52.2 "Virtualization Support" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME virt\-builder\-repository \- Build virt\-builder source repository easily .SH SYNOPSIS .IX Header "SYNOPSIS" .Vb 2 \& virt\-builder\-repository /path/to/repository \& [\-i|\-\-interactive] [\-\-gpg\-key KEYID] .Ve .SH DESCRIPTION .IX Header "DESCRIPTION" Virt-builder is a tool for quickly building new virtual machines. It can be configured to use template repositories. However creating and maintaining a repository involves many tasks which can be automated. virt-builder-repository is a tool helping to manage these repositories. .PP Virt-builder-repository loops over the files in the directory specified as argument, compresses the files with a name ending by \f(CW\*(C`qcow2\*(C'\fR, \f(CW\*(C`raw\*(C'\fR, \&\f(CW\*(C`img\*(C'\fR or without extension, extracts data from them and creates or updates the \f(CW\*(C`index\*(C'\fR file. .PP Some of the image-related data needed for the index file can’t be computed from the image file. virt-builder-repository first tries to find them in the existing index file. If data are still missing after this, they are prompted in interactive mode, otherwise an error will be triggered. .PP If a \f(CW\*(C`KEYID\*(C'\fR is provided, the generated index file will be signed with this GPG key. .SH EXAMPLES .IX Header "EXAMPLES" .SS "Create the initial repository" .IX Subsection "Create the initial repository" Create a folder and copy the disk image template files in it. Then run a command like the following one: .PP .Vb 1 \& virt\-builder\-repository \-\-gpg\-key "joe@hacker.org" \-i /path/to/folder .Ve .PP Note that this example command runs in interactive mode. To run in automated mode, a minimal index file needs to be created before running the command containing sections like this one: .PP .Vb 2 \& [template_id] \& file=template_filename.qcow.xz .Ve .PP The file value needs to match the image name extended with the \f(CW\*(C`.xz\*(C'\fR suffix if the \fI\-\-no\-compression\fR parameter is not provided or the image name if no compression is involved. Other optional data can be prefilled. Default values are computed by inspecting the disk image. For more informations, see "Creating and signing the index file" in \fBvirt\-builder\fR\|(1). .SS "Update images in an existing repository" .IX Subsection "Update images in an existing repository" In this use case, a new image or a new revision of an existing image needs to be added to the repository. Place the corresponding image template files in the repository folder. .PP To update the revision of an image, the file needs to have the same name than the existing one (without the \f(CW\*(C`xz\*(C'\fR extension). .PP As in the repository creation use case, a minimal fragment can be added to the index file for the automated mode. This can be done on the signed index even if it may sound a strange idea: the index will be signed again by the tool. .PP To remove an image from the repository, just remove the corresponding image file before running virt-builder-repository. .PP Then running the following command will complete and update the index file: .PP .Vb 1 \& virt\-builder\-repository \-\-gpg\-key "joe@hacker.org" \-i /path/to/folder .Ve .PP virt-builder-repository works in a temporary folder inside the repository one. If anything wrong happens when running the tool, the repository is left untouched. .SH OPTIONS .IX Header "OPTIONS" .IP \fB\-\-help\fR 4 .IX Item "--help" Display help. .IP "\fB\-\-gpg\fR GPG" 4 .IX Item "--gpg GPG" Specify an alternate \fBgpg\fR\|(1) (GNU Privacy Guard) binary. You can also use this to add gpg parameters, for example to specify an alternate home directory: .Sp .Vb 1 \& virt\-builder\-repository \-\-gpg "gpg \-\-homedir /tmp" [...] .Ve .Sp This can also be used to avoid gpg asking for the key passphrase: .Sp .Vb 1 \& virt\-builder\-repository \-\-gpg "gpg \-\-passphrase\-file /tmp/pass \-\-batch" [...] .Ve .IP "\fB\-K\fR KEYID" 4 .IX Item "-K KEYID" .PD 0 .IP "\fB\-\-gpg\-key\fR KEYID" 4 .IX Item "--gpg-key KEYID" .PD Specify the GPG key to be used to sign the repository index file. If not provided, the index will left unsigned. \f(CW\*(C`KEYID\*(C'\fR is used to identify the GPG key to use. This value is passed to gpg’s \&\fI\-\-default\-key\fR option and can thus be an email address or a fingerprint. .Sp \&\fBNOTE\fR: by default, virt-builder-repository searches for the key in the user’s GPG keyring. .IP \fB\-i\fR 4 .IX Item "-i" .PD 0 .IP \fB\-\-interactive\fR 4 .IX Item "--interactive" .PD Prompt for missing data. Default values are computed from the disk image. .Sp When prompted for data, inputting \f(CW\*(C`\-\*(C'\fR corresponds to leaving the value empty. This can be used to avoid setting the default computed value. .IP \fB\-\-no\-compression\fR 4 .IX Item "--no-compression" Don’t compress the template images. .IP \fB\-\-machine\-readable\fR 4 .IX Item "--machine-readable" .PD 0 .IP \fB\-\-machine\-readable\fR=format 4 .IX Item "--machine-readable=format" .PD This option is used to make the output more machine friendly when being parsed by other programs. See "MACHINE READABLE OUTPUT" below. .IP \fB\-\-colors\fR 4 .IX Item "--colors" .PD 0 .IP \fB\-\-colours\fR 4 .IX Item "--colours" .PD Use ANSI colour sequences to colourize messages. This is the default when the output is a tty. If the output of the program is redirected to a file, ANSI colour sequences are disabled unless you use this option. .IP \fB\-q\fR 4 .IX Item "-q" .PD 0 .IP \fB\-\-quiet\fR 4 .IX Item "--quiet" .PD Don’t print ordinary progress messages. .IP \fB\-v\fR 4 .IX Item "-v" .PD 0 .IP \fB\-\-verbose\fR 4 .IX Item "--verbose" .PD Enable debug messages and/or produce verbose output. .Sp When reporting bugs, use this option and attach the complete output to your bug report. .IP \fB\-V\fR 4 .IX Item "-V" .PD 0 .IP \fB\-\-version\fR 4 .IX Item "--version" .PD Display version number and exit. .IP \fB\-\-wrap\fR 4 .IX Item "--wrap" Wrap error, warning, and informative messages. This is the default when the output is a tty. If the output of the program is redirected to a file, wrapping is disabled unless you use this option. .IP \fB\-x\fR 4 .IX Item "-x" Enable tracing of libguestfs API calls. .SH "MACHINE READABLE OUTPUT" .IX Header "MACHINE READABLE OUTPUT" The \fI\-\-machine\-readable\fR option can be used to make the output more machine friendly, which is useful when calling virt-builder-repository from other programs, GUIs etc. .PP Use the option on its own to query the capabilities of the virt-builder-repository binary. Typical output looks like this: .PP .Vb 2 \& $ virt\-builder\-repository \-\-machine\-readable \& virt\-builder\-repository .Ve .PP A list of features is printed, one per line, and the program exits with status 0. .PP It is possible to specify a format string for controlling the output; see "ADVANCED MACHINE READABLE OUTPUT" in \fBguestfs\fR\|(3). .SH "EXIT STATUS" .IX Header "EXIT STATUS" This program returns 0 if successful, or non-zero if there was an error. .SH "SEE ALSO" .IX Header "SEE ALSO" \&\fBvirt\-builder\fR\|(1) http://libguestfs.org/. .SH AUTHOR .IX Header "AUTHOR" Cédric Bosdonnat mailto:cbosdonnat@suse.com .SH COPYRIGHT .IX Header "COPYRIGHT" Copyright (C) 2016\-2023 SUSE Inc. .SH LICENSE .IX Header "LICENSE" This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. .PP This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. .PP You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110\-1301 USA. .SH BUGS .IX Header "BUGS" To get a list of bugs against libguestfs, use this link: https://bugzilla.redhat.com/buglist.cgi?component=libguestfs&product=Virtualization+Tools .PP To report a new bug against libguestfs, use this link: https://bugzilla.redhat.com/enter_bug.cgi?component=libguestfs&product=Virtualization+Tools .PP When reporting a bug, please supply: .IP \(bu 4 The version of libguestfs. .IP \(bu 4 Where you got libguestfs (eg. which Linux distro, compiled from source, etc) .IP \(bu 4 Describe the bug accurately and give a way to reproduce it. .IP \(bu 4 Run \fBlibguestfs\-test\-tool\fR\|(1) and paste the \fBcomplete, unedited\fR output into the bug report.