Bug 2162444

Summary: Enable '--oo compressed' for -o kubevirt
Product: Red Hat Enterprise Linux 9 Reporter: Xiaodai Wang <xiaodwan>
Component: virt-v2vAssignee: Richard W.M. Jones <rjones>
Status: CLOSED ERRATA QA Contact: Xiaodai Wang <xiaodwan>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 9.2CC: lersek, mxie, rjones, tyan, tzheng, vwu
Target Milestone: rcKeywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: virt-v2v-2.2.0-5.el9 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-05-09 07:45:48 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:

Description Xiaodai Wang 2023-01-19 15:27:34 UTC
Description of problem:
Enable '--oo compressed' for -o kubevirt

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

How reproducible:
100%

Steps to Reproduce:
# virt-v2v -i disk /var/lib/libvirt/images/server.qcow2 -o kubevirt -of qcow2 -os /var/tmp/ -oo compressed
[   1.1] Setting up the source: -i disk /var/lib/libvirt/images/server.qcow2
virt-v2v: error: no -oo (output options) are allowed here


Actual results:
as above steps.

Expected results:
'-oo compressed' is a meaningful option, it could be enabled.

Additional info:

Comment 2 Xiaodai Wang 2023-01-28 09:56:35 UTC
Verified with virt-v2v-2.2.0-2.el9.x86_64, the '-oo compressed' works well.

# virt-v2v -i disk /var/lib/libvirt/images/server.qcow2 -o kubevirt -of qcow2 -os /var/tmp/ -oo compressed                                       
[   0.5] Setting up the source: -i disk /var/lib/libvirt/images/server.qcow2            
[   1.6] Opening the source                                                                    
[  15.4] Inspecting the source                                                                                                                                                                 
[  18.0] Checking for sufficient free disk space in the guest
[  18.0] Converting Red Hat Enterprise Linux 8.4 (Ootpa) to run on KVM
virt-v2v: The QEMU Guest Agent will be installed for this guest at first 
boot.
virt-v2v: warning: /files/boot/grub2/device.map/hd0 references unknown 
device "vda".  You may have to fix this entry manually after conversion.
virt-v2v: This guest has virtio drivers installed.
[  65.2] Mapping filesystem data to avoid copying unused and blank areas
[  66.0] Closing the overlay
[  66.3] Assigning disks to buses
[  66.3] Checking if the guest needs BIOS or UEFI to boot
[  66.3] Setting up the destination: -o kubevirt -os /var/tmp/
[  67.4] Copying disk 1/1
█ 100% [****************************************]

# virt-v2v -o kubevirt -oo ?
Output options that can be used with -o kubevirt:

  -oo compressed      Compress the output file (used only with -of qcow2)

Comment 5 tingting zheng 2023-02-01 10:49:47 UTC
Test the bug with:
virt-v2v-2.2.0-3.el9.x86_64

# virt-v2v -i disk /var/lib/libvirt/images/rhel9.qcow2 -o kubevirt -of qcow2 -os /var/tmp/ -oo compressed
[   0.0] Setting up the source: -i disk /var/lib/libvirt/images/rhel9.qcow2
[   1.2] Opening the source
[   7.8] Inspecting the source
[  12.3] Checking for sufficient free disk space in the guest
[  12.3] Converting Red Hat Enterprise Linux 9.1 Beta (Plow) to run on KVM
virt-v2v: The QEMU Guest Agent will be installed for this guest at first 
boot.
[  70.6] Mapping filesystem data to avoid copying unused and blank areas
[  72.0] Closing the overlay
[  72.3] Assigning disks to buses
[  72.3] Checking if the guest needs BIOS or UEFI to boot
[  72.3] Setting up the destination: -o kubevirt -os /var/tmp/
[  73.3] Copying disk 1/1
█ 100% [****************************************]
[  96.7] Creating output metadata
[  96.7] Finishing off

# virt-v2v -o kubevirt -oo ?
Output options that can be used with -o kubevirt:

  -oo compressed      Compress the output file (used only with -of qcow2)

The option '-oo compressed' works well, so move the bug to VERIFIED.

Comment 7 errata-xmlrpc 2023-05-09 07:45:48 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 (virt-v2v bug fix and enhancement update), 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/RHBA-2023:2313