diff --git a/0003-input-parse_vmx.ml-Reject-VMDK-files.patch b/0003-input-parse_vmx.ml-Reject-VMDK-files.patch new file mode 100644 index 0000000..10221eb --- /dev/null +++ b/0003-input-parse_vmx.ml-Reject-VMDK-files.patch @@ -0,0 +1,40 @@ +From 6f2536bd9fbc335d3fb460d8c3317664d0bd813a Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Tue, 19 Dec 2023 12:53:56 +0000 +Subject: [PATCH] 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 +--- + input/parse_vmx.ml | 11 +++++++++++ + 1 file changed, 11 insertions(+) + +diff --git a/input/parse_vmx.ml b/input/parse_vmx.ml +index 65d5a0ed..43d05bf3 100644 +--- a/input/parse_vmx.ml ++++ b/input/parse_vmx.ml +@@ -274,6 +274,17 @@ let rec parse_file vmx_filename = + parse_string str + + and parse_string str = ++ (* Reject VMDK files early, since in virt-v2v we have seen users try ++ * to pass a .vmdk file as a .vmx file. Luckily this is easy to ++ * do with the whole file as a string. ++ *) ++ if String.is_prefix str "VMDK" || ++ String.is_prefix str "KDMV" || ++ String.is_prefix str "# Disk DescriptorFile\n" then ++ error "input file is a VMDK (disk image), but we are expecting a \ ++ VMX (VMware metadata)"; ++ ++ (* Split the input into lines. *) + let lines = String.nsplit "\n" str in + + (* I've never seen any VMX file with CR-LF endings, and VMware diff --git a/0003-RHEL-v2v-Select-correct-qemu-binary-for-o-qemu-mode-.patch b/0004-RHEL-v2v-Select-correct-qemu-binary-for-o-qemu-mode-.patch similarity index 94% rename from 0003-RHEL-v2v-Select-correct-qemu-binary-for-o-qemu-mode-.patch rename to 0004-RHEL-v2v-Select-correct-qemu-binary-for-o-qemu-mode-.patch index d86cda3..5e67733 100644 --- a/0003-RHEL-v2v-Select-correct-qemu-binary-for-o-qemu-mode-.patch +++ b/0004-RHEL-v2v-Select-correct-qemu-binary-for-o-qemu-mode-.patch @@ -1,4 +1,4 @@ -From 714eb855ca5924245c5831f5f008306b7d1f6a2a Mon Sep 17 00:00:00 2001 +From 9a814bbb788b8c1e353ac16a3117af7ebdea7f96 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Sun, 28 Sep 2014 19:14:43 +0100 Subject: [PATCH] RHEL: v2v: Select correct qemu binary for -o qemu mode diff --git a/0004-RHEL-v2v-Disable-the-qemu-boot-oo-qemu-boot-option-R.patch b/0005-RHEL-v2v-Disable-the-qemu-boot-oo-qemu-boot-option-R.patch similarity index 98% rename from 0004-RHEL-v2v-Disable-the-qemu-boot-oo-qemu-boot-option-R.patch rename to 0005-RHEL-v2v-Disable-the-qemu-boot-oo-qemu-boot-option-R.patch index 2f6a990..fb6e6bf 100644 --- a/0004-RHEL-v2v-Disable-the-qemu-boot-oo-qemu-boot-option-R.patch +++ b/0005-RHEL-v2v-Disable-the-qemu-boot-oo-qemu-boot-option-R.patch @@ -1,4 +1,4 @@ -From 419ab62f882db17dcbe32c1f1c80be51dfb00fec Mon Sep 17 00:00:00 2001 +From 601bcb0602e1944c4350ce612dd838e0e6895f6a Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 30 Sep 2014 10:50:27 +0100 Subject: [PATCH] RHEL: v2v: Disable the --qemu-boot / -oo qemu-boot option diff --git a/0005-RHEL-Fix-list-of-supported-sound-cards-to-match-RHEL.patch b/0006-RHEL-Fix-list-of-supported-sound-cards-to-match-RHEL.patch similarity index 92% rename from 0005-RHEL-Fix-list-of-supported-sound-cards-to-match-RHEL.patch rename to 0006-RHEL-Fix-list-of-supported-sound-cards-to-match-RHEL.patch index ebce4d3..433664b 100644 --- a/0005-RHEL-Fix-list-of-supported-sound-cards-to-match-RHEL.patch +++ b/0006-RHEL-Fix-list-of-supported-sound-cards-to-match-RHEL.patch @@ -1,4 +1,4 @@ -From dc27eb1d7634879fdd666b4526382d35718e8d61 Mon Sep 17 00:00:00 2001 +From 5dfbc9275e29c24d8c31652379e76b9cc7cb2988 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 24 Apr 2015 09:45:41 -0400 Subject: [PATCH] RHEL: Fix list of supported sound cards to match RHEL qemu diff --git a/0006-RHEL-Fixes-for-libguestfs-winsupport.patch b/0007-RHEL-Fixes-for-libguestfs-winsupport.patch similarity index 98% rename from 0006-RHEL-Fixes-for-libguestfs-winsupport.patch rename to 0007-RHEL-Fixes-for-libguestfs-winsupport.patch index 116e48a..c45d7ca 100644 --- a/0006-RHEL-Fixes-for-libguestfs-winsupport.patch +++ b/0007-RHEL-Fixes-for-libguestfs-winsupport.patch @@ -1,4 +1,4 @@ -From 8a04c776067ea059092d2e6435b3f1a34eadd42f Mon Sep 17 00:00:00 2001 +From 1ea4fcbb9e4794cd59efe482cf122608dd0a0689 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Sun, 30 Aug 2015 03:21:57 -0400 Subject: [PATCH] RHEL: Fixes for libguestfs-winsupport. diff --git a/0007-RHEL-v2v-i-disk-force-VNC-as-display-RHBZ-1372671.patch b/0008-RHEL-v2v-i-disk-force-VNC-as-display-RHBZ-1372671.patch similarity index 93% rename from 0007-RHEL-v2v-i-disk-force-VNC-as-display-RHBZ-1372671.patch rename to 0008-RHEL-v2v-i-disk-force-VNC-as-display-RHBZ-1372671.patch index 8b3c60d..e89f577 100644 --- a/0007-RHEL-v2v-i-disk-force-VNC-as-display-RHBZ-1372671.patch +++ b/0008-RHEL-v2v-i-disk-force-VNC-as-display-RHBZ-1372671.patch @@ -1,4 +1,4 @@ -From 249864cdb71388d9ffa18b32f2dc68ee38446c0b Mon Sep 17 00:00:00 2001 +From 68a5971a7b214e2d29c4ccba23efef4e0624e294 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 2 Mar 2017 14:21:37 +0100 Subject: [PATCH] RHEL: v2v: -i disk: force VNC as display (RHBZ#1372671) diff --git a/0008-RHEL-v2v-do-not-mention-SUSE-Xen-hosts-RHBZ-1430203.patch b/0009-RHEL-v2v-do-not-mention-SUSE-Xen-hosts-RHBZ-1430203.patch similarity index 91% rename from 0008-RHEL-v2v-do-not-mention-SUSE-Xen-hosts-RHBZ-1430203.patch rename to 0009-RHEL-v2v-do-not-mention-SUSE-Xen-hosts-RHBZ-1430203.patch index 2166910..68532be 100644 --- a/0008-RHEL-v2v-do-not-mention-SUSE-Xen-hosts-RHBZ-1430203.patch +++ b/0009-RHEL-v2v-do-not-mention-SUSE-Xen-hosts-RHBZ-1430203.patch @@ -1,4 +1,4 @@ -From 6f681ece3f020326a472055e343847ee4e865a13 Mon Sep 17 00:00:00 2001 +From a291a35c4b51455707c5f2540994324c784f0d5c Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Wed, 8 Mar 2017 11:03:40 +0100 Subject: [PATCH] RHEL: v2v: do not mention SUSE Xen hosts (RHBZ#1430203) diff --git a/0009-RHEL-point-to-KB-for-supported-v2v-hypervisors-guest.patch b/0010-RHEL-point-to-KB-for-supported-v2v-hypervisors-guest.patch similarity index 97% rename from 0009-RHEL-point-to-KB-for-supported-v2v-hypervisors-guest.patch rename to 0010-RHEL-point-to-KB-for-supported-v2v-hypervisors-guest.patch index 38fc5a5..803af8e 100644 --- a/0009-RHEL-point-to-KB-for-supported-v2v-hypervisors-guest.patch +++ b/0010-RHEL-point-to-KB-for-supported-v2v-hypervisors-guest.patch @@ -1,4 +1,4 @@ -From 53ab6bfebc6c9b6076ca40d8e295215d59a3ff2e Mon Sep 17 00:00:00 2001 +From 5ddad54bc131bbdd88c39640957924c077e5456e Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Tue, 26 Mar 2019 09:42:25 +0100 Subject: [PATCH] RHEL: point to KB for supported v2v hypervisors/guests diff --git a/0010-RHEL-Disable-o-glance.patch b/0011-RHEL-Disable-o-glance.patch similarity index 99% rename from 0010-RHEL-Disable-o-glance.patch rename to 0011-RHEL-Disable-o-glance.patch index 8e8d52d..7aed5ac 100644 --- a/0010-RHEL-Disable-o-glance.patch +++ b/0011-RHEL-Disable-o-glance.patch @@ -1,4 +1,4 @@ -From 26a872919340dc1b319b9b9d00f818154a544b1f Mon Sep 17 00:00:00 2001 +From 8ccb0f161424ba54fb48cc8b6c9734eeca49267f Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 30 Jun 2021 11:15:52 +0100 Subject: [PATCH] RHEL: Disable -o glance diff --git a/0011-RHEL-Remove-the-in-place-option.patch b/0012-RHEL-Remove-the-in-place-option.patch similarity index 98% rename from 0011-RHEL-Remove-the-in-place-option.patch rename to 0012-RHEL-Remove-the-in-place-option.patch index bc9c591..298a045 100644 --- a/0011-RHEL-Remove-the-in-place-option.patch +++ b/0012-RHEL-Remove-the-in-place-option.patch @@ -1,4 +1,4 @@ -From eec1c6b2e7fe8a9dec3f1d7092ea6738fd166885 Mon Sep 17 00:00:00 2001 +From 6ea8c70cbebdfb1a12bbcd2d57b5c6c157369478 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 2 Dec 2021 11:56:05 +0000 Subject: [PATCH] RHEL: Remove the --in-place option diff --git a/0012-RHEL-9-oo-compressed-Remove-nbdcopy-version-check-an.patch b/0013-RHEL-9-oo-compressed-Remove-nbdcopy-version-check-an.patch similarity index 96% rename from 0012-RHEL-9-oo-compressed-Remove-nbdcopy-version-check-an.patch rename to 0013-RHEL-9-oo-compressed-Remove-nbdcopy-version-check-an.patch index d13a311..75346d5 100644 --- a/0012-RHEL-9-oo-compressed-Remove-nbdcopy-version-check-an.patch +++ b/0013-RHEL-9-oo-compressed-Remove-nbdcopy-version-check-an.patch @@ -1,4 +1,4 @@ -From 9bb2e6380eaa0131c43a8cc5e6b4bbdb02380b96 Mon Sep 17 00:00:00 2001 +From 3bf6f17ce219c24931701addc986ab953c9446d5 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 5 Jul 2022 11:56:54 +0100 Subject: [PATCH] RHEL 9: -oo compressed: Remove nbdcopy version check and test diff --git a/0013-RHEL-9-tests-Remove-btrfs-test.patch b/0014-RHEL-9-tests-Remove-btrfs-test.patch similarity index 91% rename from 0013-RHEL-9-tests-Remove-btrfs-test.patch rename to 0014-RHEL-9-tests-Remove-btrfs-test.patch index 6f06f36..d4fa2a1 100644 --- a/0013-RHEL-9-tests-Remove-btrfs-test.patch +++ b/0014-RHEL-9-tests-Remove-btrfs-test.patch @@ -1,4 +1,4 @@ -From 4db6cbedc3e71b05e9defd356e7289bf01e2b985 Mon Sep 17 00:00:00 2001 +From 7f9cacaaa25ec7beed6ca21b758cfd6f2204ca19 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 5 Jul 2022 11:58:09 +0100 Subject: [PATCH] RHEL 9: tests: Remove btrfs test diff --git a/0014-RHEL-9-Remove-block-driver-option.patch b/0015-RHEL-9-Remove-block-driver-option.patch similarity index 98% rename from 0014-RHEL-9-Remove-block-driver-option.patch rename to 0015-RHEL-9-Remove-block-driver-option.patch index e8e3d3a..23296ce 100644 --- a/0014-RHEL-9-Remove-block-driver-option.patch +++ b/0015-RHEL-9-Remove-block-driver-option.patch @@ -1,4 +1,4 @@ -From e8def768b455b6e09c00fa48265a876acbc75837 Mon Sep 17 00:00:00 2001 +From a126df43b1155d7ab2fea8beb2b36baee7b83264 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 28 Apr 2023 12:28:19 +0100 Subject: [PATCH] RHEL 9: Remove --block-driver option diff --git a/virt-v2v.spec b/virt-v2v.spec index 988fcd6..ed6e885 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -16,7 +16,7 @@ Name: virt-v2v Epoch: 1 Version: 2.3.7 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Convert a virtual machine to run on KVM License: GPL-2.0-or-later AND LGPL-2.0-or-later @@ -38,18 +38,19 @@ Source3: copy-patches.sh # Patches. Patch0001: 0001-ocaml-dep.sh-Add-common-mlcustomize-to-list-of-direc.patch Patch0002: 0002-Update-common-submodule.patch -Patch0003: 0003-RHEL-v2v-Select-correct-qemu-binary-for-o-qemu-mode-.patch -Patch0004: 0004-RHEL-v2v-Disable-the-qemu-boot-oo-qemu-boot-option-R.patch -Patch0005: 0005-RHEL-Fix-list-of-supported-sound-cards-to-match-RHEL.patch -Patch0006: 0006-RHEL-Fixes-for-libguestfs-winsupport.patch -Patch0007: 0007-RHEL-v2v-i-disk-force-VNC-as-display-RHBZ-1372671.patch -Patch0008: 0008-RHEL-v2v-do-not-mention-SUSE-Xen-hosts-RHBZ-1430203.patch -Patch0009: 0009-RHEL-point-to-KB-for-supported-v2v-hypervisors-guest.patch -Patch0010: 0010-RHEL-Disable-o-glance.patch -Patch0011: 0011-RHEL-Remove-the-in-place-option.patch -Patch0012: 0012-RHEL-9-oo-compressed-Remove-nbdcopy-version-check-an.patch -Patch0013: 0013-RHEL-9-tests-Remove-btrfs-test.patch -Patch0014: 0014-RHEL-9-Remove-block-driver-option.patch +Patch0003: 0003-input-parse_vmx.ml-Reject-VMDK-files.patch +Patch0004: 0004-RHEL-v2v-Select-correct-qemu-binary-for-o-qemu-mode-.patch +Patch0005: 0005-RHEL-v2v-Disable-the-qemu-boot-oo-qemu-boot-option-R.patch +Patch0006: 0006-RHEL-Fix-list-of-supported-sound-cards-to-match-RHEL.patch +Patch0007: 0007-RHEL-Fixes-for-libguestfs-winsupport.patch +Patch0008: 0008-RHEL-v2v-i-disk-force-VNC-as-display-RHBZ-1372671.patch +Patch0009: 0009-RHEL-v2v-do-not-mention-SUSE-Xen-hosts-RHBZ-1430203.patch +Patch0010: 0010-RHEL-point-to-KB-for-supported-v2v-hypervisors-guest.patch +Patch0011: 0011-RHEL-Disable-o-glance.patch +Patch0012: 0012-RHEL-Remove-the-in-place-option.patch +Patch0013: 0013-RHEL-9-oo-compressed-Remove-nbdcopy-version-check-an.patch +Patch0014: 0014-RHEL-9-tests-Remove-btrfs-test.patch +Patch0015: 0015-RHEL-9-Remove-block-driver-option.patch %if !0%{?rhel} # libguestfs hasn't been built on i686 for a while since there is no @@ -353,6 +354,10 @@ make -C tests TESTS=test-v2v-fedora-luks-on-lvm-conversion.sh check %changelog +* Tue Dec 19 2023 Richard W.M. Jones - 1:2.3.7-2 +- Improve the error message for -i vmx with a .vmdk file + resolves: RHEL-19564 + * Mon Dec 11 2023 Richard W.M. Jones - 1:2.3.7-1 - Rebase to virt-v2v 2.3.7 - -it ssh: Double quote ssh command which tests remote file exists