Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 2041850

Summary: Can not specify '-oo json-disks-pattern' in '-o json' mode
Product: Red Hat Enterprise Linux 9 Reporter: Xiaodai Wang <xiaodwan>
Component: virt-v2vAssignee: Richard W.M. Jones <rjones>
Status: CLOSED ERRATA QA Contact: tingting zheng <tzheng>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 9.0CC: juzhou, lersek, mxie, rjones, tyan, tzheng, vwu
Target Milestone: rcKeywords: Automation, Regression
Target Release: ---Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: virt-v2v-1.45.97-1.el9 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-05-17 13:41:56 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Deadline: 2022-02-14   

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