12070 Commits

Author SHA1 Message Date
Richard W.M. Jones
a8ece4e72d Version 2.5.2. v2.5.2 2024-03-12 09:51:59 +00:00
Richard W.M. Jones
7845d21c65 tests: Fix EXTRA_DIST
Fixes: commit af1f7b571fb21fdbfa2974ee54a22b4fdcbc886a
2024-03-12 09:51:33 +00:00
Richard W.M. Jones
86c43f70ac -o kubevirt: Update comment about displays
I believe we don't need to explicitly enable a display, as Kubevirt
will enable one by default.  Add these findings as a comment.

Thanks: Arik Hadas
2024-03-11 16:40:57 +00:00
Richard W.M. Jones
54ca2da251 -o kubevirt: Add support for sound device
Thanks: Arik Hadas
2024-03-11 16:37:08 +00:00
Richard W.M. Jones
53c9177a78 -o kubevirt: Use virtio-transitional for ancient guests 2024-03-11 16:04:29 +00:00
Richard W.M. Jones
353a9348ea -o kubevirt: Add an RNG device if virtio-rng driver in the guest 2024-03-11 15:49:56 +00:00
Richard W.M. Jones
eee069f8da -o kubevirt: Add network interfaces to output 2024-03-11 15:49:12 +00:00
Richard W.M. Jones
81e0c33c84 -o kubevirt: Add CPU model & topology when available
See: https://kubevirt.io/user-guide/virtual_machines/templates/
See: https://kubevirt.io/api-reference/v1.2.0/definitions.html#_v1_cpu
2024-03-11 15:49:09 +00:00
Richard W.M. Jones
af1f7b571f tests: -o kubevirt: Split up test into Fedora and Windows variants
The existing test used a phony Windows image, but this has some
shortcomings including not testing any virtio paths.  Add a second
test of a phony Fedora image to get a little more coverage.
2024-03-11 15:47:09 +00:00
Richard W.M. Jones
43ca22168b -o qemu: Remove final use of error_unless_uefi_firmware
This function was used by -o libvirt / -o local to check that we have
UEFI firmware for the target architecture.  All it does is called
find_uefi_firmware early so that we fail early.

The same check was copied into -o qemu, probably wrongly as we call
find_uefi_firmware just below, so the early fail is not necessary.

This allows us to remove error_unless_uefi_firmware completely since
it is no longer used anywhere.
2024-03-11 12:05:46 +00:00
Richard W.M. Jones
095bf10035 -o libvirt: Use <os firmware='efi'> finally
Libvirt has long supported <os firmware='efi'>, so use that in
preference to hard coding UEFI paths in the libvirt output.

See: https://libvirt.org/formatdomain.html#bios-bootloader
Fixes: https://github.com/libguestfs/virt-v2v/issues/45
2024-03-11 12:01:25 +00:00
Richard W.M. Jones
4f16fec063 -o kubevirt: Add os firmware field in output
Fixes: https://github.com/libguestfs/virt-v2v/issues/45
Fixes: https://issues.redhat.com/browse/RHEL-28197
2024-03-11 11:32:11 +00:00
Richard W.M. Jones
9711492dc2 tests: Add test for -o kubevirt mode 2024-03-11 11:18:11 +00:00
liuxiang
527bc37441 Add support for LoongArch.
Signed-off-by: liuxiang <liuxiang@loongson.cn>
(cherry picked from libguestfs commit 729d6d55ea84494f0398d02450bd29c39c55f0bd)
2024-02-29 16:01:09 +00:00
Schamane187
c5ec2b1ee4
-o rhv-upload: fix rhv-upload function to work with keycloak instead of basic auth only (#43)
Fixes: https://github.com/libguestfs/virt-v2v/issues/42
2024-02-26 12:18:56 +00:00
rwmjones
1b0de86fa2
Merge pull request #41 from bella485/master
convert_linux: add CircleLinux to supported distros
2024-02-06 12:23:32 +00:00
Bella Zhang
bfb8ca212e convert_linux: add CircleLinux to supported distros 2024-01-28 18:43:42 +08:00
Richard W.M. Jones
2d2ee75166 Version 2.5.1. v2.5.1 2024-01-18 17:25:54 +00:00
Richard W.M. Jones
aafcd0d114 build: Document that nbdinfo and nbdcopy are required, and check
Update README to document that these tools have been needed (ever
since virt-v2v 2.0), and update ./configure to check it.
2024-01-18 17:33:47 +00:00
Richard W.M. Jones
970d7123c2 input/ssh: Use nbdinfo --can connect (instead of --size)
nbdinfo --size prints the size on stdout, causing it to appear in
virt-v2v output.  Using --can connect instead is silent.

Note that nbdinfo --can connect was added in libnbd 1.9.2 (Jul 2021)
and our previous minimum version of libnbd was 1.9.3 so we're OK.
However since neither of these was a stable version I also updated the
minimum libnbd requirement to 1.10 (Sep 2021), and added a proper
check in ./configure

Fixes: commit fb72e059863a60503b6011b8590c25c3a010a58f
2024-01-18 17:25:25 +00:00
Richard W.M. Jones
67fcf66904 docs: Remove paragraph about -ip passwords and ssh/scp
The documentation suggested (correctly) that the -ip option did not
cover all cases where we make an ssh connection to either VMware or
Xen.  However with the recent change where we use nbdkit-ssh-plugin in
preference to ssh/scp (commit fb72e05986, "virt-v2v: -i vmx: Replace
external ssh/scp with nbdkit-ssh-plugin") this should no longer be
true for VMware.  And I don't think it was true for Xen for a while.

Therefore remove this paragraph in the documentation (in two places).

See-also: https://bugzilla.redhat.com/show_bug.cgi?id=1854275
See-also: https://lists.libguestfs.org/archives/list/guestfs@lists.libguestfs.org/thread/CKBEYJHUZWLDUUDWAJM2JU6QIKZGTD6F/
Suggested-by: Laszlo Ersek
2024-01-17 14:20:55 +00:00
Richard W.M. Jones
4f0758a95a input/ssh: Rearrange parameters specifying ssh server 2024-01-17 14:20:44 +00:00
Richard W.M. Jones
a99d9f2afe input/nbdkit_ssh: Make password parameter optional
Instead of storing an explicit NoPassword case, make the password
parameter optional and encode NoPassword as None.  This is simple
refactoring.
2024-01-17 14:20:44 +00:00
Richard W.M. Jones
fb72e05986 virt-v2v: -i vmx: Replace external ssh/scp with nbdkit-ssh-plugin
If you use a -i vmx ssh filename containing '*' then it will expand
the glob at the remote side.  New scp is weird and silently creates a
directory on the local side.  For example suppose there's a remote
file literally called "/tmp/test*" (ie. the '*' is part of the
filename) and you thought you could copy that to local using:

  scp 'remote:/tmp/test*' '/tmp/test*'

scp treats the first parameter (only) as a wildcard and if there are
multiple files matching the wildcard /tmp/test*, will create a local
directory literally called "/tmp/test*/" and put the files into it.
Who expected any of that?

You might think that double quoting (as we used to use) might work,
but that breaks with spaces and quotes.  I guess scp is using
different code paths internally for glob versus everything else.

The only way to really make this work is to stop using scp entirely
and just use sftp directly.  The easiest way to use sftp is to use
nbdkit-ssh-plugin.  We already depend on nbdkit-ssh-plugin, nbdcopy
and nbdinfo for other parts of virt-v2v, so might as well use the
whole lot here.

One advantage of this change is that now the -ip (input password)
parameter actually works in -i vmx -it ssh mode.

Other approaches that would have been possible:

 - Use the OCaml NBD library instead of nbdcopy/nbdinfo

 - Use 'nbdkit -U - ssh --run ...'

 - Direct binding to libssh.

See also commit e2af12ba69c4463bb73d30db63290a887cdd41eb
("input: -i vmx: Remove support for openssh scp < 8.8")

See also commit 22c5b98ab78c734b478c26e14ee62e2a065aaa0c
("-it ssh: Double quote ssh command which tests remote file exists")

See also https://unix.stackexchange.com/a/587710

Reported-by: Ming Xie
Fixes: https://issues.redhat.com/browse/RHEL-21365
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
2024-01-17 14:20:44 +00:00
Richard W.M. Jones
72c9734050 input/nbdkit_ssh: Make retry filter optional
This filter retries a request on failure.  Add a flag to make this
filter optional, but default to using it if available (so there's no
change to default behaviour).

The reason we want to make this optional is that the next commit will
want to use nbdkit-ssh-plugin to probe to see if a remote file is
present, and we don't want to retry that probe on failure.

Reviewed-by: Laszlo Ersek <lersek@redhat.com>
2024-01-17 14:20:44 +00:00
Richard W.M. Jones
40730615d2 virt-v2v: -i vmx: Remove dependency of ssh.ml on Xml.uri
Xml.uri is a convenient way to pass the multiple ssh fields to
virt-v2v and is still used internally by the -i vmx code.  However
don't leak this awkward implementation into the new ssh.ml module.

Like Nbdkit_ssh, we'll only deal with the explicit (password, port,
server, user, path) fields separately.

Note after this refactoring:

 - The new Ssh module interface looks broadly similar to the
   Nbdkit_ssh interface.

 - vmx_source_of_arg assertions are no longer required inside the new
   Ssh module, which was a mild layering violation before.

Reviewed-by: Laszlo Ersek <lersek@redhat.com>
2024-01-17 14:20:44 +00:00
Richard W.M. Jones
60e72acb34 virt-v2v: -i vmx: Add the input password to vmx_source
Since we use the input password in various places in the VMX module,
store the input password in vmx_source.  This neutral refactoring
makes later changes simpler.

Reviewed-by: Laszlo Ersek <lersek@redhat.com>
2024-01-17 14:20:44 +00:00
Richard W.M. Jones
a0b22af287 virt-v2v: -i vmx: Simplify scp wrapper
The existing 'scp_from_remote_to_temporary' wrapper around scp was
pretty weird (I think from much patching without refactoring).
Simplify it so it no longer generates the output filename, and rename
it accordingly to 'download_file' (as we will soon remove the need for
and dependency on 'scp').

Reviewed-by: Laszlo Ersek <lersek@redhat.com>
2024-01-17 14:20:44 +00:00
Richard W.M. Jones
cddd07669d virt-v2v: -i vmx: Refactor ssh/scp code into a new module
This is a straight refactor of the existing code that handles ssh/scp
into a new module.  In this commit I just copy the code around without
doing any cleanup; cleanup will follow in subsequent commits.

Reviewed-by: Laszlo Ersek <lersek@redhat.com>
2024-01-17 14:20:44 +00:00
rwmjones
8a387609a0
Merge pull request #40 from weblate/weblate-libguestfs-virt-v2v-master
Translations update from Fedora Weblate
2024-01-15 14:27:38 +00:00
Weblate
2d227fc060 Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: libguestfs/virt-v2v-master
Translate-URL: https://translate.fedoraproject.org/projects/libguestfs/virt-v2v-master/
2024-01-15 14:37:14 +01:00
Weblate Translation Memory
60d4a517e4 Translated using Weblate (Polish)
Currently translated at 7.2% (35 of 481 strings)

Translation: libguestfs/virt-v2v-master
Translate-URL: https://translate.fedoraproject.org/projects/libguestfs/virt-v2v-master/pl/
2024-01-15 14:37:13 +01:00
Richard W.M. Jones
af68f253d1 virt-v2v: -i vmx: Remove scp -T option
This reverts the following commit:

  commit d265639c2ab31418cfdbdedd0cc3e68cf290d834
  Author: Richard W.M. Jones <rjones@redhat.com>
  Date:   Thu Jul 25 14:52:42 2019 +0100

    v2v: -i vmx: Use scp -T option if available to unbreak scp (RHBZ#1733168).

See also the referenced bug:
https://bugzilla.redhat.com/show_bug.cgi?id=1733168

My rationale for removing this option is that since we now require
OpenSSH 8.8 we must be using sftp for file transfer so we no longer
need to defeat the check for correct expansion of wildcards.  That
check was only relevant for OpenSSH <= 8.7 using the old scp protocol.

Reverts: commit d265639c2ab31418cfdbdedd0cc3e68cf290d834
2024-01-11 15:35:43 +00:00
Richard W.M. Jones
130f6d8541 Version 2.4.0. v2.4.0 2024-01-04 17:06:53 +00:00
Richard W.M. Jones
fc054a5a7c docs: Fix AUTHORS to account for changes to common submodule
Updates: commit cf4cb0274324666cc67368a47d1eeff43a1da913
2024-01-04 16:53:02 +00:00
Richard W.M. Jones
95add10def docs: Add descriptions of new features of the --key option
Fixes: commit cf4cb0274324666cc67368a47d1eeff43a1da913
2024-01-04 16:40:47 +00:00
Richard W.M. Jones
cf4cb02743 docs: Add outline release notes for virt-v2v 2.4 2024-01-04 15:15:57 +00:00
Richard W.M. Jones
ebc784e1c3 bugs-in-changelog.sh: Use grep -E instead of egrep
New version of coreutils egrep whinges.

(cherry picked from
libguestfs commit 4e4801a2c31c9ef9b44fa5bcef1654ec6a223208)
2024-01-04 13:50:22 +00:00
Richard W.M. Jones
92224d5cec Version 2.3.8. v2.3.8 2023-12-19 15:18:03 +00:00
Richard W.M. Jones
6f2536bd9f input/parse_vmx.ml: Reject VMDK files
Instead of the confusing warnings printed before, it now prints
an error indicating the incorrect input format:

$ virt-v2v -i vmx -it ssh ssh://root@xxx/vmfs/volumes/esx8.0-function/Auto-esx8.0-rhell9.3-efi-with-empty-cdrom/Auto-esx8.0-rhell9.3-efi-with-empty-cdrom.vmdk -ip /tmp/passwd -o null
virt-v2v: error: input file is a VMDK (disk image), but we are expecting a
VMX (VMware metadata)

Reported-by: Ming Xie
Fixes: https://issues.redhat.com/browse/RHEL-19564
2023-12-19 12:57:42 +00:00
Richard W.M. Jones
056401c8c6 Update common submodule
Pick up this bug fix:

    mltools/libosinfo-c.c: Fix off-by-one error
2023-12-09 12:59:13 +00:00
Richard W.M. Jones
ec542c5cc0 ocaml-dep.sh: Add common/mlcustomize to list of directories to search
Avoids this error when you change a file under common/mlcustomize and
then rebuild virt-v2v:

Error: Files ../convert/mlconvert.cmxa
       and ../common/mlcustomize/mlcustomize.cmxa
       make inconsistent assumptions over implementation Inject_virtio_win

Fixes: commit 4b9c8e1560d67ac17e287450f61f4903d237fc47
See-also: commit c30df7ffb8fc04142b99cbb7ec1bebbb32ffb654
2023-12-09 12:24:02 +00:00
Richard W.M. Jones
d8ba7f7e25 Version 2.3.7. v2.3.7 2023-12-09 11:47:26 +00:00
Richard W.M. Jones
01a6f36862 tests: Test new --key all:SELECTOR option 2023-12-07 16:48:17 +00:00
Richard W.M. Jones
ef769cb91b common: Update submodule
Pick up this commit required by libxml2 2.12.1:

    mlxml: Include <libxml/parser.h> for xmlReadMemory
2023-11-27 14:12:22 +00:00
rwmjones
aa85533c85
Merge pull request #39 from weblate/weblate-libguestfs-virt-v2v-master
Translations update from Fedora Weblate
2023-11-27 10:13:32 +00:00
Temuri Doghonadze
7663581cd1 Translated using Weblate (Georgian)
Currently translated at 9.1% (44 of 481 strings)

Translation: libguestfs/virt-v2v-master
Translate-URL: https://translate.fedoraproject.org/projects/libguestfs/virt-v2v-master/ka/
2023-11-26 22:01:24 +01:00
Weblate Translation Memory
8a61316ff4 Translated using Weblate (Georgian)
Currently translated at 9.1% (44 of 481 strings)

Translation: libguestfs/virt-v2v-master
Translate-URL: https://translate.fedoraproject.org/projects/libguestfs/virt-v2v-master/ka/
2023-11-26 22:01:23 +01:00
Piotr Drąg
b4a0b6536f Translated using Weblate (Polish)
Currently translated at 7.0% (34 of 481 strings)

Translation: libguestfs/virt-v2v-master
Translate-URL: https://translate.fedoraproject.org/projects/libguestfs/virt-v2v-master/pl/
2023-11-26 22:01:23 +01:00
rwmjones
1ab654acca
Merge pull request #38 from weblate/weblate-libguestfs-virt-v2v-master
Translations update from Fedora Weblate
2023-11-25 15:21:49 +00:00