Bug 2059287

Summary: RFE: Rebase virt-v2v to 2.0 in RHEL 9.1
Product: Red Hat Enterprise Linux 9 Reporter: Richard W.M. Jones <rjones>
Component: virt-v2vAssignee: Richard W.M. Jones <rjones>
Status: CLOSED ERRATA QA Contact: mxie <mxie>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 9.1CC: juzhou, lersek, mxie, rjones, tyan, tzheng, vwu, xiaodwan
Target Milestone: rcKeywords: FutureFeature, Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: virt-v2v-2.0.7-1.el9 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-11-15 09:55:51 UTC Type: Feature Request
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1658126, 1684075, 1788823, 1854275, 2069768, 2070186, 2070530, 2074805    

Description Richard W.M. Jones 2022-02-28 16:30:01 UTC
Description of problem:

This is a request to rebase virt-v2v to the latest
upstream stable release in RHEL 9.1.

The upstream release will be 2.0.  It has not been
released upstream yet.

Comment 2 Richard W.M. Jones 2022-03-11 16:33:25 UTC
Preliminary release notes:

https://github.com/libguestfs/virt-v2v/blob/master/docs/virt-v2v-release-notes-2.0.pod

Comment 3 Richard W.M. Jones 2022-03-14 17:51:12 UTC
virt-v2v 2.0 release was today.  Final release notes are available here:

https://libguestfs.org/virt-v2v-release-notes-2.0.1.html

Comment 6 mxie@redhat.com 2022-03-31 15:35:33 UTC
Test the bug with below builds:
virt-v2v-2.0.1-1.el9.x86_64
libguestfs-1.48.0-2.el9.x86_64
guestfs-tools-1.48.0-1.el9.x86_64
libvirt-libs-8.1.0-1.el9.x86_64
qemu-img-6.2.0-12.el9.x86_64
nbdkit-server-1.30.1-2.el9.x86_64
libnbd-1.12.2-1.el9.x86_64

Steps:
1.Switch user to normal user, rebuild virt-v2v from srpm package
$ rpmbuild --rebuild virt-v2v-2.0.1-1.el9.src.rpm 
....
+ exit 0

2.Check virt-v2v related man pages
2.1 # man virt-v2v |grep rhsrvany.exe -B 7 -A 9
       "VIRT_TOOLS_DATA_DIR"
.....
           This directory may contain the following files:

           rhsrvany.exe
               (Required when doing conversions of Windows guests)
.....

           pvvxsvc.exe
               This is a Windows binary shipped with SUSE VMDP, used to install a "firstboot" script in Windows guests.  It is required if
               you intend to use the --firstboot or --firstboot-command options with Windows guests.


2.2 # ls /usr/share/virt-tools/
pnp_wait.exe  rhsrvany.exe

3.Convert a guest to rhv with rhv-cafile option by v2v, checkpoints of guest are passed after conversion
# virt-v2v -i ova rhel8.5-vapp-guest  -o rhv-upload -of qcow2 -oc https://dell-per740-22.lab.eng.pek2.redhat.com/ovirt-engine/api  -op /home/rhvpasswd  -os nfs_data -b ovirtmgmt  -oo rhv-cafile=/home/ca.pem -oo rhv-verifypeer
[   0.9] Setting up the source: -i ova rhel8.5-vapp-guest
virt-v2v: warning: making OVA directory public readable to work around 
libvirt bug https://bugzilla.redhat.com/1045069
[  11.5] Opening the source
[  18.4] Inspecting the source
[  25.0] Checking for sufficient free disk space in the guest
[  25.0] Converting Red Hat Enterprise Linux 8.5 (Ootpa) to run on KVM
virt-v2v: This guest has virtio drivers installed.
[ 124.7] Mapping filesystem data to avoid copying unused and blank areas
[ 125.9] Closing the overlay
[ 126.2] Assigning disks to buses
[ 126.2] Checking if the guest needs BIOS or UEFI to boot
[ 126.2] Setting up the destination: -o rhv-upload -oc https://dell-per740-22.lab.eng.pek2.redhat.com/ovirt-engine/api -os nfs_data
[ 137.9] Copying disk 1/1
█ 100% [****************************************]
[ 420.3] Creating output metadata
[ 424.7] Finishing off

4.Convert a guest to openstack by v2v, checkpoints of guest are passed after conversion
# virt-v2v -ic vpx://root.198.169/data/10.73.199.217/?no_verify=1 -it vddk -io vddk-libdir=/home/vddk7.0.3 -io  vddk-thumbprint=B5:52:1F:B4:21:09:45:24:51:32:56:F6:63:6A:93:5D:54:08:2D:78  -o openstack -oo server-id=v2v-appliance -ip /home/passwd  esx7.0-rhel9.0-x86_64
[   0.0] Setting up the source: -i libvirt -ic vpx://root.198.169/data/10.73.199.217/?no_verify=1 -it vddk esx7.0-rhel9.0-x86_64
[   3.8] Opening the source
[  11.2] Inspecting the source
[  19.0] Checking for sufficient free disk space in the guest
[  19.0] Converting Red Hat Enterprise Linux 9.0 Beta (Plow) to run on KVM
virt-v2v: This guest has virtio drivers installed.
[ 186.2] Mapping filesystem data to avoid copying unused and blank areas
[ 187.6] Closing the overlay
[ 187.9] Assigning disks to buses
[ 187.9] Checking if the guest needs BIOS or UEFI to boot
[ 187.9] Setting up the destination: -o openstack -oo server-id=v2v-appliance
Failed to set volume read-only access mode flag: Invalid volume: Volume 03cf6054-4dfa-477e-95d4-4d18a61e7a49 status must be available to update readonly flag, but current status is: creating. (HTTP 400) (Request-ID: req-a03e0ac3-2256-4992-8d03-ffdbf231c9c3)
[ 204.1] Copying disk 1/1
█ 100% [****************************************]
[ 533.0] Creating output metadata
[ 538.1] Finishing off


5.Also triggered auto function tests for virt-v2v-2.0.1-1.el9, all the problems found so far have been reported


Hi Richard,
   Please help to check step2, tools name need to be update in "VIRT_TOOLS_DATA_DIR" part of virt-v2v man page

Comment 7 Richard W.M. Jones 2022-04-04 09:28:16 UTC
I posted a patch to clarify the docs:

https://listman.redhat.com/archives/libguestfs/2022-April/028552.html

Comment 9 mxie@redhat.com 2022-07-20 10:33:54 UTC
Verify the bug with below builds:
virt-v2v-2.0.7-2.el9.x86_64
libguestfs-1.48.4-1.el9.x86_64
guestfs-tools-1.48.2-5.el9.x86_64
nbdkit-server-1.30.8-1.el9.x86_64
libnbd-1.12.5-1.el9.x86_64
libvirt-libs-8.5.0-2.el9.x86_64
qemu-img-7.0.0-9.el9.x86_64
virtio-win-1.9.27-0.el9_0.noarch


Steps:
1.Switch user to normal user, rebuild virt-v2v from srpm package.
$ rpmbuild --rebuild virt-v2v-2.0.7-2.el9.src.rpm 
....
+ exit 0

Result1: can rebuild rpm packages from v2v src package successfully.

2.Check virt-v2v man page about pnp_wait.exe
2.1 # man virt-v2v |grep rhsrvany.exe -B 10 -A 20

       "VIRT_TOOLS_DATA_DIR"
           This can point to the directory containing data files used for
           Windows conversion.

           Normally you do not need to set this.  If not set, a compiled-in
           default will be used (something like /usr/share/virt-tools).

           This directory may contain the following files:

           rhsrvany.exe
               (Required when doing conversions of Windows guests)

               This is the RHSrvAny Windows binary, used to install a
               "firstboot" script in the guest during conversion of Windows
               guests.

               See also: "https://github.com/rwmjones/rhsrvany"

           pnp_wait.exe
               (Recommended when doing conversions of Windows guests)

               This tool waits for newly installed Windows devices to become
               available before trying to configure them, for example to set
               network configuration.  It is part of the RHSrvAny project.

           pvvxsvc.exe
               This is a Windows binary shipped with SUSE VMDP, used to
               install a "firstboot" script in Windows guests.  It is an
               alternative to RHSrvAny.

2.2 # ls /usr/share/virt-tools/
pnp_wait.exe  rhsrvany.exe

Result2: v2v man page has been updated.

3.Convert a guest to openstack by v2v, checkpoints of guest are passed after conversion
# virt-v2v -ic vpx://root.227.27/data/10.73.199.217/?no_verify=1 -it vddk -io vddk-libdir=/home/vmware-vix-disklib-distrib -io  vddk-thumbprint=76:75:59:0E:32:F5:1E:58:69:93:75:5A:7B:51:32:C5:D1:6D:F1:21  -o openstack -oo server-id=v2v-appliance -ip /home/passwd  esx7.0-rhel9.1-x86_64 -oo verify-server-certificate=true
[   0.0] Setting up the source: -i libvirt -ic vpx://root.227.27/data/10.73.199.217/?no_verify=1 -it vddk esx7.0-rhel9.1-x86_64
[   3.8] Opening the source
[  11.5] Inspecting the source
[  20.6] Checking for sufficient free disk space in the guest
[  20.6] Converting Red Hat Enterprise Linux 9.1 Beta (Plow) to run on KVM
virt-v2v: This guest has virtio drivers installed.
[ 217.4] Mapping filesystem data to avoid copying unused and blank areas
[ 219.3] Closing the overlay
[ 219.7] Assigning disks to buses
[ 219.7] Checking if the guest needs BIOS or UEFI to boot
[ 219.7] Setting up the destination: -o openstack -oo server-id=v2v-appliance
[ 239.1] Copying disk 1/1
█ 100% [****************************************]
[ 556.9] Creating output metadata
[ 562.4] Finishing off

4. Also triggered auto function tests for virt-v2v-2.0.1-1.el9, all the problems found so far have been reported


Result:
   No new problem found, move the bug from ON_QA to VERIFIED

Comment 11 errata-xmlrpc 2022-11-15 09:55:51 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 (Low: virt-v2v security, 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/RHSA-2022:7968