.\" Automatically generated by Podwrapper::Man 1.44.2 (Pod::Simple 3.40) .\" .\" 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 .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . 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 "2021-09-07" "libguestfs-1.44.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 \s-1GPG\s0 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 \&\*(L"Creating and signing the index file\*(R" 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 \s-1GPG\s0" 4 .IX Item "--gpg GPG" Specify an alternate \fBgpg\fR\|(1) (\s-1GNU\s0 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 \s-1KEYID\s0" 4 .IX Item "-K KEYID" .PD 0 .IP "\fB\-\-gpg\-key\fR \s-1KEYID\s0" 4 .IX Item "--gpg-key KEYID" .PD Specify the \s-1GPG\s0 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 \s-1GPG\s0 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 \&\fB\s-1NOTE\s0\fR: by default, virt-builder-repository searches for the key in the user’s \s-1GPG\s0 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 \&\*(L"\s-1MACHINE READABLE OUTPUT\*(R"\s0 below. .IP "\fB\-\-colors\fR" 4 .IX Item "--colors" .PD 0 .IP "\fB\-\-colours\fR" 4 .IX Item "--colours" .PD Use \s-1ANSI\s0 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, \s-1ANSI\s0 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\-x\fR" 4 .IX Item "-x" Enable tracing of libguestfs \s-1API\s0 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 \*(L"\s-1ADVANCED MACHINE READABLE OUTPUT\*(R"\s0 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\-2020 \s-1SUSE\s0 Inc. .SH "LICENSE" .IX Header "LICENSE" This program is free software; you can redistribute it and/or modify it under the terms of the \s-1GNU\s0 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 \&\s-1WITHOUT ANY WARRANTY\s0; without even the implied warranty of \&\s-1MERCHANTABILITY\s0 or \s-1FITNESS FOR A PARTICULAR PURPOSE.\s0 See the \s-1GNU\s0 General Public License for more details. .PP You should have received a copy of the \s-1GNU\s0 General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, \s-1MA 02110\-1301 USA.\s0 .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.