Bug 2066996

Summary: RFE: Allow PCI passthrough for ESX guests
Product: Red Hat Enterprise Linux 9 Reporter: mxie <mxie>
Component: libvirtAssignee: Virtualization Maintenance <virt-maint>
libvirt sub component: General QA Contact: mxie <mxie>
Status: CLOSED MIGRATED Docs Contact:
Severity: low    
Priority: low CC: chhu, hongzliu, juzhou, lersek, mprivozn, mzhan, rjones, tyan, tzheng, virt-maint, vwu, xiaodwan
Version: 9.1Keywords: FutureFeature, MigratedToJIRA, Triaged
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-06-30 18:40:40 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:

Description mxie@redhat.com 2022-03-23 02:20:09 UTC
Description of problem:
There is no warning when v2v converts guest which has pci passthrough device

Version-Release number of selected component (if applicable):
virt-v2v-2.0.0-2.el9.x86_64
libguestfs-1.48.0-2.el9.x86_64
libvirt-libs-8.1.0-1.el9.x86_64
qemu-img-6.2.0-11.el9_0.1.x86_64
nbdkit-server-1.30.1-1.el9.x86_64
libnbd-1.12.2-1.el9.x86_64


How reproducible:
100%

Steps to Reproduce:
1.Prepare a guest which has pci passthrough device on VMware
#cat Auto-esx7.0-rhel8.3-pci-passthrough/Auto-esx7.0-rhel8.3-pci-passthrough.vmx  |grep  pciPassthru
pciPassthru0.id = "00000:002:00.1"
pciPassthru0.deviceId = "0x1521"
pciPassthru0.vendorId = "0x8086"
pciPassthru0.systemId = "5ea99e3e-d31d-e6bc-9ae2-6c0b84ef00ee"
pciPassthru0.present = "TRUE"

2.Convert the guest from VMware by v2v
# 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 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 -ip /home/passwd Auto-esx7.0-rhel8.3-pci-passthrough
[   0.0] Setting up the source: -i libvirt -ic vpx://root.198.169/data/10.73.199.217/?no_verify=1 -it vddk Auto-esx7.0-rhel8.3-pci-passthrough
[   1.9] Opening the source
[   8.0] Inspecting the source
[  16.1] Checking for sufficient free disk space in the guest
[  16.1] Converting Red Hat Enterprise Linux 8.3 (Ootpa) to run on KVM
virt-v2v: This guest has virtio drivers installed.
[  85.7] Mapping filesystem data to avoid copying unused and blank areas
[  86.7] Closing the overlay
[  87.0] Assigning disks to buses
[  87.0] Checking if the guest needs BIOS or UEFI to boot
[  87.0] Setting up the destination: -o rhv-upload -oc https://dell-per740-22.lab.eng.pek2.redhat.com/ovirt-engine/api -os nfs_data
[ 107.8] Copying disk 1/1
█ 100% [****************************************]
[ 323.3] Creating output metadata
[ 333.9] Finishing off


Actual results:
As above description

Expected results:
There is a warning when v2v converts guest which has pci passthrough device

Additional info:
This is actually a regression bug because the problem has been fixed in bug1472719

Comment 2 Laszlo Ersek 2022-03-23 11:21:31 UTC
The warning message is still present in virt-v2v at this point; it depends on the following node(s) in the domain XML:

  /domain/devices/hostdev

However, in the domain XML that libvirtd outputs for the vmware domain (see the attachment in comment 0), there is no "hostdev" element under /domain/devices.

I don't think libvirt has ever supported assigned devices for vmware domains. Bug 1472719 was fixed for Xen domains!

Indeed, the libvirt source directory "src/libxl" (where I think the Xen driver lives) contains a bunch of "hostdev" references. The "src/vmware" directory contains zero "hostdev" references however (at current upstream master -- 42d7c3c4dae2).

So I think this is rather an RFE for libvirtd. Reassigning for further triage. Thanks.

Comment 3 mxie@redhat.com 2022-03-28 03:25:01 UTC
(In reply to Laszlo Ersek from comment #2)
> So I think this is rather an RFE for libvirtd. Reassigning for further
> triage. Thanks.

Actually, we have filed bug1477852 before, not sure libvirt will fix the problem this time.

Comment 4 Laszlo Ersek 2022-03-28 11:15:07 UTC
(In reply to mxie from comment #3)
> (In reply to Laszlo Ersek from comment #2)
> > So I think this is rather an RFE for libvirtd. Reassigning for further
> > triage. Thanks.
> 
> Actually, we have filed bug1477852 before, not sure libvirt will fix the
> problem this time.

Michal, do you prefer keeping this one open, or should we close this as a duplicate of bug 1477852, and reopen bug 1477852? Thanks.

Comment 5 Michal Privoznik 2022-03-28 11:38:29 UTC
I don't have preference. Whatever you feel is the right thing to do.

Comment 6 Laszlo Ersek 2022-03-28 12:05:31 UTC
Thanks, let's keep this one open then.