Bug 2152465

Summary: v2v should set ovirt:id correctly after coverting windows11/2019/2022 guests to rhv via -o rhv-upload
Product: Red Hat Enterprise Linux 9 Reporter: Vera <vwu>
Component: virt-v2vAssignee: Laszlo Ersek <lersek>
Status: CLOSED ERRATA QA Contact: Vera <vwu>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 9.2CC: chhu, hongzliu, juzhou, lersek, mxie, rjones, tyan, tzheng, xiaodwan
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:47 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:
Bug Depends On:    
Bug Blocks: 2135762    
Attachments:
Description Flags
win2019 rhv upload debug log none

Description Vera 2022-12-12 03:53:56 UTC
Created attachment 1931900 [details]
win2019 rhv upload debug log

Description of problem:
v2v should set ovirt:id correctly after coverting windows11/2019/2022 guest to rhv 
 via -o rhv-upload

Version-Release number of selected component (if applicable):
libguestfs-1.48.4-4.el9.x86_64
osinfo-db-20221130-1.el9.noarch
libosinfo-1.10.0-1.el9.x86_64
virt-v2v-2.0.7-7.el9.x86_64

How reproducible:
100%

Steps to Reproduce:
1.Use virt-v2v to convert Win 11/Win 2019/Win 2022 to RHV with -o rhv-upload.

2.After conversion, check the guest info from RHV GUI, the guest version shows incorrect;

For win2019: Windows 2016 x64
For win2022: Windows 2016 x64
For win11: Windows 10 x64

3.Check the ovirt:id
# grep "ovirt:id" win2019-rhv-upload.log
    <OperatingSystemSection ovf:id='10dcbd8f-724c-48bc-832e-dbf94395288e' ovf:required='false' ovirt:id='29'>

# grep "ovirt:id" win2022-rhv-upload.log
    <OperatingSystemSection ovf:id='a1e8c198-5a64-437e-a8b4-a342ef107d77' ovf:required='false' ovirt:id='29'>

# grep "ovirt:id" win11-rhv-upload.log
    <OperatingSystemSection ovf:id='aa470b76-e48a-4153-8841-96a7fc120cdc' ovf:required='false' ovirt:id='27'>

Actual results:
RHV should show the incorrect version of windows guest.

Expected results:
RHV should show the correct version of windows guest.

Comment 1 Laszlo Ersek 2022-12-12 16:52:25 UTC
Please always mark on a new BZ if there is an older BZ that can be considered the "origin". The original BZ usually has some discussion that had lead up to the creation of the new BZ.

In this case:
<https://bugzilla.redhat.com/show_bug.cgi?id=2149863#c10> through <https://bugzilla.redhat.com/show_bug.cgi?id=2149863#c16>.

Comment 4 Vera 2022-12-28 06:15:45 UTC
Tried on with the versions:

libosinfo-1.10.0-1.el9.x86_64
libguestfs-1.48.4-4.el9.x86_64
osinfo-db-20221130-1.el9.noarch
virt-v2v-2.0.7-7.bz2152465.el9.x86_64

Steps to Reproduce:
1.Use virt-v2v to convert Win 11/Win 2019/Win 2022 to RHV with -o rhv-upload.

2.After conversion, check the guest info from RHV GUI, the guest version shows incorrect;

For win2019: Windows 2019 x64
For win2022: Windows 2022 x64
For win11: Windows 11 x64

3.Check the ovirt:id
# grep "ovirt:id" /virt-v2v-rhv-upload-win11.log 
    <OperatingSystemSection ovf:id='59d83f70-d946-4b43-a128-534ed0e50e06' ovf:required='false' ovirt:id='36'>
# grep "ovirt:id" /virt-v2v-rhv-upload-win2022.log 
    <OperatingSystemSection ovf:id='c7ef1f42-62c4-46c3-bcdd-19ca329aa83e' ovf:required='false' ovirt:id='37'>
# grep "ovirt:id" /virt-v2v-rhv-upload-win2019.log 
    <OperatingSystemSection ovf:id='c9690863-5989-4e1a-a90a-bf793f58aef2' ovf:required='false' ovirt:id='31'>


Laszlo, the issue has been solved with the private build.

Comment 5 Laszlo Ersek 2023-01-01 14:10:06 UTC
[v2v PATCH] rhv: Use osinfo to distinguish Windows >= 10 variants in "ovirt:id" too
Message-Id: <20230101140926.260265-1-lersek>
https://listman.redhat.com/archives/libguestfs/2023-January/030436.html

Comment 6 Laszlo Ersek 2023-01-05 16:04:13 UTC
(In reply to Laszlo Ersek from comment #5)
> [v2v PATCH] rhv: Use osinfo to distinguish Windows >= 10 variants in "ovirt:id" too
> Message-Id: <20230101140926.260265-1-lersek>
> https://listman.redhat.com/archives/libguestfs/2023-January/030436.html

Upstream commit fcd787573bc7.

Comment 7 Vera 2023-01-11 06:04:37 UTC
Verified with the versions:
libguestfs-1.48.4-4.el9.x86_64
osinfo-db-20221130-1.el9.noarch
libosinfo-1.10.0-1.el9.x86_64
virt-v2v-2.2.0-1.el9.x86_64

Steps:
1.Use virt-v2v to convert Win 11/Win 2019/Win 2022 to RHV with -o rhv-upload.

2.After conversion, check the guest info from RHV GUI, the guest version shows incorrect;

For win2019: Windows 2019 x64
For win2022: Windows 2022
For win11: Windows 11

3.Check the ovirt:id
# grep "ovirt:id" win2022-rhv-upload.log
    <OperatingSystemSection ovf:id='f37d774c-abbf-4ea4-881e-a592a0eeb9e3' ovf:required='false' ovirt:id='37'>
# 
# grep "ovirt:id" win2019-rhv-upload.log
    <OperatingSystemSection ovf:id='492da5ff-5baa-4b7c-a826-be44a440ab88' ovf:required='false' ovirt:id='31'>
#
# grep "ovirt:id" win11-rhv-upload.log
    <OperatingSystemSection ovf:id='0431576c-0c03-4432-8a74-fa6e245186d5' ovf:required='false' ovirt:id='36'>
 


Marking as Verified:Tested.

Comment 10 Vera 2023-02-06 08:44:37 UTC
Verified with the versions:
libguestfs-1.48.4-4.el9.x86_64
osinfo-db-20221130-1.el9.noarch
libosinfo-1.10.0-1.el9.x86_64
virt-v2v-2.2.0-4.el9.x86_64

Steps:
1.Use virt-v2v to convert Win 11/Win 2019/Win 2022 to RHV with -o rhv-upload.

2.After conversion, check the guest info from RHV GUI, the guest version shows incorrect;

For win2019: Windows 2019 x64
For win2022: Windows 2022
For win11: Windows 11

3.Check the ovirt:id
# grep "ovirt:id" win11.log 
    <OperatingSystemSection ovf:id='04389480-eb41-4fe8-a59b-dfde169ed29a' ovf:required='false' ovirt:id='36'>

# grep "ovirt:id" win2019.log 
    <OperatingSystemSection ovf:id='9175f78c-8a1d-496c-8cd0-d4780592a4f4' ovf:required='false' ovirt:id='31'>

# grep "ovirt:id" win2022.log 
    <OperatingSystemSection ovf:id='be4e8568-7e89-4835-9807-bdf03c407e2f' ovf:required='false' ovirt:id='37'>

Marking as Vefified.

Comment 12 errata-xmlrpc 2023-05-09 07:45:47 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