From 0a6d24c379da1efd383dd5759d265c28bb25e493 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 12 Apr 2022 12:17:50 +0100 Subject: [PATCH] Rebase to stable branch version 2.0.3 Remove -o json mode resolves: rhbz#2074026 Allow conversion of guests with NVMe drives from VMX files resolves: rhbz#2070530 Cleanly reject guests with snapshots when using -it ssh resolves: rhbz#1774386 Document that vmx+ssh "-ip" auth doesn't cover ssh / scp shell commands resolves: rhbz#1854275 Fix conversion if swap partition isn't encrypted with root directory resolves: rhbz#1658128 Document permissions when importing OVA using RHV UI resolves: rhbz#2039597 --- ...correct-qemu-binary-for-o-qemu-mode-.patch | 2 +- ...-the-qemu-boot-oo-qemu-boot-option-R.patch | 18 +- ...-supported-sound-cards-to-match-RHEL.patch | 2 +- ...RHEL-Fixes-for-libguestfs-winsupport.patch | 2 +- ...sk-force-VNC-as-display-RHBZ-1372671.patch | 2 +- ...-mention-SUSE-Xen-hosts-RHBZ-1430203.patch | 4 +- ...-for-supported-v2v-hypervisors-guest.patch | 2 +- 0008-RHEL-Disable-o-glance.patch | 10 +- 0009-RHEL-Remove-the-in-place-option.patch | 6 +- ...t-i-vmx-Add-support-for-NVMe-devices.patch | 295 +++++ 0011-output-Remove-o-json-mode.patch | 1128 +++++++++++++++++ ...ts-Add-NVMe-test-cases-to-EXTRA_DIST.patch | 34 + 0013-output-Remove-unused-dummy.c.patch | 30 + sources | 4 +- virt-v2v.spec | 22 +- 15 files changed, 1532 insertions(+), 29 deletions(-) create mode 100644 0010-input-i-vmx-Add-support-for-NVMe-devices.patch create mode 100644 0011-output-Remove-o-json-mode.patch create mode 100644 0012-tests-Add-NVMe-test-cases-to-EXTRA_DIST.patch create mode 100644 0013-output-Remove-unused-dummy.c.patch diff --git a/0001-RHEL-v2v-Select-correct-qemu-binary-for-o-qemu-mode-.patch b/0001-RHEL-v2v-Select-correct-qemu-binary-for-o-qemu-mode-.patch index 0ce8308..8b88dae 100644 --- a/0001-RHEL-v2v-Select-correct-qemu-binary-for-o-qemu-mode-.patch +++ b/0001-RHEL-v2v-Select-correct-qemu-binary-for-o-qemu-mode-.patch @@ -1,4 +1,4 @@ -From e1764beecaf2ae760ba0af12518397ca22cfcc9c Mon Sep 17 00:00:00 2001 +From edf4c32464640086c7046d27df969f052e79cffc 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/0002-RHEL-v2v-Disable-the-qemu-boot-oo-qemu-boot-option-R.patch b/0002-RHEL-v2v-Disable-the-qemu-boot-oo-qemu-boot-option-R.patch index 7e75e53..60dd0c7 100644 --- a/0002-RHEL-v2v-Disable-the-qemu-boot-oo-qemu-boot-option-R.patch +++ b/0002-RHEL-v2v-Disable-the-qemu-boot-oo-qemu-boot-option-R.patch @@ -1,4 +1,4 @@ -From f22a51d2f2d7baa34df574dc5c086da75bd899d5 Mon Sep 17 00:00:00 2001 +From 2fad059b0a6e161c9e0a5a97c7e00bae10c6d3d2 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 @@ -17,7 +17,7 @@ qemu script. 4 files changed, 5 insertions(+), 18 deletions(-) diff --git a/docs/virt-v2v-output-local.pod b/docs/virt-v2v-output-local.pod -index a5f155cb..3a2e6238 100644 +index d2a1c270..0be37f5e 100644 --- a/docs/virt-v2v-output-local.pod +++ b/docs/virt-v2v-output-local.pod @@ -9,7 +9,7 @@ or libvirt @@ -27,9 +27,9 @@ index a5f155cb..3a2e6238 100644 - virt-v2v [-i* options] -o qemu -os DIRECTORY [--qemu-boot] + virt-v2v [-i* options] -o qemu -os DIRECTORY - virt-v2v [-i* options] -o json -os DIRECTORY - [-oo json-disks-pattern=PATTERN] -@@ -50,12 +50,10 @@ where C is the guest name. + virt-v2v [-i* options] -o null + +@@ -47,12 +47,10 @@ where C is the guest name. =item B<-o qemu -os> C @@ -41,10 +41,10 @@ index a5f155cb..3a2e6238 100644 -run, I you also add the I<--qemu-boot> option. +run. - =item B<-o json -os> C + =item B<-o null> diff --git a/docs/virt-v2v.pod b/docs/virt-v2v.pod -index 69bdbbd4..ea7bc942 100644 +index 4e912b6c..7d0bafff 100644 --- a/docs/virt-v2v.pod +++ b/docs/virt-v2v.pod @@ -139,11 +139,6 @@ Since F contains the path(s) to the guest disk @@ -59,7 +59,7 @@ index 69bdbbd4..ea7bc942 100644 =head1 OPTIONS =over 4 -@@ -494,9 +489,6 @@ This is similar to I<-o local>, except that a shell script is written +@@ -487,9 +482,6 @@ This is similar to I<-o local>, except that a shell script is written which you can use to boot the guest in qemu. The converted disks and shell script are written to the directory specified by I<-os>. @@ -69,7 +69,7 @@ index 69bdbbd4..ea7bc942 100644 =item B<-o> B This is the same as I<-o rhv>. -@@ -750,10 +742,6 @@ Print information about the source guest and stop. This option is +@@ -743,10 +735,6 @@ Print information about the source guest and stop. This option is useful when you are setting up network and bridge maps. See L. diff --git a/0003-RHEL-Fix-list-of-supported-sound-cards-to-match-RHEL.patch b/0003-RHEL-Fix-list-of-supported-sound-cards-to-match-RHEL.patch index 11e5225..0d32eb2 100644 --- a/0003-RHEL-Fix-list-of-supported-sound-cards-to-match-RHEL.patch +++ b/0003-RHEL-Fix-list-of-supported-sound-cards-to-match-RHEL.patch @@ -1,4 +1,4 @@ -From 4df024b5248ef1ed61ac42b9e439b4b09df90d3b Mon Sep 17 00:00:00 2001 +From 1e2b73e4629458ba7aec61a0accd78cdb1f016c8 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/0004-RHEL-Fixes-for-libguestfs-winsupport.patch b/0004-RHEL-Fixes-for-libguestfs-winsupport.patch index c9a09dd..1ae9807 100644 --- a/0004-RHEL-Fixes-for-libguestfs-winsupport.patch +++ b/0004-RHEL-Fixes-for-libguestfs-winsupport.patch @@ -1,4 +1,4 @@ -From 79acbb6c0c06375cdee6dd8fc0eb711298065cb2 Mon Sep 17 00:00:00 2001 +From 29d999ed093cd3b957f0f375a7c8890c11aa3183 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/0005-RHEL-v2v-i-disk-force-VNC-as-display-RHBZ-1372671.patch b/0005-RHEL-v2v-i-disk-force-VNC-as-display-RHBZ-1372671.patch index 3712e67..28c72c4 100644 --- a/0005-RHEL-v2v-i-disk-force-VNC-as-display-RHBZ-1372671.patch +++ b/0005-RHEL-v2v-i-disk-force-VNC-as-display-RHBZ-1372671.patch @@ -1,4 +1,4 @@ -From ad3b85ab5a33a1a05fa1ef4aaab1539c27f81e57 Mon Sep 17 00:00:00 2001 +From 3868df96a8b18fddb458c5b422fceb5f7c094fd1 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/0006-RHEL-v2v-do-not-mention-SUSE-Xen-hosts-RHBZ-1430203.patch b/0006-RHEL-v2v-do-not-mention-SUSE-Xen-hosts-RHBZ-1430203.patch index 1021c4f..7f9adda 100644 --- a/0006-RHEL-v2v-do-not-mention-SUSE-Xen-hosts-RHBZ-1430203.patch +++ b/0006-RHEL-v2v-do-not-mention-SUSE-Xen-hosts-RHBZ-1430203.patch @@ -1,4 +1,4 @@ -From ffde3eac49231c33b70df01e3a79b5169222664b Mon Sep 17 00:00:00 2001 +From c9998b7a257a709bb1c19509037e268cef1189d7 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) @@ -9,7 +9,7 @@ They are not supported in RHEL. 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/virt-v2v-input-xen.pod b/docs/virt-v2v-input-xen.pod -index c4948e5e..97727b8f 100644 +index 8080ebea..ad5772de 100644 --- a/docs/virt-v2v-input-xen.pod +++ b/docs/virt-v2v-input-xen.pod @@ -11,7 +11,7 @@ virt-v2v-input-xen - Using virt-v2v to convert guests from Xen diff --git a/0007-RHEL-point-to-KB-for-supported-v2v-hypervisors-guest.patch b/0007-RHEL-point-to-KB-for-supported-v2v-hypervisors-guest.patch index 08b7e21..522510b 100644 --- a/0007-RHEL-point-to-KB-for-supported-v2v-hypervisors-guest.patch +++ b/0007-RHEL-point-to-KB-for-supported-v2v-hypervisors-guest.patch @@ -1,4 +1,4 @@ -From b5dd57d100044dfa39784ea52a6a6c2b2bd23623 Mon Sep 17 00:00:00 2001 +From 83e27ad543d3c5fb3aed514d98a52a8ef17d07a7 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/0008-RHEL-Disable-o-glance.patch b/0008-RHEL-Disable-o-glance.patch index 4b8cc40..cc96df9 100644 --- a/0008-RHEL-Disable-o-glance.patch +++ b/0008-RHEL-Disable-o-glance.patch @@ -1,4 +1,4 @@ -From 6b49387ee275dfa7ab9946195a61700a609bdcea Mon Sep 17 00:00:00 2001 +From 4bb8bdee09063d20b64b67972a777e5050c06018 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 @@ -100,7 +100,7 @@ index f5a3abad..1ab356e8 100644 =head1 AUTHOR diff --git a/docs/virt-v2v.pod b/docs/virt-v2v.pod -index ea7bc942..9a2df647 100644 +index 7d0bafff..84e049cc 100644 --- a/docs/virt-v2v.pod +++ b/docs/virt-v2v.pod @@ -416,14 +416,6 @@ See L below. @@ -117,8 +117,8 @@ index ea7bc942..9a2df647 100644 - =item B<-o> B - Set the output method to I. -@@ -1155,11 +1147,6 @@ and output methods may use disk space, as outlined in the table below. + This option is deprecated and will be removed in S. +@@ -1148,11 +1140,6 @@ and output methods may use disk space, as outlined in the table below. This temporarily places a full copy of the uncompressed source disks in C<$VIRT_V2V_TMPDIR> (or F). @@ -130,7 +130,7 @@ index ea7bc942..9a2df647 100644 =item I<-o local> =item I<-o qemu> -@@ -1343,13 +1330,6 @@ instance. +@@ -1336,13 +1323,6 @@ instance. Because of how Cinder volumes are presented as F block devices, using I<-o openstack> normally requires that virt-v2v is run as root. diff --git a/0009-RHEL-Remove-the-in-place-option.patch b/0009-RHEL-Remove-the-in-place-option.patch index b99b5b1..2ce89b3 100644 --- a/0009-RHEL-Remove-the-in-place-option.patch +++ b/0009-RHEL-Remove-the-in-place-option.patch @@ -1,4 +1,4 @@ -From 75e25e23b6e64fff7b397c827de9530c2f56b009 Mon Sep 17 00:00:00 2001 +From b463db43b01f93d94a9e1d6fb283acadb507802c 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 @@ -11,7 +11,7 @@ wish to support in RHEL. 2 files changed, 16 deletions(-) diff --git a/docs/virt-v2v.pod b/docs/virt-v2v.pod -index 9a2df647..abfae1c1 100644 +index 84e049cc..7ad22f00 100644 --- a/docs/virt-v2v.pod +++ b/docs/virt-v2v.pod @@ -21,9 +21,6 @@ There is also a companion front-end called L which comes @@ -35,7 +35,7 @@ index 9a2df647..abfae1c1 100644 =head2 Other virt-v2v topics L — Supported hypervisors, virtualization -@@ -1594,7 +1587,6 @@ L, diff --git a/0010-input-i-vmx-Add-support-for-NVMe-devices.patch b/0010-input-i-vmx-Add-support-for-NVMe-devices.patch new file mode 100644 index 0000000..0699539 --- /dev/null +++ b/0010-input-i-vmx-Add-support-for-NVMe-devices.patch @@ -0,0 +1,295 @@ +From 2bafd4d5019b9354f925fda85f841554547db826 Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Mon, 4 Apr 2022 15:26:18 +0100 +Subject: [PATCH] input: -i vmx: Add support for NVMe devices + +We model NVMe devices in the source hypervisor. + +We currently assume that no one is using the namespaces feature of +NVMe, ie. that each source device will appear in a Linux guest as +/dev/nvme0n1, /dev/nvme1n1, etc. We could fix this if it is a +problem, but it requires adjusting the current assumption for +removable devices that slots are simple integers. + +The devices are mapped to virtio-blk, so in the target the device name +has to change from /dev/nvme0 to /dev/vda (etc.) + +Reported-by: Ming Xie +Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2070530 +Reviewed-by: Laszlo Ersek +(cherry picked from commit 75872bf282d7f2322110caca70963717b43806b1) +--- + convert/convert_linux.ml | 4 +- + convert/target_bus_assignment.ml | 4 +- + input/parse_domain_from_vmx.ml | 26 +++++++++- + lib/types.ml | 3 +- + lib/types.mli | 2 +- + tests/test-v2v-i-vmx-6.expected | 22 +++++++++ + tests/test-v2v-i-vmx-6.vmx | 84 ++++++++++++++++++++++++++++++++ + tests/test-v2v-i-vmx.sh | 4 +- + 8 files changed, 140 insertions(+), 9 deletions(-) + create mode 100644 tests/test-v2v-i-vmx-6.expected + create mode 100644 tests/test-v2v-i-vmx-6.vmx + +diff --git a/convert/convert_linux.ml b/convert/convert_linux.ml +index d9397cfa..c2bbce03 100644 +--- a/convert/convert_linux.ml ++++ b/convert/convert_linux.ml +@@ -1032,7 +1032,9 @@ let convert (g : G.guestfs) source inspect keep_serial_console _ = + ide_block_prefix ^ drive_name i + | Some (Source_virtio_SCSI | Source_SCSI | Source_SATA) -> + "sd" ^ drive_name i +- | Some Source_virtio_blk -> "vd" ^ drive_name i in ++ | Some Source_virtio_blk -> "vd" ^ drive_name i ++ (* For NVMe assume no one is using namespaces. *) ++ | Some Source_NVME -> sprintf "nvme%dn1" i in + let source_dev = device_name_before_conversion i in + let target_dev = block_prefix_after_conversion ^ drive_name i in + source_dev, target_dev +diff --git a/convert/target_bus_assignment.ml b/convert/target_bus_assignment.ml +index 4b56a6e1..f8675cf2 100644 +--- a/convert/target_bus_assignment.ml ++++ b/convert/target_bus_assignment.ml +@@ -73,8 +73,8 @@ let rec target_bus_assignment source_disks source_removables guestcaps = + | None -> ide_bus (* Wild guess, but should be safe. *) + | Some Source_virtio_blk -> virtio_blk_bus + | Some Source_IDE -> ide_bus +- | Some (Source_virtio_SCSI | Source_SCSI | Source_SATA) -> +- scsi_bus in ++ | Some (Source_virtio_SCSI | Source_SCSI | Source_SATA | ++ Source_NVME) -> scsi_bus in + + match r.s_removable_slot with + | None -> +diff --git a/input/parse_domain_from_vmx.ml b/input/parse_domain_from_vmx.ml +index 730f1177..b812edeb 100644 +--- a/input/parse_domain_from_vmx.ml ++++ b/input/parse_domain_from_vmx.ml +@@ -103,6 +103,7 @@ let remote_file_exists uri path = + + let rec find_disks vmx vmx_source = + find_scsi_disks vmx vmx_source ++ @ find_nvme_disks vmx vmx_source + @ find_ide_disks vmx vmx_source + + (* Find all SCSI hard disks. +@@ -129,6 +130,27 @@ and find_scsi_disks vmx vmx_source = + get_scsi_controller_target is_scsi_controller_target + scsi_device_types scsi_controller + ++(* Find all NVMe hard disks. ++ * ++ * In the VMX file: ++ * nvme0.pcislotnumber = "192" ++ * nvme0:0.fileName = "guest.vmdk" ++ *) ++and find_nvme_disks vmx vmx_source = ++ let get_nvme_controller_target ns = ++ sscanf ns "nvme%d:%d" (fun c t -> c, t) ++ in ++ let is_nvme_controller_target ns = ++ try ignore (get_nvme_controller_target ns); true ++ with Scanf.Scan_failure _ | End_of_file | Failure _ -> false ++ in ++ let nvme_device_types = [ None ] in ++ let nvme_controller = Source_NVME in ++ ++ find_hdds vmx vmx_source ++ get_nvme_controller_target is_nvme_controller_target ++ nvme_device_types nvme_controller ++ + (* Find all IDE hard disks. + * + * In the VMX file: +@@ -153,12 +175,12 @@ and find_ide_disks vmx vmx_source = + and find_hdds vmx vmx_source + get_controller_target is_controller_target + device_types controller = +- (* Find namespaces matching '(ide|scsi)X:Y' with suitable deviceType. *) ++ (* Find namespaces matching '(ide|scsi|nvme)X:Y' with suitable deviceType. *) + let hdds = + Parse_vmx.select_namespaces ( + function + | [ns] -> +- (* Check the namespace is '(ide|scsi)X:Y' *) ++ (* Check the namespace is '(ide|scsi|nvme)X:Y' *) + if not (is_controller_target ns) then false + else ( + (* Check the deviceType is one we are looking for. *) +diff --git a/lib/types.ml b/lib/types.ml +index 5804c7c7..92ed0e52 100644 +--- a/lib/types.ml ++++ b/lib/types.ml +@@ -56,7 +56,7 @@ and source_disk = { + s_disk_id : int; + s_controller : s_controller option; + } +-and s_controller = Source_IDE | Source_SATA | Source_SCSI | ++and s_controller = Source_IDE | Source_SATA | Source_SCSI | Source_NVME | + Source_virtio_blk | Source_virtio_SCSI + and source_removable = { + s_removable_type : s_removable_type; +@@ -194,6 +194,7 @@ and string_of_controller = function + | Source_IDE -> "ide" + | Source_SATA -> "sata" + | Source_SCSI -> "scsi" ++ | Source_NVME -> "nvme" + | Source_virtio_blk -> "virtio-blk" + | Source_virtio_SCSI -> "virtio-scsi" + +diff --git a/lib/types.mli b/lib/types.mli +index dd2fe592..37238cd7 100644 +--- a/lib/types.mli ++++ b/lib/types.mli +@@ -103,7 +103,7 @@ and source_disk = { + } + (** A source disk. *) + +-and s_controller = Source_IDE | Source_SATA | Source_SCSI | ++and s_controller = Source_IDE | Source_SATA | Source_SCSI | Source_NVME | + Source_virtio_blk | Source_virtio_SCSI + (** Source disk controller. *) + +diff --git a/tests/test-v2v-i-vmx-6.expected b/tests/test-v2v-i-vmx-6.expected +new file mode 100644 +index 00000000..1793b6b9 +--- /dev/null ++++ b/tests/test-v2v-i-vmx-6.expected +@@ -0,0 +1,22 @@ ++ ++Source guest information (--print-source option): ++ ++ source name: esx6.7-rhel8.6-nvme-disk ++hypervisor type: vmware ++ VM genid: ++ memory: 2147483648 (bytes) ++ nr vCPUs: 1 ++ CPU vendor: ++ CPU model: ++ CPU topology: ++ CPU features: ++ firmware: bios ++ display: ++ sound: ++disks: ++ 0 [nvme] ++removable media: ++ ++NICs: ++ Network "VM Network" mac: 00:50:56:ac:cf:51 [vmxnet3] ++ +diff --git a/tests/test-v2v-i-vmx-6.vmx b/tests/test-v2v-i-vmx-6.vmx +new file mode 100644 +index 00000000..9203c0cf +--- /dev/null ++++ b/tests/test-v2v-i-vmx-6.vmx +@@ -0,0 +1,84 @@ ++.encoding = "UTF-8" ++config.version = "8" ++virtualHW.version = "14" ++nvram = "esx6.7-rhel8.6-nvme-disk.nvram" ++pciBridge0.present = "TRUE" ++svga.present = "TRUE" ++pciBridge4.present = "TRUE" ++pciBridge4.virtualDev = "pcieRootPort" ++pciBridge4.functions = "8" ++pciBridge5.present = "TRUE" ++pciBridge5.virtualDev = "pcieRootPort" ++pciBridge5.functions = "8" ++pciBridge6.present = "TRUE" ++pciBridge6.virtualDev = "pcieRootPort" ++pciBridge6.functions = "8" ++pciBridge7.present = "TRUE" ++pciBridge7.virtualDev = "pcieRootPort" ++pciBridge7.functions = "8" ++vmci0.present = "TRUE" ++hpet0.present = "TRUE" ++floppy0.present = "FALSE" ++svga.vramSize = "8388608" ++memSize = "2048" ++powerType.powerOff = "default" ++powerType.suspend = "default" ++powerType.reset = "default" ++tools.upgrade.policy = "manual" ++sched.cpu.units = "mhz" ++sched.cpu.affinity = "all" ++vm.createDate = "1648710632879834" ++sata0.present = "TRUE" ++nvme0.present = "TRUE" ++nvme0:0.fileName = "nvme-disk.vmdk" ++sched.nvme0:0.shares = "normal" ++sched.nvme0:0.throughputCap = "off" ++nvme0:0.present = "TRUE" ++ethernet0.virtualDev = "vmxnet3" ++ethernet0.networkName = "VM Network" ++ethernet0.addressType = "vpx" ++ethernet0.generatedAddress = "00:50:56:ac:cf:51" ++ethernet0.uptCompatibility = "TRUE" ++ethernet0.present = "TRUE" ++sata0:0.startConnected = "FALSE" ++sata0:0.deviceType = "cdrom-raw" ++sata0:0.clientDevice = "TRUE" ++sata0:0.fileName = "emptyBackingString" ++sata0:0.present = "TRUE" ++displayName = "esx6.7-rhel8.6-nvme-disk" ++guestOS = "rhel8-64" ++toolScripts.afterPowerOn = "TRUE" ++toolScripts.afterResume = "TRUE" ++toolScripts.beforeSuspend = "TRUE" ++toolScripts.beforePowerOff = "TRUE" ++uuid.bios = "42 2c 17 6d 0b 31 4e 16-82 97 f0 b4 99 0b 86 09" ++vc.uuid = "50 2c fc c7 be fb b1 48-fc 7d 4b 39 b3 f5 de b5" ++migrate.hostLog = "esx6.7-rhel8.6-nvme-disk-7585773e.hlog" ++sched.cpu.min = "0" ++sched.cpu.shares = "normal" ++sched.mem.min = "0" ++sched.mem.minSize = "0" ++sched.mem.shares = "normal" ++migrate.encryptionMode = "opportunistic" ++numa.autosize.cookie = "10001" ++numa.autosize.vcpu.maxPerVirtualNode = "1" ++sched.swap.derivedName = "/vmfs/volumes/02155034-b2df70e7/esx6.7-rhel8.6-nvme-disk/esx6.7-rhel8.6-nvme-disk-34965f24.vswp" ++uuid.location = "56 4d c5 90 b1 ca f0 32-64 99 32 a7 d8 97 27 3a" ++nvme0:0.redo = "" ++pciBridge0.pciSlotNumber = "17" ++pciBridge4.pciSlotNumber = "21" ++pciBridge5.pciSlotNumber = "22" ++pciBridge6.pciSlotNumber = "23" ++pciBridge7.pciSlotNumber = "24" ++ethernet0.pciSlotNumber = "160" ++vmci0.pciSlotNumber = "32" ++sata0.pciSlotNumber = "33" ++nvme0.pciSlotNumber = "192" ++vmci0.id = "-1727298039" ++monitor.phys_bits_used = "43" ++vmotion.checkpointFBSize = "8388608" ++vmotion.checkpointSVGAPrimarySize = "8388608" ++cleanShutdown = "TRUE" ++softPowerOff = "TRUE" ++svga.guestBackedPrimaryAware = "TRUE" ++tools.syncTime = "FALSE" +\ No newline at end of file +diff --git a/tests/test-v2v-i-vmx.sh b/tests/test-v2v-i-vmx.sh +index db870bea..d74ddfaa 100755 +--- a/tests/test-v2v-i-vmx.sh ++++ b/tests/test-v2v-i-vmx.sh +@@ -39,14 +39,14 @@ rm -f test-v2v-i-vmx-*.actual + # For the tests to succeed we need at least the fileName (VMDK input + # files) to exist. + +-fns="BZ1308535_21disks.vmdk Fedora-20.vmdk RHEL-7.1-UEFI.vmdk Windows-7-x64.vmdk MSEdge-Win10_preview.vmdk" ++fns="BZ1308535_21disks.vmdk Fedora-20.vmdk RHEL-7.1-UEFI.vmdk Windows-7-x64.vmdk MSEdge-Win10_preview.vmdk nvme-disk.vmdk" + for fn in BZ1308535_21disks_{1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20}.vmdk; do + fns="$fns $fn" + done + + for fn in $fns; do qemu-img create -f vmdk $fn 512; done + +-for i in 1 2 3 4 5; do ++for i in 1 2 3 4 5 6; do + $VG virt-v2v --debug-gc \ + -i vmx test-v2v-i-vmx-$i.vmx \ + --print-source > test-v2v-i-vmx-$i.actual +-- +2.31.1 + diff --git a/0011-output-Remove-o-json-mode.patch b/0011-output-Remove-o-json-mode.patch new file mode 100644 index 0000000..447edb8 --- /dev/null +++ b/0011-output-Remove-o-json-mode.patch @@ -0,0 +1,1128 @@ +From e0e826d902b93c136aa116543a765aede70c389a Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Mon, 11 Apr 2022 11:01:46 +0100 +Subject: [PATCH] output: Remove -o json mode + +This removes the -o json mode completely. + +Reviewed-by: Laszlo Ersek +(cherry picked from commit 4e6b389b4e27c8d13e57fcaf777d96ad7e08650b) +--- + docs/virt-v2v.pod | 4 - + output/Makefile.am | 51 +----- + output/create_json.ml | 338 ----------------------------------- + output/create_json.mli | 27 --- + output/output_json.ml | 153 ---------------- + output/output_json.mli | 21 --- + output/var_expander.ml | 72 -------- + output/var_expander.mli | 82 --------- + output/var_expander_tests.ml | 113 ------------ + tests/Makefile.am | 2 - + tests/test-v2v-o-json.sh | 68 ------- + v2v/v2v.ml | 7 +- + 12 files changed, 5 insertions(+), 933 deletions(-) + delete mode 100644 output/create_json.ml + delete mode 100644 output/create_json.mli + delete mode 100644 output/output_json.ml + delete mode 100644 output/output_json.mli + delete mode 100644 output/var_expander.ml + delete mode 100644 output/var_expander.mli + delete mode 100644 output/var_expander_tests.ml + delete mode 100755 tests/test-v2v-o-json.sh + +diff --git a/docs/virt-v2v.pod b/docs/virt-v2v.pod +index 7ad22f00..912f1bc3 100644 +--- a/docs/virt-v2v.pod ++++ b/docs/virt-v2v.pod +@@ -409,10 +409,6 @@ See L below. + + This is the same as I<-o local>. + +-=item B<-o> B +- +-This option is deprecated and will be removed in S. +- + =item B<-o> B + + Set the output method to I. This is the default. +diff --git a/output/Makefile.am b/output/Makefile.am +index 61caf68b..dd488549 100644 +--- a/output/Makefile.am ++++ b/output/Makefile.am +@@ -39,18 +39,15 @@ EXTRA_DIST = \ + rhv-upload-precheck.py \ + rhv-upload-transfer.py \ + rhv-upload-vmcheck.py \ +- test-v2v-python-syntax.sh \ +- var_expander_tests.ml ++ test-v2v-python-syntax.sh + + SOURCES_MLI = \ + changeuid.mli \ +- create_json.mli \ + create_libvirt_xml.mli \ + openstack_image_properties.mli \ + output.mli \ + output_disk.mli \ + output_glance.mli \ +- output_json.mli \ + output_libvirt.mli \ + output_null.mli \ + output_openstack.mli \ +@@ -66,14 +63,11 @@ SOURCES_MLI = \ + output_rhv_upload_transfer_source.mli \ + output_rhv_upload_vmcheck_source.mli \ + python_script.mli \ +- qemuopts.mli \ +- var_expander.mli ++ qemuopts.mli + + SOURCES_ML = \ + changeuid.ml \ + python_script.ml \ +- var_expander.ml \ +- create_json.ml \ + create_libvirt_xml.ml \ + qemuopts.ml \ + openstack_image_properties.ml \ +@@ -87,7 +81,6 @@ SOURCES_ML = \ + output.ml \ + output_disk.ml \ + output_glance.ml \ +- output_json.ml \ + output_libvirt.ml \ + output_null.ml \ + output_openstack.ml \ +@@ -203,47 +196,9 @@ $(MLOUTPUT_CMA): $(OBJECTS) libmloutput.a + $(OCAMLFIND) mklib $(OCAMLPACKAGES) \ + $(OBJECTS) $(libmloutput_a_OBJECTS) -o mloutput + +-# Unit tests. +-TESTS = +-if HAVE_OCAML_PKG_OUNIT +-TESTS += \ +- var_expander_tests +-check_PROGRAMS = \ +- var_expander_tests +-endif +- +-var_expander_tests_BOBJECTS = \ +- var_expander.cmo \ +- var_expander_tests.cmo +-var_expander_tests_XOBJECTS = $(var_expander_tests_BOBJECTS:.cmo=.cmx) +- +-var_expander_tests_SOURCES = dummy.c +-var_expander_tests_CPPFLAGS = $(virt_v2v_CPPFLAGS) +-var_expander_tests_CFLAGS = $(virt_v2v_CFLAGS) +- +-if !HAVE_OCAMLOPT +-# Can't call this var_expander_tests_OBJECTS because automake gets confused. +-var_expander_tests_THEOBJECTS = $(var_expander_tests_BOBJECTS) +-var_expander_tests.cmo: OCAMLPACKAGES += -package ounit2 +-else +-var_expander_tests_THEOBJECTS = $(var_expander_tests_XOBJECTS) +-var_expander_tests.cmx: OCAMLPACKAGES += -package ounit2 +-endif +- +-var_expander_tests_DEPENDENCIES = \ +- $(var_expander_tests_THEOBJECTS) \ +- $(top_builddir)/common/mlpcre/mlpcre.$(MLARCHIVE) \ +- $(top_srcdir)/ocaml-link.sh +-var_expander_tests_LINK = \ +- $(top_srcdir)/ocaml-link.sh -cclib '$(OCAMLCLIBS)' -- \ +- $(OCAMLFIND) $(BEST) $(OCAMLFLAGS) \ +- $(OCAMLPACKAGES) -package ounit2 \ +- $(OCAMLLINKFLAGS) \ +- $(var_expander_tests_THEOBJECTS) -o $@ +- + # Unit tests. + TESTS_ENVIRONMENT = $(top_builddir)/run --test +-TESTS += test-v2v-python-syntax.sh ++TESTS = test-v2v-python-syntax.sh + + # Dependencies. + .depend: \ +diff --git a/output/create_json.ml b/output/create_json.ml +deleted file mode 100644 +index cbc27fdc..00000000 +--- a/output/create_json.ml ++++ /dev/null +@@ -1,338 +0,0 @@ +-(* virt-v2v +- * Copyright (C) 2019 Red Hat Inc. +- * +- * This program is free software; you can redistribute it and/or modify +- * it under the terms of the GNU General Public License as published by +- * the Free Software Foundation; either version 2 of the License, or +- * (at your option) any later version. +- * +- * This program is distributed in the hope that it will be useful, +- * but WITHOUT ANY WARRANTY; without even the implied warranty of +- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +- * GNU General Public License for more details. +- * +- * You should have received a copy of the GNU General Public License along +- * with this program; if not, write to the Free Software Foundation, Inc., +- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +- *) +- +-open Std_utils +-open C_utils +-open Tools_utils +- +-open Types +-open Utils +- +-module G = Guestfs +- +-let json_list_of_string_list = +- List.map (fun x -> JSON.String x) +- +-let json_list_of_string_string_list = +- List.map (fun (x, y) -> x, JSON.String y) +- +-let push_optional_string lst name = function +- | None -> () +- | Some v -> List.push_back lst (name, JSON.String v) +- +-let push_optional_int lst name = function +- | None -> () +- | Some v -> List.push_back lst (name, JSON.Int (Int64.of_int v)) +- +-let json_unknown_string = function +- | "unknown" -> JSON.Null +- | v -> JSON.String v +- +-let create_json_metadata source inspect +- { guestcaps; target_buses; target_firmware; target_nics } +- outdisk_name output_format output_name = +- let doc = ref [ +- "version", JSON.Int 1L; +- "name", JSON.String output_name; +- "memory", JSON.Int source.s_memory; +- "vcpu", JSON.Int (Int64.of_int source.s_vcpu); +- ] in +- +- (match source.s_genid with +- | None -> () +- | Some genid -> List.push_back doc ("genid", JSON.String genid) +- ); +- +- if source.s_cpu_vendor <> None || source.s_cpu_model <> None || +- source.s_cpu_topology <> None then ( +- let cpu = ref [] in +- +- push_optional_string cpu "vendor" source.s_cpu_vendor; +- push_optional_string cpu "model" source.s_cpu_model; +- (match source.s_cpu_topology with +- | None -> () +- | Some { s_cpu_sockets; s_cpu_cores; s_cpu_threads } -> +- let attrs = [ +- "sockets", JSON.Int (Int64.of_int s_cpu_sockets); +- "cores", JSON.Int (Int64.of_int s_cpu_cores); +- "threads", JSON.Int (Int64.of_int s_cpu_threads); +- ] in +- List.push_back cpu ("topology", JSON.Dict attrs) +- ); +- +- List.push_back doc ("cpu", JSON.Dict !cpu); +- ); +- +- let firmware = +- let firmware_type = +- match target_firmware with +- | TargetBIOS -> "bios" +- | TargetUEFI -> "uefi" in +- +- let fw = ref [ +- "type", JSON.String firmware_type; +- ] in +- +- (match target_firmware with +- | TargetBIOS -> () +- | TargetUEFI -> +- let uefi_firmware = find_uefi_firmware guestcaps.gcaps_arch in +- let flags = +- List.map ( +- function +- | Uefi.UEFI_FLAG_SECURE_BOOT_REQUIRED -> "secure_boot_required" +- ) uefi_firmware.Uefi.flags in +- +- let uefi = ref [ +- "code", JSON.String uefi_firmware.Uefi.code; +- "vars", JSON.String uefi_firmware.Uefi.vars; +- "flags", JSON.List (json_list_of_string_list flags); +- ] in +- +- push_optional_string uefi "code-debug" uefi_firmware.Uefi.code_debug; +- +- List.push_back fw ("uefi", JSON.Dict !uefi) +- ); +- +- !fw in +- List.push_back doc ("firmware", JSON.Dict firmware); +- +- List.push_back doc ("features", +- JSON.List (json_list_of_string_list source.s_features)); +- +- let machine = +- match guestcaps.gcaps_machine with +- | I440FX -> "pc" +- | Q35 -> "q35" +- | Virt -> "virt" in +- List.push_back doc ("machine", JSON.String machine); +- +- let disks, removables = +- let disks = ref [] +- and removables = ref [] in +- +- let iter_bus bus_name drive_prefix i = function +- | BusSlotEmpty -> () +- | BusSlotDisk d -> +- (* Find the corresponding target disk. *) +- let outdisk = outdisk_name d.s_disk_id in +- +- let disk = [ +- "dev", JSON.String (drive_prefix ^ drive_name i); +- "bus", JSON.String bus_name; +- "format", JSON.String output_format; +- "file", JSON.String outdisk; +- ] in +- +- List.push_back disks (JSON.Dict disk) +- +- | BusSlotRemovable { s_removable_type = CDROM } -> +- let cdrom = [ +- "type", JSON.String "cdrom"; +- "dev", JSON.String (drive_prefix ^ drive_name i); +- "bus", JSON.String bus_name; +- ] in +- +- List.push_back removables (JSON.Dict cdrom) +- +- | BusSlotRemovable { s_removable_type = Floppy } -> +- let floppy = [ +- "type", JSON.String "floppy"; +- "dev", JSON.String (drive_prefix ^ drive_name i); +- ] in +- +- List.push_back removables (JSON.Dict floppy) +- in +- +- Array.iteri (iter_bus "virtio" "vd") target_buses.target_virtio_blk_bus; +- Array.iteri (iter_bus "ide" "hd") target_buses.target_ide_bus; +- Array.iteri (iter_bus "scsi" "sd") target_buses.target_scsi_bus; +- Array.iteri (iter_bus "floppy" "fd") target_buses.target_floppy_bus; +- +- !disks, !removables in +- List.push_back doc ("disks", JSON.List disks); +- List.push_back doc ("removables", JSON.List removables); +- +- let nics = +- List.map ( +- fun { s_mac = mac; s_vnet_type = vnet_type; s_nic_model = nic_model; +- s_vnet = vnet; } -> +- let vnet_type_str = +- match vnet_type with +- | Bridge -> "bridge" +- | Network -> "network" in +- +- let nic = ref [ +- "vnet", JSON.String vnet; +- "vnet-type", JSON.String vnet_type_str; +- ] in +- +- let nic_model_str = Option.map string_of_nic_model nic_model in +- push_optional_string nic "model" nic_model_str; +- +- push_optional_string nic "mac" mac; +- +- JSON.Dict !nic +- ) target_nics in +- List.push_back doc ("nics", JSON.List nics); +- +- let guestcaps_dict = +- let block_bus = +- match guestcaps.gcaps_block_bus with +- | Virtio_blk -> "virtio-blk" +- | IDE -> "ide" in +- let net_bus = +- match guestcaps.gcaps_net_bus with +- | Virtio_net -> "virtio-net" +- | E1000 -> "e1000" +- | RTL8139 -> "rtl8139" in +- let video = "vga" in +- let machine = +- match guestcaps.gcaps_machine with +- | I440FX -> "i440fx" +- | Q35 -> "q35" +- | Virt -> "virt" in +- +- [ +- "block-bus", JSON.String block_bus; +- "net-bus", JSON.String net_bus; +- "video", JSON.String video; +- "machine", JSON.String machine; +- "arch", JSON.String guestcaps.gcaps_arch; +- "virtio-rng", JSON.Bool guestcaps.gcaps_virtio_rng; +- "virtio-balloon", JSON.Bool guestcaps.gcaps_virtio_balloon; +- "isa-pvpanic", JSON.Bool guestcaps.gcaps_isa_pvpanic; +- "virtio-socket", JSON.Bool guestcaps.gcaps_virtio_socket; +- "acpi", JSON.Bool guestcaps.gcaps_acpi; +- "virtio-1-0", JSON.Bool guestcaps.gcaps_virtio_1_0; +- ] in +- List.push_back doc ("guestcaps", JSON.Dict guestcaps_dict); +- +- (match source.s_sound with +- | None -> () +- | Some { s_sound_model = model } -> +- let sound = [ +- "model", JSON.String (string_of_source_sound_model model); +- ] in +- List.push_back doc ("sound", JSON.Dict sound) +- ); +- +- (match source.s_display with +- | None -> () +- | Some d -> +- let display_type = +- match d.s_display_type with +- | Window -> "window" +- | VNC -> "vnc" +- | Spice -> "spice" in +- +- let display = ref [ +- "type", JSON.String display_type; +- ] in +- +- push_optional_string display "keymap" d.s_keymap; +- push_optional_string display "password" d.s_password; +- +- let listen = +- match d.s_listen with +- | LNoListen -> None +- | LAddress address -> +- Some [ +- "type", JSON.String "address"; +- "address", JSON.String address; +- ] +- | LNetwork network -> +- Some [ +- "type", JSON.String "network"; +- "network", JSON.String network; +- ] +- | LSocket None -> +- Some [ +- "type", JSON.String "socket"; +- "socket", JSON.Null; +- ] +- | LSocket (Some socket) -> +- Some [ +- "type", JSON.String "socket"; +- "socket", JSON.String socket; +- ] +- | LNone -> +- Some [ +- "type", JSON.String "none"; +- ] in +- (match listen with +- | None -> () +- | Some l -> List.push_back display ("listen", JSON.Dict l) +- ); +- +- push_optional_int display "port" d.s_port; +- +- List.push_back doc ("display", JSON.Dict !display) +- ); +- +- let inspect_dict = +- let apps = +- List.map ( +- fun { G.app2_name = name; app2_display_name = display_name; +- app2_epoch = epoch; app2_version = version; +- app2_release = release; app2_arch = arch; } -> +- JSON.Dict [ +- "name", JSON.String name; +- "display-name", JSON.String display_name; +- "epoch", JSON.Int (Int64.of_int32 epoch); +- "version", JSON.String version; +- "release", JSON.String release; +- "arch", JSON.String arch; +- ] +- ) inspect.i_apps in +- +- let firmware_dict = +- match inspect.i_firmware with +- | I_BIOS -> +- [ +- "type", JSON.String "bios"; +- ] +- | I_UEFI devices -> +- [ +- "type", JSON.String "uefi"; +- "devices", JSON.List (json_list_of_string_list devices); +- ] in +- +- [ +- "root", JSON.String inspect.i_root; +- "type", JSON.String inspect.i_type; +- "distro", json_unknown_string inspect.i_distro; +- "osinfo", json_unknown_string inspect.i_osinfo; +- "arch", JSON.String inspect.i_arch; +- "major-version", JSON.Int (Int64.of_int inspect.i_major_version); +- "minor-version", JSON.Int (Int64.of_int inspect.i_minor_version); +- "package-format", json_unknown_string inspect.i_package_format; +- "package-management", json_unknown_string inspect.i_package_management; +- "product-name", json_unknown_string inspect.i_product_name; +- "product-variant", json_unknown_string inspect.i_product_variant; +- "mountpoints", JSON.Dict (json_list_of_string_string_list inspect.i_mountpoints); +- "applications", JSON.List apps; +- "windows-systemroot", JSON.String inspect.i_windows_systemroot; +- "windows-software-hive", JSON.String inspect.i_windows_software_hive; +- "windows-system-hive", JSON.String inspect.i_windows_system_hive; +- "windows-current-control-set", JSON.String inspect.i_windows_current_control_set; +- "firmware", JSON.Dict firmware_dict; +- ] in +- List.push_back doc ("inspect", JSON.Dict inspect_dict); +- +- !doc +diff --git a/output/create_json.mli b/output/create_json.mli +deleted file mode 100644 +index 97086ff5..00000000 +--- a/output/create_json.mli ++++ /dev/null +@@ -1,27 +0,0 @@ +-(* virt-v2v +- * Copyright (C) 2019 Red Hat Inc. +- * +- * This program is free software; you can redistribute it and/or modify +- * it under the terms of the GNU General Public License as published by +- * the Free Software Foundation; either version 2 of the License, or +- * (at your option) any later version. +- * +- * This program is distributed in the hope that it will be useful, +- * but WITHOUT ANY WARRANTY; without even the implied warranty of +- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +- * GNU General Public License for more details. +- * +- * You should have received a copy of the GNU General Public License along +- * with this program; if not, write to the Free Software Foundation, Inc., +- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +- *) +- +-(** Create JSON metadata for [-o json]. *) +- +-val create_json_metadata : Types.source -> Types.inspect -> +- Types.target_meta -> +- (int -> string) -> string -> string -> +- JSON.doc +-(** [create_json_metadata source targets outdisk_map output_format output_name] +- creates the JSON with the majority of the data that virt-v2v used for the +- conversion. *) +diff --git a/output/output_json.ml b/output/output_json.ml +deleted file mode 100644 +index 6e81b639..00000000 +--- a/output/output_json.ml ++++ /dev/null +@@ -1,153 +0,0 @@ +-(* virt-v2v +- * Copyright (C) 2009-2021 Red Hat Inc. +- * +- * This program is free software; you can redistribute it and/or modify +- * it under the terms of the GNU General Public License as published by +- * the Free Software Foundation; either version 2 of the License, or +- * (at your option) any later version. +- * +- * This program is distributed in the hope that it will be useful, +- * but WITHOUT ANY WARRANTY; without even the implied warranty of +- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +- * GNU General Public License for more details. +- * +- * You should have received a copy of the GNU General Public License along +- * with this program; if not, write to the Free Software Foundation, Inc., +- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +- *) +- +-open Printf +-open Unix +- +-open C_utils +-open Std_utils +-open Tools_utils +-open Common_gettext.Gettext +- +-open Types +-open Utils +- +-open Output +- +-module Json = struct +- type poptions = string * Types.output_allocation * string * string * string +- +- type t = unit +- +- let to_string options = +- "-o json" ^ +- match options.output_storage with +- | Some os -> " -os " ^ os +- | None -> "" +- +- let query_output_options () = +- printf (f_"Output options (-oo) which can be used with -o json: +- +- -oo json-disks-pattern=PATTERN Pattern for the disks. +-") +- +- let parse_options options source = +- if options.output_conn <> None then +- error_option_cannot_be_used_in_output_mode "json" "-oc"; +- if options.output_password <> None then +- error_option_cannot_be_used_in_output_mode "json" "-op"; +- +- let known_pattern_variables = ["DiskNo"; "DiskDeviceName"; "GuestName"] in +- let json_disks_pattern = ref None in +- List.iter ( +- fun (k, v) -> +- match k with +- | "json-disks-pattern" -> +- if !json_disks_pattern <> None then +- error (f_"-o json: -oo json-disks-pattern set more than once"); +- let vars = +- try Var_expander.scan_variables v +- with Var_expander.Invalid_variable var -> +- error (f_"-o json: -oo json-disks-pattern: invalid variable %%{%s}") +- var in +- List.iter ( +- fun var -> +- if not (List.mem var known_pattern_variables) then +- error (f_"-o json: -oo json-disks-pattern: unhandled variable %%{%s}") +- var +- ) vars; +- json_disks_pattern := Some v +- | k -> +- error (f_"-o json: unknown output option ‘-oo %s’") k +- ) options.output_options; +- +- let json_disks_pattern = +- Option.default "%{GuestName}-%{DiskDeviceName}" !json_disks_pattern in +- +- (* -os must be set to a directory. *) +- let output_storage = +- match options.output_storage with +- | None -> +- error (f_"-o json: output directory was not specified, use '-os /dir'") +- | Some d when not (is_directory d) -> +- error (f_"-os %s: output directory does not exist or is not a directory") d +- | Some d -> d in +- +- let output_name = Option.default source.s_name options.output_name in +- +- (json_disks_pattern, +- options.output_alloc, options.output_format, output_name, output_storage) +- +- let rec setup dir options source = +- let disks = get_disks dir in +- let json_disks_pattern, +- output_alloc, output_format, output_name, +- output_storage = options in +- +- List.iter ( +- fun (i, size) -> +- let socket = sprintf "%s/out%d" dir i in +- On_exit.unlink socket; +- +- (* Create the actual output disk. *) +- let outdisk = json_path output_storage output_name +- json_disks_pattern i in +- mkdir_p (Filename.dirname outdisk) 0o755; +- +- output_to_local_file output_alloc output_format outdisk size socket +- ) disks +- +- (* For -o json, return the output disk name of the i'th disk. *) +- and json_path os output_name json_disks_pattern i = +- let outname = +- let vars_fn = function +- | "DiskNo" -> Some (string_of_int (i+1)) +- | "DiskDeviceName" -> Some (sprintf "sd%s" (drive_name i)) +- | "GuestName" -> Some output_name +- | _ -> assert false +- in +- Var_expander.replace_fn json_disks_pattern vars_fn in +- let outdisk = os // outname in +- let outdisk = absolute_path outdisk in +- outdisk +- +- let finalize dir options () source inspect target_meta = +- let json_disks_pattern, +- output_alloc, output_format, output_name, output_storage = options in +- +- let doc = +- Create_json.create_json_metadata source inspect target_meta +- (json_path output_storage output_name json_disks_pattern) +- output_format output_name in +- let doc_string = JSON.string_of_doc ~fmt:JSON.Indented doc in +- +- if verbose () then ( +- eprintf "resulting JSON:\n"; +- output_string Stdlib.stderr doc_string; +- eprintf "\n\n%!"; +- ); +- +- let file = output_storage // output_name ^ ".json" in +- with_open_out file ( +- fun chan -> +- output_string chan doc_string; +- output_char chan '\n' +- ) +- +- let request_size = None +-end +diff --git a/output/output_json.mli b/output/output_json.mli +deleted file mode 100644 +index 00786ef7..00000000 +--- a/output/output_json.mli ++++ /dev/null +@@ -1,21 +0,0 @@ +-(* virt-v2v +- * Copyright (C) 2009-2021 Red Hat Inc. +- * +- * This program is free software; you can redistribute it and/or modify +- * it under the terms of the GNU General Public License as published by +- * the Free Software Foundation; either version 2 of the License, or +- * (at your option) any later version. +- * +- * This program is distributed in the hope that it will be useful, +- * but WITHOUT ANY WARRANTY; without even the implied warranty of +- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +- * GNU General Public License for more details. +- * +- * You should have received a copy of the GNU General Public License along +- * with this program; if not, write to the Free Software Foundation, Inc., +- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +- *) +- +-(** [-o json] output mode. *) +- +-module Json : Output.OUTPUT +diff --git a/output/var_expander.ml b/output/var_expander.ml +deleted file mode 100644 +index 24b9bafe..00000000 +--- a/output/var_expander.ml ++++ /dev/null +@@ -1,72 +0,0 @@ +-(* virt-v2v +- * Copyright (C) 2019 Red Hat Inc. +- * +- * This program is free software; you can redistribute it and/or modify +- * it under the terms of the GNU General Public License as published by +- * the Free Software Foundation; either version 2 of the License, or +- * (at your option) any later version. +- * +- * This program is distributed in the hope that it will be useful, +- * but WITHOUT ANY WARRANTY; without even the implied warranty of +- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +- * GNU General Public License for more details. +- * +- * You should have received a copy of the GNU General Public License along +- * with this program; if not, write to the Free Software Foundation, Inc., +- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +- *) +- +-open Std_utils +- +-exception Invalid_variable of string +- +-let var_re = PCRE.compile "(^|[^%])%{([^}]+)}" +- +-let check_variable var = +- String.iter ( +- function +- | '0'..'9' +- | 'a'..'z' +- | 'A'..'Z' +- | '_' +- | '-' -> () +- | _ -> raise (Invalid_variable var) +- ) var +- +-let scan_variables str = +- let res = ref [] in +- let offset = ref 0 in +- while PCRE.matches ~offset:!offset var_re str; do +- let var = PCRE.sub 2 in +- check_variable var; +- let _, end_ = PCRE.subi 0 in +- List.push_back res var; +- offset := end_ +- done; +- List.remove_duplicates !res +- +-let replace_fn str fn = +- let res = ref str in +- let offset = ref 0 in +- while PCRE.matches ~offset:!offset var_re !res; do +- let var = PCRE.sub 2 in +- check_variable var; +- let start_, end_ = PCRE.subi 0 in +- match fn var with +- | None -> +- offset := end_ +- | Some text -> +- let prefix_len = +- let prefix_start, prefix_end = PCRE.subi 1 in +- prefix_end - prefix_start in +- res := (String.sub !res 0 (start_ + prefix_len)) ^ text ^ (String.sub !res end_ (String.length !res - end_)); +- offset := start_ + prefix_len + String.length text +- done; +- !res +- +-let replace_list str lst = +- let fn var = +- try Some (List.assoc var lst) +- with Not_found -> None +- in +- replace_fn str fn +diff --git a/output/var_expander.mli b/output/var_expander.mli +deleted file mode 100644 +index 80aa33c2..00000000 +--- a/output/var_expander.mli ++++ /dev/null +@@ -1,82 +0,0 @@ +-(* virt-v2v +- * Copyright (C) 2019 Red Hat Inc. +- * +- * This program is free software; you can redistribute it and/or modify +- * it under the terms of the GNU General Public License as published by +- * the Free Software Foundation; either version 2 of the License, or +- * (at your option) any later version. +- * +- * This program is distributed in the hope that it will be useful, +- * but WITHOUT ANY WARRANTY; without even the implied warranty of +- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +- * GNU General Public License for more details. +- * +- * You should have received a copy of the GNU General Public License along +- * with this program; if not, write to the Free Software Foundation, Inc., +- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +- *) +- +-(** Simple variable expander. +- +- This module provides the support to expand variables in strings, +- specified in the form of [%{name}]. +- +- For example: +- +-{v +-let str = "variable-%{INDEX} in %{INDEX} replaced %{INDEX} times" +-let index = ref 0 +-let fn = function +- | "INDEX" -> +- incr index; +- Some (string_of_int !index) +- | _ -> None +-in +-let str = Var_expander.replace_fn str fn +-(* now str is "variable-1 in 2 replaced 3 times" *) +-v} +- +- The names of variables can contain only ASCII letters (uppercase, +- and lowercase), digits, underscores, and dashes. +- +- The replacement is done in a single pass: this means that if a +- variable is replaced with the text of a variable, that new text +- is kept as is in the final output. In practice: +- +-{v +-let str = "%{VAR}" +-let str = Var_expander.replace_list str [("VAR", "%{VAR}")] +-(* now str is "%{VAR}" *) +-v} +-*) +- +-exception Invalid_variable of string +-(** Invalid variable name error. +- +- In case a variable contains characters not allowed, then this +- exception with the actual unacceptable variable. *) +- +-val scan_variables : string -> string list +-(** Scan the pattern string for all the variables available. +- +- This can raise {!Invalid_variable} in case there are invalid +- variable names. *) +- +-val replace_fn : string -> (string -> string option) -> string +-(** Replaces a string expanding all the variables. +- +- The replacement function specify how a variable is replaced; +- if [None] is returned, then that variable is not replaced. +- +- This can raise {!Invalid_variable} in case there are invalid +- variable names. *) +- +-val replace_list : string -> (string * string) list -> string +-(** Replaces a string expanding all the variables. +- +- The replacement list specify how a variable is replaced; +- if it is not specified in the list, then that variable is not +- replaced. +- +- This can raise {!Invalid_variable} in case there are invalid +- variable names. *) +diff --git a/output/var_expander_tests.ml b/output/var_expander_tests.ml +deleted file mode 100644 +index 35b62836..00000000 +--- a/output/var_expander_tests.ml ++++ /dev/null +@@ -1,113 +0,0 @@ +-(* virt-v2v +- * Copyright (C) 2019 Red Hat Inc. +- * +- * This program is free software; you can redistribute it and/or modify +- * it under the terms of the GNU General Public License as published by +- * the Free Software Foundation; either version 2 of the License, or +- * (at your option) any later version. +- * +- * This program is distributed in the hope that it will be useful, +- * but WITHOUT ANY WARRANTY; without even the implied warranty of +- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +- * GNU General Public License for more details. +- * +- * You should have received a copy of the GNU General Public License along +- * with this program; if not, write to the Free Software Foundation, Inc., +- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +- *) +- +-open Printf +-open OUnit +- +-open Std_utils +- +-let assert_equal_string = assert_equal ~printer:identity +-let assert_equal_stringlist = assert_equal ~printer:(fun x -> "(" ^ (String.escaped (String.concat "," x)) ^ ")") +- +-let replace_none_fn _ = None +-let replace_empty_fn _ = Some "" +- +-let test_no_replacement () = +- assert_equal_string "" (Var_expander.replace_fn "" replace_none_fn); +- assert_equal_string "x" (Var_expander.replace_fn "x" replace_none_fn); +- assert_equal_string "%{}" (Var_expander.replace_fn "%{}" replace_none_fn); +- assert_equal_string "%{EMPTY}" (Var_expander.replace_fn "%{EMPTY}" replace_none_fn); +- assert_equal_string "%{EMPTY} %{no}" (Var_expander.replace_fn "%{EMPTY} %{no}" replace_none_fn); +- assert_equal_string "a %{EMPTY} b" (Var_expander.replace_fn "a %{EMPTY} b" replace_none_fn); +- () +- +-let test_replacements () = +- assert_equal_string "" (Var_expander.replace_fn "%{EMPTY}" replace_empty_fn); +- assert_equal_string "x " (Var_expander.replace_fn "x %{EMPTY}" replace_empty_fn); +- assert_equal_string "xy" (Var_expander.replace_fn "x%{EMPTY}y" replace_empty_fn); +- assert_equal_string "x<->y" (Var_expander.replace_fn "x%{FOO}y" (function | "FOO" -> Some "<->" | _ -> None)); +- assert_equal_string "a x b" (Var_expander.replace_fn "a %{FOO} b" (function | "FOO" -> Some "x" | _ -> None)); +- assert_equal_string "%{FOO} x" (Var_expander.replace_fn "%{FOO} %{BAR}" (function | "BAR" -> Some "x" | _ -> None)); +- assert_equal_string "%{FOO}" (Var_expander.replace_fn "%{BAR}" (function | "BAR" -> Some "%{FOO}" | _ -> None)); +- assert_equal_string "%{FOO} x" (Var_expander.replace_fn "%{BAR} %{FOO}" (function | "BAR" -> Some "%{FOO}" | "FOO" -> Some "x" | _ -> None)); +- begin +- let str = "%{INDEX}, %{INDEX}, %{INDEX}" in +- let index = ref 0 in +- let fn = function +- | "INDEX" -> +- incr index; +- Some (string_of_int !index) +- | _ -> None +- in +- assert_equal_string "1, 2, 3" (Var_expander.replace_fn str fn) +- end; +- () +- +-let test_escape () = +- assert_equal_string "%%{FOO}" (Var_expander.replace_fn "%%{FOO}" replace_empty_fn); +- assert_equal_string "x %%{FOO} x" (Var_expander.replace_fn "%{FOO} %%{FOO} %{FOO}" (function | "FOO" -> Some "x" | _ -> None)); +- () +- +-let test_list () = +- assert_equal_string "x %{NONE}" (Var_expander.replace_list "%{FOO} %{NONE}" [("FOO", "x")]); +- () +- +-let test_scan_variables () = +- let assert_invalid_variable var = +- let str = "%{" ^ var ^ "}" in +- assert_raises (Var_expander.Invalid_variable var) +- (fun () -> Var_expander.scan_variables str) +- in +- assert_equal_stringlist [] (Var_expander.scan_variables ""); +- assert_equal_stringlist [] (Var_expander.scan_variables "foo"); +- assert_equal_stringlist ["FOO"] (Var_expander.scan_variables "%{FOO}"); +- assert_equal_stringlist ["FOO"; "BAR"] (Var_expander.scan_variables "%{FOO} %{BAR}"); +- assert_equal_stringlist ["FOO"; "BAR"] (Var_expander.scan_variables "%{FOO} %{BAR} %{FOO}"); +- assert_equal_stringlist ["FOO"; "BAR"] (Var_expander.scan_variables "%{FOO} %%{ESCAPED} %{BAR}"); +- assert_invalid_variable "FOO/BAR"; +- () +- +-let test_errors () = +- let assert_invalid_variable var = +- let str = "%{" ^ var ^ "}" in +- assert_raises (Var_expander.Invalid_variable var) +- (fun () -> Var_expander.replace_fn str replace_none_fn) +- in +- assert_invalid_variable "FOO/BAR"; +- assert_invalid_variable "FOO:BAR"; +- assert_invalid_variable "FOO(BAR"; +- assert_invalid_variable "FOO)BAR"; +- assert_invalid_variable "FOO@BAR"; +- () +- +-(* Suites declaration. *) +-let suite = +- TestList ([ +- "basic" >::: [ +- "no_replacement" >:: test_no_replacement; +- "replacements" >:: test_replacements; +- "escape" >:: test_escape; +- "list" >:: test_list; +- "scan_variables" >:: test_scan_variables; +- "errors" >:: test_errors; +- ]; +- ]) +- +-let () = +- ignore (run_test_tt_main suite); +- Printf.fprintf stderr "\n" +diff --git a/tests/Makefile.am b/tests/Makefile.am +index 4b66cb0d..29afd415 100644 +--- a/tests/Makefile.am ++++ b/tests/Makefile.am +@@ -82,7 +82,6 @@ TESTS = \ + test-v2v-machine-readable.sh \ + test-v2v-networks-and-bridges.sh \ + test-v2v-o-glance.sh \ +- test-v2v-o-json.sh \ + test-v2v-o-libvirt.sh \ + test-v2v-o-null.sh \ + test-v2v-o-openstack.sh \ +@@ -228,7 +227,6 @@ EXTRA_DIST += \ + test-v2v-networks-and-bridges.sh \ + test-v2v-networks-and-bridges-expected.xml \ + test-v2v-o-glance.sh \ +- test-v2v-o-json.sh \ + test-v2v-o-libvirt.sh \ + test-v2v-o-null.sh \ + test-v2v-o-openstack.sh \ +diff --git a/tests/test-v2v-o-json.sh b/tests/test-v2v-o-json.sh +deleted file mode 100755 +index 15e7ad5a..00000000 +--- a/tests/test-v2v-o-json.sh ++++ /dev/null +@@ -1,68 +0,0 @@ +-#!/bin/bash - +-# libguestfs virt-v2v test script +-# Copyright (C) 2019 Red Hat Inc. +-# +-# This program is free software; you can redistribute it and/or modify +-# it under the terms of the GNU General Public License as published by +-# the Free Software Foundation; either version 2 of the License, or +-# (at your option) any later version. +-# +-# This program is distributed in the hope that it will be useful, +-# but WITHOUT ANY WARRANTY; without even the implied warranty of +-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-# GNU General Public License for more details. +-# +-# You should have received a copy of the GNU General Public License +-# along with this program; if not, write to the Free Software +-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +- +-# Test -o json. +- +-set -e +-set -x +- +-source ./functions.sh +-set -e +-set -x +- +-skip_if_skipped +-requires test -f ../test-data/phony-guests/windows.img +-requires jq --version +- +-libvirt_uri="test://$abs_top_builddir/test-data/phony-guests/guests.xml" +- +-export VIRT_TOOLS_DATA_DIR="$srcdir/../test-data/fake-virt-tools" +- +-guestname=windows +- +-d=test-v2v-o-json.d +-rm -rf $d +-cleanup_fn rm -r $d +-mkdir $d +- +-json=$d/$guestname.json +-disk=$d/$guestname-sda +- +-$VG virt-v2v --debug-gc \ +- -i libvirt -ic "$libvirt_uri" windows \ +- -o json -os $d -on $guestname +- +-# Test the disk was created. +-test -f $disk +- +-# Test the JSON. +-test x$(jq -r '.name' $json) = xwindows +-test x$(jq -r '.inspect.type' $json) = xwindows +-test x$(jq -r '.inspect.distro' $json) = xwindows +-test $(jq -r '.disks | length' $json) -eq 1 +-test $(jq -r '.disks[0].file' $json) = $(realpath $disk) +-test $(jq -r '.nics | length' $json) -eq 1 +-test $(jq -r '.removables | length' $json) -eq 0 +- +-# libguestfs 1.40 didn't have osinfo inspection data, but we want this +-# test to work with 1.40, so ignore if jq returns this field as +-# "null". +-osinfo=$(jq -r '.inspect.osinfo' $json) +-if [ "x$osinfo" != "xnull" ]; then +- test x$osinfo = xwin7 +-fi +diff --git a/v2v/v2v.ml b/v2v/v2v.ml +index e00f9814..994982ac 100644 +--- a/v2v/v2v.ml ++++ b/v2v/v2v.ml +@@ -194,7 +194,6 @@ let rec main () = + match mode with + | "libvirt" -> output_mode := `Libvirt + | "disk" | "local" -> output_mode := `Disk +- | "json" -> output_mode := `JSON + | "null" -> output_mode := `Null + | "openstack" | "osp" | "rhosp" -> output_mode := `Openstack + | "ovirt" | "rhv" | "rhev" -> output_mode := `RHV +@@ -241,7 +240,7 @@ let rec main () = + s_"Map network ‘in’ to ‘out’"; + [ L"no-trim" ], Getopt.String ("-", no_trim_warning), + s_"Ignored for backwards compatibility"; +- [ S 'o' ], Getopt.String ("json|libvirt|local|null|openstack|qemu|rhv|rhv-upload|vdsm", set_output_mode), ++ [ S 'o' ], Getopt.String ("libvirt|local|null|openstack|qemu|rhv|rhv-upload|vdsm", set_output_mode), + s_"Set output mode (default: libvirt)"; + [ M"oa" ], Getopt.String ("sparse|preallocated", set_output_alloc), + s_"Set output allocation mode"; +@@ -376,7 +375,6 @@ read the man page virt-v2v(1). + pr "input:libvirtxml\n"; + pr "input:ova\n"; + pr "input:vmx\n"; +- pr "output:json\n"; + pr "output:libvirt\n"; + pr "output:local\n"; + pr "output:null\n"; +@@ -472,8 +470,7 @@ read the man page virt-v2v(1). + | `Openstack -> (module Output_openstack.Openstack) + | `RHV_Upload -> (module Output_rhv_upload.RHVUpload) + | `RHV -> (module Output_rhv.RHV) +- | `VDSM -> (module Output_vdsm.VDSM) +- | `JSON -> (module Output_json.Json) in ++ | `VDSM -> (module Output_vdsm.VDSM) in + + let output_options = { + Output.output_alloc = output_alloc; +-- +2.31.1 + diff --git a/0012-tests-Add-NVMe-test-cases-to-EXTRA_DIST.patch b/0012-tests-Add-NVMe-test-cases-to-EXTRA_DIST.patch new file mode 100644 index 0000000..0cad283 --- /dev/null +++ b/0012-tests-Add-NVMe-test-cases-to-EXTRA_DIST.patch @@ -0,0 +1,34 @@ +From 0bcbd9783fa0a16fd5f58c01303f6c7dbe491fd6 Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Tue, 12 Apr 2022 11:49:51 +0100 +Subject: [PATCH] tests: Add NVMe test cases to EXTRA_DIST + +Found by running make dist && make maintainer-check-extra-dist + +Fixes: commit 75872bf282d7f2322110caca70963717b43806b1 +(cherry picked from commit 2f6ce86474829974fdda68b1cc03a76c2652878d) +--- + tests/Makefile.am | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/tests/Makefile.am b/tests/Makefile.am +index 29afd415..f02ac8ee 100644 +--- a/tests/Makefile.am ++++ b/tests/Makefile.am +@@ -214,11 +214,13 @@ EXTRA_DIST += \ + test-v2v-i-vmx-3.expected \ + test-v2v-i-vmx-4.expected \ + test-v2v-i-vmx-5.expected \ ++ test-v2v-i-vmx-6.expected \ + test-v2v-i-vmx-1.vmx \ + test-v2v-i-vmx-2.vmx \ + test-v2v-i-vmx-3.vmx \ + test-v2v-i-vmx-4.vmx \ + test-v2v-i-vmx-5.vmx \ ++ test-v2v-i-vmx-6.vmx \ + test-v2v-in-place.sh \ + test-v2v-it-vddk-io-query.sh \ + test-v2v-machine-readable.sh \ +-- +2.31.1 + diff --git a/0013-output-Remove-unused-dummy.c.patch b/0013-output-Remove-unused-dummy.c.patch new file mode 100644 index 0000000..86561f5 --- /dev/null +++ b/0013-output-Remove-unused-dummy.c.patch @@ -0,0 +1,30 @@ +From 4844b986e88d00e6372aa38f3dbbbc886c6bfa1f Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Tue, 12 Apr 2022 11:53:45 +0100 +Subject: [PATCH] output: Remove unused dummy.c +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This was removed when I removed -o json support, but I did not delete +the file from git. “make maintainer-check-extra-dist” complained +about this. + +Fixes: commit 4e6b389b4e27c8d13e57fcaf777d96ad7e08650b +(cherry picked from commit 0a1286df1725560e2789134d12022fc52572f9b0) +--- + output/dummy.c | 2 -- + 1 file changed, 2 deletions(-) + delete mode 100644 output/dummy.c + +diff --git a/output/dummy.c b/output/dummy.c +deleted file mode 100644 +index ebab6198..00000000 +--- a/output/dummy.c ++++ /dev/null +@@ -1,2 +0,0 @@ +-/* Dummy source, to be used for OCaml-based tools with no C sources. */ +-enum { foo = 1 }; +-- +2.31.1 + diff --git a/sources b/sources index 9432f8c..e154a8f 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (virt-v2v-2.0.2.tar.gz) = 63a198e407df47dc4afffeb147453449e36d9f82952fef5af490888f8708a44f3a75d1dcd233e2a1fe9b58715f61a9875dac9c406a1fced08da6574bf577ffe9 -SHA512 (virt-v2v-2.0.2.tar.gz.sig) = 6dc0da82c92243fc11071c569dd49a11a035589722a00b5a7d592f2266ba30eb7ded02746bfd6a88f1cb78d116ac1f6f4de5708f3bd226b9585fd7e0bbe02e05 +SHA512 (virt-v2v-2.0.3.tar.gz) = 741ab3557d88ce7e6d5c79ba8e158d6f3cf686cf36462deea875405dfd7a869abde898a8bf532c515b4cff9f4bc7271fa4b6fa2153c4e4196aa0a5b6a891c54d +SHA512 (virt-v2v-2.0.3.tar.gz.sig) = eaedff6e7e827ffd2c42b1495b405ceb53578b09dba75136420b1b114781e200c2812562eb7d09ddc81c41d24debf5293a4d5f9977328b86946934a889e79cea diff --git a/virt-v2v.spec b/virt-v2v.spec index 0a0743f..ade953e 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -15,7 +15,7 @@ Name: virt-v2v Epoch: 1 -Version: 2.0.2 +Version: 2.0.3 Release: 1%{?dist} Summary: Convert a virtual machine to run on KVM @@ -42,6 +42,10 @@ Patch0006: 0006-RHEL-v2v-do-not-mention-SUSE-Xen-hosts-RHBZ-1430203.patch Patch0007: 0007-RHEL-point-to-KB-for-supported-v2v-hypervisors-guest.patch Patch0008: 0008-RHEL-Disable-o-glance.patch Patch0009: 0009-RHEL-Remove-the-in-place-option.patch +Patch0010: 0010-input-i-vmx-Add-support-for-NVMe-devices.patch +Patch0011: 0011-output-Remove-o-json-mode.patch +Patch0012: 0012-tests-Add-NVMe-test-cases-to-EXTRA_DIST.patch +Patch0013: 0013-output-Remove-unused-dummy.c.patch %if !0%{?rhel} # libguestfs hasn't been built on i686 for a while since there is no @@ -315,13 +319,25 @@ rm $RPM_BUILD_ROOT%{_mandir}/man1/virt-v2v-in-place.1* %changelog -* Mon Apr 04 2022 Richard W.M. Jones - 1:2.0.2-1 -- Rebase to stable branch version 2.0.2 +* Tue Apr 12 2022 Richard W.M. Jones - 1:2.0.3-1 +- Rebase to stable branch version 2.0.3 resolves: rhbz#2059287, rhbz#1658126, rhbz#1788823, rhbz#1854275 - Fix openssh-clients dependency resolves: rhbz#2064178 - Fix security issue when running virt-v2v as root resolves: rhbz#2066773 +- Remove -o json mode + resolves: rhbz#2074026 +- Allow conversion of guests with NVMe drives from VMX files + resolves: rhbz#2070530 +- Cleanly reject guests with snapshots when using -it ssh + resolves: rhbz#1774386 +- Document that vmx+ssh "-ip" auth doesn't cover ssh / scp shell commands + resolves: rhbz#1854275 +- Fix conversion if swap partition isn't encrypted with root directory + resolves: rhbz#1658128 +- Document permissions when importing OVA using RHV UI + resolves: rhbz#2039597 * Tue Feb 15 2022 Richard W.M. Jones - 1:1.45.99-1 - Rebase to upstream 1.45.99.