Bug 2041850 - Can not specify '-oo json-disks-pattern' in '-o json' mode
Summary: Can not specify '-oo json-disks-pattern' in '-o json' mode
Keywords:
Status: CLOSED ERRATA
Alias: None
Deadline: 2022-02-14
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: virt-v2v
Version: 9.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: rc
: ---
Assignee: Richard W.M. Jones
QA Contact: tingting zheng
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-01-18 11:32 UTC by Xiaodai Wang
Modified: 2022-05-17 13:43 UTC (History)
7 users (show)

Fixed In Version: virt-v2v-1.45.97-1.el9
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-05-17 13:41:56 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-108442 0 None None None 2022-01-18 11:36:07 UTC
Red Hat Product Errata RHEA-2022:2566 0 None None None 2022-05-17 13:42:10 UTC

Description Xiaodai Wang 2022-01-18 11:32:02 UTC
Description of problem:
Can not specify '-oo json-disks-pattern' in '-o json' mode

Version-Release number of selected component (if applicable):
virt-v2v-1.45.96-1.el9.x86_64

How reproducible:
100%

Steps to Reproduce:
# virt-v2v -i libvirt -ic esx://root.x.x/?no_verify=1 -o json -of raw -os /var/lib/libvirt/images/v2v_json -oo json-disks-pattern=disk%{DiskNo}.img  Auto-esx6.7-win2019-efi-secure-boot -it vddk -io vddk-libdir=/root/vddk_libdir/latest -io vddk-thumbprint=xxx -on Auto-esx6.7-win2019-efi-secure-bootg6iQ -ip /root/v2v_esx_passwd 
[   1.6] Opening the source
[   9.0] Inspecting the source
[  18.7] Checking for sufficient free disk space in the guest
[  18.7] Converting Windows Server 2019 Standard to run on KVM
virt-v2v: This guest has virtio drivers installed.
[  39.6] Mapping filesystem data to avoid copying unused and blank areas
[  42.1] Closing the overlay
[  42.4] Assigning disks to buses
[  42.4] Checking if the guest needs BIOS or UEFI to boot
virt-v2v: This guest requires UEFI on the target to boot.
virt-v2v: error: no -oo (output options) are allowed here

If reporting bugs, run virt-v2v with debugging enabled and include the 
complete output:

  virt-v2v -v -x [...]

Actual results:
As description.

Expected results:
The command should work as in rhel8. 
or the doc should be updated if it's really not allowed here.

Additional info:

Comment 1 Richard W.M. Jones 2022-01-18 11:46:11 UTC
This is a regression in modular virt-v2v, should be an easy fix.

Comment 6 tingting zheng 2022-01-19 05:43:43 UTC
I can reproduce this bug with:
virt-v2v-1:1.45.96-1.el9.x86_64

Test with:
virt-v2v-1.45.97-1.el9.x86_64

1.Try virt-v2v command with '-oo json-disks-pattern' in '-o json' mode:
# virt-v2v -i libvirt -ic esx://root@$ip/?no_verify=1 -o json -of raw -os /var/lib/libvirt/images/v2v_json -oo json-disks-pattern=disk%{DiskNo}.img  $guest_name -it vddk -io vddk-libdir=/home/vddk7.0 -io vddk-thumbprint=*** -on $new_guest_name -ip /root/v2v_esx_passwd 
[   1.4] Opening the source
[   7.0] Inspecting the source
[  12.6] Checking for sufficient free disk space in the guest
[  12.6] Converting Windows Server 2019 Standard to run on KVM
virt-v2v: This guest has virtio drivers installed.
[  20.5] Mapping filesystem data to avoid copying unused and blank areas
[  21.6] Closing the overlay
[  21.9] Assigning disks to buses
[  21.9] Checking if the guest needs BIOS or UEFI to boot
virt-v2v: This guest requires UEFI on the target to boot.
[  23.2] Copying disk 1/1
█ 100% [****************************************]
[ 262.3] Creating output metadata
[ 262.3] Finishing off

2.After conversion, check the disks in /var/lib/libvirt/images/v2v_json, the disk name shows as what we've set in step 1.
[root@dell-per740-35 ~]# ll /var/lib/libvirt/images/v2v_json
-rw-r--r--. 1 root root 21474836480 Jan 18 22:50 disk1.img

Refer to the above comments,move the bug to VERIFIED.

Comment 8 errata-xmlrpc 2022-05-17 13:41:56 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (new packages: virt-v2v), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2022:2566


Note You need to log in before you can comment on or make changes to this bug.