Bug 1603149

Summary: [RFE] Support rhv-upload in virt-p2v
Product: Red Hat Enterprise Linux 9 Reporter: tingting zheng <tzheng>
Component: virt-p2vAssignee: Virtualization Maintenance <virt-maint>
Status: CLOSED MIGRATED QA Contact: tingting zheng <tzheng>
Severity: medium Docs Contact:
Priority: medium    
Version: 9.2CC: hetz, jsuchane, juzhou, knoel, lersek, mxie, mzhan, ptoscano, rjones, virt-maint, xiaodwan
Target Milestone: rcKeywords: FutureFeature, MigratedToJIRA, Reopened, Triaged
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: P2V
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-06-30 18:20:58 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: 1792141    
Bug Blocks:    
Attachments:
Description Flags
virt-p2v with rhv-upload screenshot none

Description tingting zheng 2018-07-19 10:13:11 UTC
Description of problem:
On rhel7.6,virt-v2v has supported -o rhv-upload option,this bug is for adding support rhv-upload on virt-p2v client.

Version-Release number of selected component (if applicable):
virt-p2v-1.38.2-2.el7.iso
virt-v2v-1.38.2-3.el7.x86_64
libguestfs-1.38.2-3.el7.x86_64

How reproducible:


Steps to Reproduce:
1.Boot host into virt-p2v client
2.Input virt-v2v conversion server info and pass the test connection
3.After inputting conversion info interface. check the output options. 

Actual results:


Expected results:
rhv-upload is supported on virt-p2v client.

Additional info:

Comment 2 Hetz Ben Hamo 2019-03-30 13:36:16 UTC
I'm looking at version 1.40 (on Fedora 29, but it should be the same on CentOS) and it does appear in the drop down menu..

I'm attaching a screenshot.

Comment 3 Hetz Ben Hamo 2019-03-30 13:36:50 UTC
Created attachment 1549805 [details]
virt-p2v with rhv-upload screenshot

Comment 4 Pino Toscano 2019-04-01 07:48:27 UTC
(In reply to Hetz Ben Hamo from comment #2)
> I'm looking at version 1.40 (on Fedora 29, but it should be the same on
> CentOS) and it does appear in the drop down menu..

Yes, but it is unusable.
rhv-upload requires a number of parameters that the p2v GUI does not support.

Comment 5 Richard W.M. Jones 2019-08-21 14:12:13 UTC
Moving to RHEL AV.  Note there is no ITR for this, it's meant to be on the backlog.

Comment 11 RHEL Program Management 2021-01-08 07:32:25 UTC
After evaluating this issue, there are no plans to address it further or fix it in an upcoming release.  Therefore, it is being closed.  If plans change such that this issue will be fixed in an upcoming release, then the bug can be reopened.

Comment 12 Richard W.M. Jones 2021-01-08 10:56:20 UTC
I apologise for the actions of the "stale" bug process above.  This bug
is not stale, and I am reopening it.  All bugs are important.

Comment 15 RHEL Program Management 2021-07-31 07:27:15 UTC
After evaluating this issue, there are no plans to address it further or fix it in an upcoming release.  Therefore, it is being closed.  If plans change such that this issue will be fixed in an upcoming release, then the bug can be reopened.

Comment 16 Richard W.M. Jones 2021-07-31 07:45:06 UTC
My apologies, this bug was closed by a broken process that we
do not have any control over.  Reopening.

Comment 18 Richard W.M. Jones 2023-02-01 15:20:14 UTC
I think this has actually been fixed now.  Laszlo certainly posted some patches on the list related to this:
https://listman.redhat.com/archives/libguestfs/2023-January/030539.html

In any case as we are building virt-p2v only based on RHEL 9 I'm going to move this bug to RHEL 9.

Comment 19 Laszlo Ersek 2023-02-01 17:08:00 UTC
If -oo can cover all rhv-upload-specific output options, then yes, that series should add the mechanism.

However, we still need to back out the (small) change that disables rhv-upload, specifically for this BZ. So I'm taking this for further investigation.

Comment 20 Laszlo Ersek 2023-02-01 17:25:10 UTC
... I mean we need to revert commit 9b009aa4a389 ("Ignore 'rhv-upload' driver (RHBZ#1590220)", 2019-09-18) for this BZ, in addition to the bug 1792141 series that Rich mentions in comment 18.

Comment 21 Laszlo Ersek 2023-02-02 07:47:49 UTC
Hm, it's not so simple, unfortunately.

https://libguestfs.org/virt-v2v-output-rhv.1.html#output-to-rhv

> -op password-file
>
>     A file containing a password to be used when connecting to the
>     oVirt engine. Note the file should contain the whole password,
>     without any trailing newline, and for security the file should
>     have mode 0600 so that others cannot read it.

We don't have a way to handle this.  In fact, this is a special case of
the secrets handling problem that I outlined in
<https://bugzilla.redhat.com/show_bug.cgi?id=1507901#c16>.

We'll need to think more about this.  We might need to design a generic
way to (a) take a set of secrets on the GUI and the kernel command line,
(b) transfer them as individual, small files to the conversion server,
(c) pass them to virt-v2v with the proper cmdline options, in the
wrapper script, (d) make sure the files are removed (shredded?) in the
conversion directory, eventually, regardless of the virt-v2v exit
status; the secrets must not be leaked.

For now I'm returning this ticket to the backlog; it's not a simple
tweak.

Comment 22 Laszlo Ersek 2023-02-02 07:55:28 UTC
Another note -- consider "-oo rhv-cafile=ca.pem". Even though we may soon be able to spell out just "-oo rhv-cafile=ca.pem" via the GUI, it's insufficient in itself, there's another layer of indirection. And then the question becomes even more generic than just secrets: should we support transferring arbitrary files from virt-p2v to the conversion server? I don't think so. Can we, instead, make the user responsible for preparing *all* required files on the conversion server, before booting virt-p2v on the conversion subject machine? That way, they'd have to take care of all secrets, certificates, and so on, and the virt-p2v UI (both GUI and kernel cmdline) would only have to support passing *references* to those pre-populated files. And, very importantly, virt-p2v would not be responsible for *removing* those files, once conversion ended (one way or another).

Comment 23 Laszlo Ersek 2023-02-02 08:04:22 UTC
While at it, I'd propose adding, to virt-v2v's rhv-upload output module, an "-oo password-file=FILE" option, as an *alias* to the current "-op password-file" option. This would much simplify the virt-p2v UIs.