From 005f272767cce5d670a5685f2395c834252ca011 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 9 Jul 2024 11:43:28 +0100 Subject: [PATCH] Package virt-v2v-in-place in libexec as unsupported tool Add warning about virt-v2v-in-place not being supported resolves: RHEL-40903 Add more fields to virt-inspector output related: MTV-1079 Revert "docs: Remove paragraph about -ip passwords and ssh/scp" resolves: RHEL-45527 --- ...-about-virt-v2v-in-place-not-being-s.patch | 24 ++++++++ ...pector-Add-more-fields-to-the-output.patch | 52 ++++++++++++++++ ...ve-paragraph-about-ip-passwords-and-.patch | 60 +++++++++++++++++++ virt-v2v.spec | 14 ++++- 4 files changed, 149 insertions(+), 1 deletion(-) create mode 100644 0016-RHEL-Add-warning-about-virt-v2v-in-place-not-being-s.patch create mode 100644 0017-inspector-Add-more-fields-to-the-output.patch create mode 100644 0018-Revert-docs-Remove-paragraph-about-ip-passwords-and-.patch diff --git a/0016-RHEL-Add-warning-about-virt-v2v-in-place-not-being-s.patch b/0016-RHEL-Add-warning-about-virt-v2v-in-place-not-being-s.patch new file mode 100644 index 0000000..4a48bf2 --- /dev/null +++ b/0016-RHEL-Add-warning-about-virt-v2v-in-place-not-being-s.patch @@ -0,0 +1,24 @@ +From e08b337b0b36763b437901a6480d49f63f911ce9 Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Tue, 9 Jul 2024 11:30:09 +0100 +Subject: [PATCH] RHEL: Add warning about virt-v2v-in-place not being supported + +Fixes: https://issues.redhat.com/browse/RHEL-40903 +--- + in-place/in_place.ml | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/in-place/in_place.ml b/in-place/in_place.ml +index 2049db16..2a031271 100644 +--- a/in-place/in_place.ml ++++ b/in-place/in_place.ml +@@ -33,6 +33,9 @@ let mac_re = PCRE.compile "^([[:xdigit:]]{2}:[[:xdigit:]]{2}:[[:xdigit:]]{2}:[[: + let mac_ip_re = PCRE.compile "^([[:xdigit:]]|:|\\.)+$" + + let rec main () = ++ warning "virt-v2v-in-place is NOT SUPPORTED for command line use. \ ++ It is almost always better to use virt-v2v instead of this tool."; ++ + let set_string_option_once optname optref arg = + match !optref with + | Some _ -> diff --git a/0017-inspector-Add-more-fields-to-the-output.patch b/0017-inspector-Add-more-fields-to-the-output.patch new file mode 100644 index 0000000..f73ad4c --- /dev/null +++ b/0017-inspector-Add-more-fields-to-the-output.patch @@ -0,0 +1,52 @@ +From 16c17aa39ff95c8c533e75e901055396caa4d0b9 Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Wed, 3 Jul 2024 11:36:11 +0100 +Subject: [PATCH] inspector: Add more fields to the output + +Add more inspection fields in the element of +virt-v2v-inspector output. I've tried to keep these field names +consistent with virt-inspector (if there is a difference then it's a +bug in this tool). + +See: https://issues.redhat.com/browse/MTV-1079 +(cherry picked from commit 4df3dcf64da91645d20aa9f74cd04fa8985c4610) +--- + inspector/inspector.ml | 25 +++++++++++++++++++++++++ + 1 file changed, 25 insertions(+) + +diff --git a/inspector/inspector.ml b/inspector/inspector.ml +index 02d1a0e7..c79dd687 100644 +--- a/inspector/inspector.ml ++++ b/inspector/inspector.ml +@@ -490,6 +490,31 @@ and inspector_xml v2vdir inspect = + [PCData inspect.i_package_management]); + if inspect.i_product_name <> "" then + List.push_back os (e "product_name" [] [PCData inspect.i_product_name]); ++ if inspect.i_product_variant <> "" then ++ List.push_back os (e "product_variant" [] ++ [PCData inspect.i_product_variant]); ++ ++ if inspect.i_windows_systemroot <> "" then ++ List.push_back os (e "windows_systemroot" [] ++ [PCData inspect.i_windows_systemroot]); ++ if inspect.i_windows_software_hive <> "" then ++ List.push_back os (e "windows_software_hive" [] ++ [PCData inspect.i_windows_software_hive]); ++ if inspect.i_windows_systemroot <> "" then ++ List.push_back os (e "windows_system_hive" [] ++ [PCData inspect.i_windows_system_hive]); ++ if inspect.i_windows_current_control_set <> "" then ++ List.push_back os (e "windows_current_control_set" [] ++ [PCData inspect.i_windows_current_control_set]); ++ ++ List.push_back os (e "root" [] [PCData inspect.i_root]); ++ let mps = ref [] in ++ List.iter ( ++ fun (fs, dev) -> ++ List.push_back mps (e "mountpoint" [ "dev", dev ] [PCData fs]) ++ ) inspect.i_mountpoints; ++ List.push_back os (e "mountpoints" [] !mps); ++ + List.push_back body (e "operatingsystem" [] !os); + + (* Construct the final document. *) diff --git a/0018-Revert-docs-Remove-paragraph-about-ip-passwords-and-.patch b/0018-Revert-docs-Remove-paragraph-about-ip-passwords-and-.patch new file mode 100644 index 0000000..6ee93ac --- /dev/null +++ b/0018-Revert-docs-Remove-paragraph-about-ip-passwords-and-.patch @@ -0,0 +1,60 @@ +From 528cae619a10c7cb62e1d9d72ec2475b1543f512 Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Fri, 28 Jun 2024 14:52:11 +0100 +Subject: [PATCH] Revert "docs: Remove paragraph about -ip passwords and + ssh/scp" + +Previously we removed this paragraph, believing that the -ip option +now copes with all cases. However this still isn't true because +libvirt runs this ssh command: + + ssh -l root -T -e none -- [XEN-HOST] sh -c 'which virt-ssh-helper 1>/dev/null 2>&1; if test $? = 0; then virt-ssh-helper 'xen://'; else if 'nc' -q 2>&1 | grep "requires an argument" >/dev/null 2>&1; then ARG=-q0;else ARG=;fi;'nc' $ARG -U /var/run/libvirt/libvirt-sock; fi' + +I checked with Dan and there is no way to suppress this or pass in a +password, so we still need ssh-agent even with -ip. Note this applies +to any libvirt ssh connection, thus to Xen or VMware over SSH. + +Reported-by: Ming Xie +Fixes: https://issues.redhat.com/browse/RHEL-45527 +Thanks: Daniel Berrange + +This reverts commit 67fcf66904c7f1f6da858eba35e95dad670427c0. + +(cherry picked from commit 2a6c24227380a43f1a31cd22281f48dc586653b0) +--- + docs/virt-v2v-input-vmware.pod | 5 +++++ + docs/virt-v2v-input-xen.pod | 5 +++++ + 2 files changed, 10 insertions(+) + +diff --git a/docs/virt-v2v-input-vmware.pod b/docs/virt-v2v-input-vmware.pod +index fc6be0e0..b28268c2 100644 +--- a/docs/virt-v2v-input-vmware.pod ++++ b/docs/virt-v2v-input-vmware.pod +@@ -155,6 +155,11 @@ virt-v2v server to the ESXi hypervisor. For example: + $ ssh root@esxi.example.com + [ logs straight into the shell, no password is requested ] + ++Note that support for non-interactive authentication via the I<-ip> ++option is incomplete. Some operations remain that still require the ++user to enter the password manually. Therefore ssh-agent is recommended ++over the I<-ip> option. See L. ++ + =head3 VMX: Construct the SSH URI + + When using the SSH input transport you must specify a remote +diff --git a/docs/virt-v2v-input-xen.pod b/docs/virt-v2v-input-xen.pod +index 05c4e3f5..9c3981e1 100644 +--- a/docs/virt-v2v-input-xen.pod ++++ b/docs/virt-v2v-input-xen.pod +@@ -32,6 +32,11 @@ server to the Xen host. For example: + $ ssh root@xen.example.com + [ logs straight into the shell, no password is requested ] + ++Note that support for non-interactive authentication via the I<-ip> ++option is incomplete. Some operations remain that still require the ++user to enter the password manually. Therefore ssh-agent is recommended ++over the I<-ip> option. See L. ++ + With some modern ssh implementations, legacy crypto algorithms required + to interoperate with RHEL 5 sshd are disabled. To enable them, you may + need to add the following C stanza to your F<~/.ssh/config>: diff --git a/virt-v2v.spec b/virt-v2v.spec index 3b7b468..4215966 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -8,7 +8,7 @@ Name: virt-v2v Epoch: 1 Version: 2.5.4 -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 @@ -43,6 +43,9 @@ 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 +Patch0016: 0016-RHEL-Add-warning-about-virt-v2v-in-place-not-being-s.patch +Patch0017: 0017-inspector-Add-more-fields-to-the-output.patch +Patch0018: 0018-Revert-docs-Remove-paragraph-about-ip-passwords-and-.patch %if !0%{?rhel} # libguestfs hasn't been built on i686 for a while since there is no @@ -346,6 +349,15 @@ make -C tests TESTS=test-v2v-fedora-luks-on-lvm-conversion.sh check %changelog +* Tue Jul 09 2024 Richard W.M. Jones - 1:2.5.4-2 +- Package virt-v2v-in-place in libexec as unsupported tool +- Add warning about virt-v2v-in-place not being supported + resolves: RHEL-40903 +- Add more fields to virt-inspector output + related: MTV-1079 +- Revert "docs: Remove paragraph about -ip passwords and ssh/scp" + resolves: RHEL-45527 + * Thu May 16 2024 Richard W.M. Jones - 1:2.5.4-1 - Rebase to virt-v2v 2.5.4 - Add missing firmware types and enhance -o kubevirt