Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1472719 - [RFE]Add warning in process of v2v converting guest which has pci passthrough device
[RFE]Add warning in process of v2v converting guest which has pci passthrough...
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libguestfs (Show other bugs)
7.4
x86_64 Unspecified
medium Severity medium
: rc
: ---
Assigned To: Richard W.M. Jones
Virtualization Bugs
Jiri Herrmann
V2V
: FutureFeature
Depends On: 1472272
Blocks: 1477852
  Show dependency treegraph
 
Reported: 2017-07-19 04:57 EDT by mxie@redhat.com
Modified: 2018-04-10 05:19 EDT (History)
8 users (show)

See Also:
Fixed In Version: libguestfs-1.36.6-1.el7
Doc Type: Bug Fix
Doc Text:
*virt-v2v* now warns about not converting PCI passthrough devices The *virt-v2v* utility currently cannot convert PCI passthrough devices and thus ignores them in the conversion process. Prior to this update, however, attempting to convert a guest virtual machine with a PCI passthrough device successfully converted the guest, but did not provide any warning about the ignored PCI passthrough device. Now, converting such a guest logs an appropriate warning message during the conversion.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2018-04-10 05:18:10 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
virt-v2v-pci-passthrough.log (1.18 MB, text/plain)
2017-07-19 04:57 EDT, mxie@redhat.com
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:0677 None None None 2018-04-10 05:19 EDT

  None (edit)
Description mxie@redhat.com 2017-07-19 04:57:04 EDT
Created attachment 1300927 [details]
virt-v2v-pci-passthrough.log

Description of problem:
[RFE]Add warning in process of v2v converting guest which has pci passthrough device

Version-Release number of selected component (if applicable):
virt-v2v-1.36.3-6.el7_4.2.x86_64
libguestfs-1.36.3-6.el7_4.2.x86_64

How reproducible:
100%

Steps to Reproduce:

1.Prepare a xen guest which has added physical pci device
]# virsh -c xen+ssh://root@10.73.3.21
Welcome to virsh, the virtualization interactive terminal.

Type:  'help' for help with commands
       'quit' to quit
virsh # dumpxml Auto-rhel7.2-display
<domain type='xen'>
  <name>Auto-rhel7.2-display</name>
  ....
  ....
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <source>
        <address domain='0x0000' bus='0x02' slot='0x00' function='0x1'/>
      </source>
    </hostdev>
  </devices>
</domain>
2.Use virt-v2v convert this guest to libvirt but there is no warning during conversion(actually,physical pci device will not be existed after v2v conversion )
# virt-v2v -ic xen+ssh://root@10.73.3.21 Auto-rhel7.2-display -of qcow2
[   0.0] Opening the source -i libvirt -ic xen+ssh://root@10.73.3.21 Auto-rhel7.2-display
[   0.5] Creating an overlay to protect the source from being modified
[   1.3] Initializing the target -o libvirt -os default
[   1.3] Opening the overlay
[   6.5] Inspecting the overlay
[  26.0] Checking for sufficient free disk space in the guest
[  26.0] Estimating space required on target for each disk
[  26.0] Converting Red Hat Enterprise Linux Server 7.2 (Maipo) to run on KVM
virt-v2v: This guest has virtio drivers installed.
[ 177.3] Mapping filesystem data to avoid copying unused and blank areas
[ 177.7] Closing the overlay
[ 180.8] Checking if the guest needs BIOS or UEFI to boot
[ 180.8] Assigning disks to buses
[ 180.8] Copying disk 1/1 to /var/lib/libvirt/images/Auto-rhel7.2-display-sda (qcow2)
    (100.00/100%)
[ 865.9] Creating output metadata
Pool default refreshed

Domain Auto-rhel7.2-display defined from /tmp/v2vlibvirt03322f.xml

[ 866.6] Finishing off


Actula results:
As above description

Expected results:
Add warning in process of v2v converting guest which has pci passthrough device,such as "virt-v2v: warning: pci passthrough device will be ignored "


Additional info:
Comment 2 Pino Toscano 2017-08-30 07:08:34 EDT
Easy patch sent:
https://www.redhat.com/archives/libguestfs/2017-August/msg00141.html
Comment 3 Pino Toscano 2017-08-30 08:13:10 EDT
Fixed upstream with
https://github.com/libguestfs/libguestfs/commit/57d89157911a9d0f6d3da5396c59daecd2d76973
which is in libguestfs >= 1.37.22.
Comment 5 kuwei@redhat.com 2017-09-21 06:37:45 EDT
Verify the bug with below builds:
virt-v2v-1.36.6-1.el7.x86_64
libguestfs-1.36.6-1.el7.x86_64
libvirt-3.7.0-2.el7.x86_64
qemu-kvm-rhev-2.9.0-16.el7_4.8.x86_64


Steps:
Scenario 1:
1.Prepare a xen guest which has added physical pci device
# virsh -c xen+ssh://root@10.73.3.21
Welcome to virsh, the virtualization interactive terminal.

Type:  'help' for help with commands
       'quit' to quit
virsh # dumpxml Auto-rhel7.2-display
<domain type='xen'>
  <name>Auto-rhel7.2-display</name>
  ....
  ....
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <source>
        <address domain='0x0000' bus='0x02' slot='0x00' function='0x1'/>
      </source>
    </hostdev>
  </devices>
</domain>
2.Use virt-v2v convert this guest to libvirt,we can see the warning info below.
#  virt-v2v -ic xen+ssh://root@10.73.3.21 Auto-rhel7.2-display -of qcow2
[   0.0] Opening the source -i libvirt -ic xen+ssh://root@10.73.3.21 Auto-rhel7.2-display
virt-v2v: warning: this guest has a passthrough host device which will be 
ignored
[   0.5] Creating an overlay to protect the source from being modified
[   0.9] Initializing the target -o libvirt -os default
[   1.0] Opening the overlay
[   3.3] Inspecting the overlay
[  21.2] Checking for sufficient free disk space in the guest
[  21.2] Estimating space required on target for each disk
[  21.2] Converting Red Hat Enterprise Linux Server 7.2 (Maipo) to run on KVM
virt-v2v: This guest has virtio drivers installed.
[ 143.4] Mapping filesystem data to avoid copying unused and blank areas
[ 143.8] Closing the overlay
[ 143.9] Checking if the guest needs BIOS or UEFI to boot
[ 143.9] Assigning disks to buses
[ 143.9] Copying disk 1/1 to /var/lib/libvirt/images/Auto-rhel7.2-display-sda (qcow2)
    (100.00/100%)
[ 385.2] Creating output metadata
Pool default refreshed

Domain Auto-rhel7.2-display defined from /tmp/v2vlibvirt1c13cf.xml

[ 385.3] Finishing off
3.After conversion, boot the guest all checkpoints passed.

Scenario 2:
1.Prepare a  libvirt guest which has added physical pci device
<domain type='kvm'>
  <name>rhel6.7-pci-passthrough</name>
  <uuid>ab776fee-978d-425b-bb97-7edebeb2677b</uuid>
  <memory unit='KiB'>2097152</memory>
 <hostdev mode='subsystem' type='pci' managed='yes'>
      <source>
        <address domain='0x0000' bus='0x00' slot='0x1f' function='0x0'/>
      </source>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
    </hostdev>
    <memballoon model='virtio'>
  </devices>
</domain>

2.Use virt-v2v convert this guest to rhv,we can see the warning list below.
virt-v2v rhel6.7-pci-passthrough -o rhv -os 10.73.131.93:/home/nfs_export
[   0.0] Opening the source -i libvirt rhel6.7-pci-passthrough
virt-v2v: warning: this guest has a passthrough host device which will be 
ignored
[   0.0] Creating an overlay to protect the source from being modified
[   0.1] Initializing the target -o rhv -os 10.73.131.93:/home/nfs_export
[   0.3] Opening the overlay
[   1.6] Inspecting the overlay
[  14.5] Checking for sufficient free disk space in the guest
[  14.5] Estimating space required on target for each disk
[  14.5] Converting Red Hat Enterprise Linux Server release 6.7 Beta (Santiago) to run on KVM
virt-v2v: This guest has virtio drivers installed.
[  86.4] Mapping filesystem data to avoid copying unused and blank areas
[  86.5] Closing the overlay
[  86.8] Checking if the guest needs BIOS or UEFI to boot
[  86.8] Assigning disks to buses
[  86.8] Copying disk 1/1 to /tmp/v2v.Lyo76V/bdf9c90b-e6f0-439c-aa9f-6305fd5fad7e/images/fcceff56-5b41-406d-b268-d1c6e242987e/9c8e72b1-cac3-4051-9bb6-b88723bfaf01 (raw)
    (100.00/100%)
[ 122.4] Creating output metadata
[ 122.4] Finishing off
3.After conversion, input the guest to data domain ,boot the guest and all checkpoints passed.

So, i think the bug has fix,move ON_QA to VERIFIED
Comment 7 kuwei@redhat.com 2018-01-02 02:53:22 EST
According to comment 5,the patch looks fine, If the bug has new impact when it's done repairing,I will open a new bug.
Move the bug to VERIFIED. 

Thanks pino
Comment 10 errata-xmlrpc 2018-04-10 05:18:10 EDT
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, 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-2018:0677

Note You need to log in before you can comment on or make changes to this bug.