generator: Add new virt-customize --tar-in operation

Using 'virt-customize --tar-in some.tar:/dir -a disk.img' will unpack
'some.tar' into '/dir' in the guest.  Note that this will not work for
compressed tar files as written since the underlying guestfs_tar_in
function requires the compression type to be set explicitly and
defaults to no compression (it does not auto-detect or default to
compression).
This commit is contained in:
Richard W.M. Jones
2023-10-26 19:44:03 +01:00
parent 297db5cccc
commit b5f7b0ec18
2 changed files with 13 additions and 1 deletions

2
common

Submodule common updated: e70d89a58d...9a8ba59351

View File

@@ -510,6 +510,18 @@ You can have multiple I<--ssh-inject> options, for different users
and also for more keys for each user."
};
{ op_name = "tar-in";
op_type = StringPair "TARFILE:REMOTEDIR";
op_discrim = "`TarIn";
op_shortdesc = "Copy local files or directories from a tarball into image";
op_pod_longdesc = "\
Copy local files or directories from a local tar file
called C<TARFILE> into the disk image, placing them in the
directory C<REMOTEDIR> (which must exist). Note that
the tar file must be uncompressed (F<.tar.gz> files will not work
here)";
};
{ op_name = "timezone";
op_type = String "TIMEZONE";
op_discrim = "`Timezone";