Bug 1151902
| Summary: | RFE: virt-v2v should do something with <interface type='direct'> (either virtualize it or give an error) | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | tingting zheng <tzheng> | ||||||
| Component: | libguestfs | Assignee: | Richard W.M. Jones <rjones> | ||||||
| Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> | ||||||
| Severity: | medium | Docs Contact: | |||||||
| Priority: | medium | ||||||||
| Version: | 7.1 | CC: | dyuan, juzhou, mbooth, mtessun, mxie, mzhan, ptoscano, rjones, zili | ||||||
| Target Milestone: | rc | Keywords: | FutureFeature | ||||||
| Target Release: | --- | ||||||||
| Hardware: | Unspecified | ||||||||
| OS: | Unspecified | ||||||||
| Whiteboard: | V2V | ||||||||
| Fixed In Version: | libguestfs-1.40.2-4.el7 | Doc Type: | Enhancement | ||||||
| Doc Text: | Story Points: | --- | |||||||
| Clone Of: | |||||||||
| : | 1703400 (view as bug list) | Environment: | |||||||
| Last Closed: | 2019-08-06 12:44:11 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: | 1288337, 1703400 | ||||||||
| Attachments: |
|
||||||||
Created attachment 946201 [details]
ovf file of guest after conversion to rhev
Old virt-v2v would have also ignored these interfaces, so this is a feature request (although I'm not sure how much sense it makes to convert such a guest -- probably it should give an error). Since it's not completely clear from the docs, <interface type='direct'> is a macvtap device. http://virt.kernelnewbies.org/MacVTap I can reproduce it on rhel8 with builds:
virt-v2v-1.38.4-5.module+el8+2173+537e5cb5.x86_64
libguestfs-1.38.4-5.module+el8+2173+537e5cb5.x86_64
kernel-4.18.0-32.el8.x86_64
Steps to Reproduce:
1.Prepare a guest with interface type direct.
# virsh dumpxml rhel8.0
</interface>
<interface type='direct'>
<mac address='52:54:00:62:1c:4a'/>
<source dev='em1' mode='bridge'/>
<target dev='macvtap0'/>
<model type='e1000e'/>
<alias name='net2'/>
<address type='pci' domain='0x0000' bus='0x09' slot='0x00' function='0x0'/>
</interface>
2.Use virt-v2v to convert the guest to rhev.
# virt-v2v rhel8.0 -o rhv -os 10.66.144.40:/home/nfs_export --password-file /tmp/passwd
3.Import the guest to rhev,from rhev GUI,no network is shows.
Fixed upstream with https://github.com/libguestfs/libguestfs/commit/1629ec6a5639cf5e226e80bcee749ae8851b1fae which is in libguestfs >= 1.41.1. In short: virt-v2v will produce a warning, as these host passthrough devices cannot be converted. *** Bug 1518539 has been marked as a duplicate of this bug. *** Verify the bug with below builds:
virt-v2v-1.40.2-4.el7.x86_64
libguestfs-1.40.2-4.el7.x86_64
libvirt-4.5.0-15.el7.x86_64
qemu-kvm-rhev-2.12.0-27.el7.x86_64
virtio-win-1.9.7-0.el7.noarch
nbdkit-1.8.0-1.el7.x86_64
Steps:
Scenario1:
1.1 Prepare a linux guest which has "direct" type network
# virsh dumpxml rhel7.6-kvm
<domain type='kvm'>
<name>rhel7.6-kvm</name>
....
<interface type='direct'>
<mac address='52:54:00:1e:c9:3f'/>
<source dev='eno1' mode='bridge'/>
<model type='e1000'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
</interface>
....
1.2 Convert the guest to rhv by virt-v2v,there is virt-v2v warning about direct network is ignored during conversion
# virt-v2v rhel7.6-kvm -o rhv-upload -oc https://ibm-x3250m5-03.rhts.eng.pek2.redhat.com/ovirt-engine/api -oo rhv-cafile=/home/ca.pem -oo rhv-cluster=nfs -oo rhv-direct -os nfs_data -op /tmp/rhvpasswd -of raw
Exception AttributeError: "'module' object has no attribute 'dump_plugin'" in <module 'threading' from '/usr/lib64/python2.7/threading.pyc'> ignored
[ 0.3] Opening the source -i libvirt rhel7.6-kvm
virt-v2v: warning: this guest has a direct network interface which will be
ignored
[ 0.3] Creating an overlay to protect the source from being modified
[ 0.6] Opening the overlay
[ 4.5] Inspecting the overlay
[ 32.1] Checking for sufficient free disk space in the guest
[ 32.1] Estimating space required on target for each disk
[ 32.1] Converting Red Hat Enterprise Linux Server 7.6 (Maipo) to run on KVM
virt-v2v: This guest has virtio drivers installed.
[ 146.7] Mapping filesystem data to avoid copying unused and blank areas
[ 147.3] Closing the overlay
[ 147.6] Assigning disks to buses
[ 147.6] Checking if the guest needs BIOS or UEFI to boot
[ 147.6] Initializing the target -o rhv-upload -oc https://ibm-x3250m5-03.rhts.eng.pek2.redhat.com/ovirt-engine/api -op /tmp/rhvpasswd -os nfs_data
[ 148.9] Copying disk 1/1 to qemu URI json:{ "file.driver": "nbd", "file.path": "/var/tmp/rhvupload.atXwfr/nbdkit0.sock", "file.export": "/" } (raw)
(100.00/100%)
[ 717.9] Creating output metadata
[ 739.6] Finishing off
1.3 Check the guest on rhv after finishing conversion, the direct network has been dropped during step1 and the other checkpoints of guest are passed
Scenario2
2.1 Prepare a windows guest which has direct type network
# virsh dumpxml win2019
<domain type='kvm'>
<name>win2019</name>
....
<interface type='direct'>
<mac address='00:50:56:ac:59:8d'/>
<source dev='eno1' mode='bridge'/>
<model type='e1000'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
</interface>
....
2.2 Convert a windows guest to openstack by virt-v2v,there is virt-v2v warning about direct network is ignored during conversion
# virt-v2v win2019 -o glance
[ 5.8] Opening the source -i libvirt win2019
virt-v2v: warning: this guest has a direct network interface which will be
ignored
[ 5.8] Creating an overlay to protect the source from being modified
[ 6.1] Opening the overlay
[ 10.0] Inspecting the overlay
[ 11.2] Checking for sufficient free disk space in the guest
[ 11.2] Estimating space required on target for each disk
[ 11.2] Converting Windows Server 2019 Standard to run on KVM
virt-v2v: warning: /usr/share/virt-tools/pnp_wait.exe is missing.
Firstboot scripts may conflict with PnP.
virt-v2v: warning: there is no QXL driver for this version of Windows (10.0
x86_64). virt-v2v looks for this driver in
/usr/share/virtio-win/virtio-win.iso
The guest will be configured to use a basic VGA display driver.
virt-v2v: This guest has virtio drivers installed.
[ 16.6] Mapping filesystem data to avoid copying unused and blank areas
[ 17.8] Closing the overlay
[ 18.0] Assigning disks to buses
[ 18.0] Checking if the guest needs BIOS or UEFI to boot
[ 18.0] Initializing the target -o glance
[ 18.0] Copying disk 1/1 to /var/tmp/glance.tdSgL3/sda (raw)
(100.00/100%)
[ 201.9] Creating output metadata
+------------------+----------------------------------------------------------------------------------+
| Property | Value |
+------------------+----------------------------------------------------------------------------------+
| architecture | x86_64 |
| checksum | 8ca94b288c71df2d79cebf29ce291e20 |
| container_format | bare |
| created_at | 2019-04-28T08:13:36Z |
| disk_format | raw |
| hw_cpu_cores | 1 |
| hw_cpu_sockets | 1 |
| hw_disk_bus | virtio |
| hw_machine_type | pc |
| hw_rng_model | virtio |
| hw_video_model | cirrus |
| hw_vif_model | virtio |
| hypervisor_type | kvm |
| id | fe554b39-283f-40fc-83b7-58174898fd23 |
| min_disk | 0 |
| min_ram | 2048 |
| name | win2019 |
| os_distro | windows |
| os_hash_algo | sha512 |
| os_hash_value | 334e7d8735cd9dd3b16dd185a14287e45660eef7da84d97ab1d98610d49836cab8210c3a4629162b |
| | f6f91c886b25de70e2fb0c22979179c3f900791bf643ee27 |
| os_hidden | False |
| os_type | windows |
| os_version | 10 |
| owner | 185bc6f0c2f74933877202c1724e6f9e |
| protected | False |
| size | 21474836480 |
| status | active |
| tags | [] |
| updated_at | 2019-04-28T08:17:36Z |
| virtual_size | None |
| visibility | shared |
| vm_mode | hvm |
+------------------+----------------------------------------------------------------------------------+
[ 447.0] Finishing off
2.3 Launch the guest on openstack and checkpoints of guest are passed
Result:
There is virt-v2v warning about direct network is ignored during virt-v2v conversion if original guest has direct type network, so move the bug from ON_QA to VERIFIED
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/RHEA-2019:2096 |
Created attachment 946200 [details] Log file of conversion guest with macvtap network Description virt-v2v:Network interface disappear after conversion of guest with interface type direct Version: libguestfs-1.27.61-1.1.el7.x86_64 virt-v2v-1.27.61-1.1.el7.x86_64 How reproducible: 100% Steps to Reproduce: 1.Prepare a guest with interface type direct. # virsh dumpxml rhel6.5-test <interface type='direct'> <mac address='52:54:00:6c:01:c5'/> <source dev='enp0s25' mode='vepa'/> <model type='rtl8139'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> </interface> 2.Use virt-v2v to convert the guest to rhev. # virt-v2v -o rhev -os 10.66.90.115:/vol/v2v_auto/auto_export --network rhevm macvtap-test -v -x |& tee /tmp/macvtap-test.log 3.Import the guest to rhev,from rhev GUI,no network shows. 4.Check the ovf file of the guest,there is no content in netework section. <Section xsi:type='ovf:NetworkSection_Type'> <Info>List of networks</Info> </Section> Actual results: Network interface disappear after conversion of guest with interface type direct Expected results: Network interface exists after conversion by virt-v2v. Additional info: