Bug 2067171

Summary: Migration is failing during disk conversion on RPM guests using non-BDB
Product: Migration Toolkit for Virtualization Reporter: Igor Braginsky <ibragins>
Component: GeneralAssignee: Arik <ahadas>
Status: CLOSED MIGRATED QA Contact: Ilanit Stein <istein>
Severity: urgent Docs Contact: Richard Hoch <rhoch>
Priority: high    
Version: 2.3.0CC: ahadas, istein, jortel, rhoch, tgolembi
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-01-02 13:13:54 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: 2067177    
Attachments:
Description Flags
must-gather logs of failed plan none

Description Igor Braginsky 2022-03-23 13:09:38 UTC
Created attachment 1867804 [details]
must-gather logs of failed plan

Description of problem:Migration is failing on disk conversion step if source VM is UEFI


Version-Release number of selected component (if applicable): 2.3.0-38


How reproducible: 100%


Steps to Reproduce:
1. Migrate UEFI VM from VMWare
2.
3.

Actual results:
Migration is failing on disk conversion

Expected results:


Additional info:
Gathered logs with must-gather and attached here

Comment 1 Matthew Arnold 2022-04-14 17:14:01 UTC
It looks like this is not due to UEFI itself. I was able to migrate a few RHEL7 VMs, with virt-v2v successfully detecting UEFI firmware. The error from the log is:


libguestfs: trace: v2v: filesize "/var/lib/rpm/Name"
_package_format (0x1e5) took 0.01 secs
guestfsd: <= filesize (0xda) request length 64 bytes
guestfsd: error: /var/lib/rpm/Name: No such file or directory
guelibguestfs: trace: v2v: filesize = -1 (error)
libguestfs: trace: v2v: inspect_list_applications2 = NULL (error)
virt-v2v: error: libguestfs error: filesize: /var/lib/rpm/Name: No such 
file or directory
rm -rf '/var/tmp/null.TlX9xM'


I was assuming the failing VM was RHEL7 (since the name was uefi-mtv-rhel7), but I downloaded the disk image and it's a recent version of Fedora. For this to work, we need the forklift-virt-v2v image to pick up this fix: https://github.com/libguestfs/libguestfs/commit/c9ee831affed55abe0f928134cbbd2ed83b2f510

I will see if I can get that image updated.

Comment 2 Matthew Arnold 2022-04-20 20:23:39 UTC
Unfortunately it turns out the fix is more than a simple container image update, it would need a Fedora 36 image and a rework of how forklift uses virt-v2v in place. That might be a big enough change to justify pushing this bug off 2.3.1, but the cost is that we will not be able to migrate RHEL9 VMs in 2.3.1. I have migrated RHEL/CentOS 7 up to 8.3, but I expect RHEL9 VMs to fail with this same error (whether or not they use UEFI). I'm not sure how high of a priority RHEL9 support is for MTV at the moment.

Comment 3 Ilanit Stein 2022-06-08 14:57:30 UTC
Targeting to MTV-2.3.3 to assess it then.

Comment 4 Jeff Ortel 2022-07-06 16:53:06 UTC
This has nothing to do with UEFI and does not affect RHEL8.
The failure in the bug is from a change in the RPM database format that our version of virt-v2v doesn't handle right.
Updating target release to FUTURE.

Comment 5 Matthew Arnold 2022-07-07 12:54:27 UTC
I didn't realize the libguestfs fix had made it into CentOS Stream 8, and I didn't notice Franco had updated forklift-virt-v2v to centos:stream8 on the same day I made my last comment. So this should actually already be fixed for 2.3.2.

Comment 6 Arik 2023-01-02 13:16:29 UTC
The fix should already be available, I'm migrating this bz to Jira just to make sure it does