This bug has been migrated to another issue tracking site. It has been closed here and may no longer be being monitored.

If you would like to get updates for this issue, or to participate in it, you may do so at Red Hat Issue Tracker .
Bug 2125556 - Guests won't have network after v2v conversion if source vmware guest's network is attached to standard switch but no entry 'ethernet0.networkName'
Summary: Guests won't have network after v2v conversion if source vmware guest's netwo...
Keywords:
Status: CLOSED MIGRATED
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: virt-v2v
Version: 9.1
Hardware: x86_64
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Virtualization Maintenance
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-09-09 09:53 UTC by mxie@redhat.com
Modified: 2023-07-07 19:20 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-07-07 19:20:04 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
guest-has-no-network-after-conversion.png (34.31 KB, image/png)
2022-09-09 09:53 UTC, mxie@redhat.com
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker   RHEL-737 0 None None None 2023-07-07 19:20:04 UTC
Red Hat Issue Tracker RHELPLAN-133645 0 None None None 2022-09-09 09:55:47 UTC

Description mxie@redhat.com 2022-09-09 09:53:22 UTC
Created attachment 1910638 [details]
guest-has-no-network-after-conversion.png

Description of problem:
Guests won't have network after v2v conversion if source vmware guest's network is attached to standard switch but no entry 'ethernet0.networkName'

Version-Release number of selected component (if applicable):
virt-v2v-2.0.7-6.el9.x86_64
libguestfs-1.48.4-2.el9.x86_64
libvirt-libs-8.7.0-1.el9.x86_64
qemu-img-7.1.0-1.el9.x86_64
nbdkit-server-1.30.8-1.el9.x86_64
libnbd-1.12.6-1.el9.x86_64
guestfs-tools-1.48.2-5.el9.x86_64



How reproducible:
100%

Steps to Reproduce:
1. Prepare a VMware guest and assign a network which is connected to a standard switch of ESXi host to the guest, but the guest vmx file doesn't have entry 
'ethernet0.networkName' 

#cat esx7.0-rhel9.1-x86_64-uefi-without-secureboot.vmx |grep ethernet
ethernet0.virtualDev = "vmxnet3"
ethernet0.addressType = "vpx"
ethernet0.generatedAddress = "00:50:56:96:4d:83"
ethernet0.uptCompatibility = "TRUE"
ethernet0.present = "TRUE"
ethernet0.pciSlotNumber = "192"
ethernet0.exposeLargeBAR = "TRUE"

2. Use virsh to dump the guest xml from VMware
#   virsh -c vpx://root.213.107/data/10.73.212.38/?no_verify=1 dumpxml Auto-esx7.0-rhel9.1-x86_64-uefi-without-network-name
Enter root's password for 10.73.213.107: 
<domain type='vmware' xmlns:vmware='http://libvirt.org/schemas/domain/vmware/1.0'>
  <name>Auto-esx7.0-rhel9.1-x86_64-uefi-without-network-name</name>
....
    <interface type='null'>
      <mac address='00:50:56:96:4d:83' type='generated'/>
      <model type='vmxnet3'/>
    </interface>
.....


3. Convert the guest from VMware to rhv by v2v
virt-v2v -ic vpx://root.213.107/data/10.73.212.38/?no_verify=1 -it vddk -io vddk-libdir=/home/vddk7.0.3 -io  vddk-thumbprint=87:F9:29:E7:33:DE:34:68:74:3F:6A:C9:61:96:C3:51:E2:1E:EA:2B -o rhv-upload -oc https://dell-per740-22.lab.eng.pek2.redhat.com/ovirt-engine/api  -op /home/rhvpasswd  -os nfs_data -ip /home/passwd Auto-esx7.0-rhel9.1-x86_64-uefi-without-network-name --mac 00:50:56:96:4d:83:bridge:ovirtmgmt -v -x |& tee > v2v-convert-guest-with-standard-switch-no-entry-network-name.log
█ 100% [****************************************]

4. Check the guest after conversion, found guest has no network, pls refer to attached screenshot

Actual results:
As above description

Expected results:
Guests have network after v2v conversion or v2v gives a warning about network during conversion if source vmware guest's network is attched to standard switch but no entry 'ethernet0.networkName'

Additional info:

Comment 2 mxie@redhat.com 2022-09-23 03:54:07 UTC
How to create a vmware guest's network is attached to standard switch but no entry 'ethernet0.networkName' 

1. Use 'Remove from inventory' to remove a guest from ESXi host on vsphere web client
2. Edit vmx file of above vmware guest to delete entry 'ethernet0.networkName' on the server where vmware guest files are stored
3. Register a new guest from above edited vmx file on vsphere web client, then can find network name is empty in guest's settings, pls refer to screenshot 'vmware-guest-without-network-name.png'

Comment 4 Laszlo Ersek 2022-09-23 07:53:23 UTC
(In reply to mxie from comment #2)

> 2. Edit vmx file of above vmware guest to delete entry
> 'ethernet0.networkName' on the server where vmware guest files are stored

Is this a valid / supported configuration step (by vmware), or does it just work by chance / luck?

What is the purpose of this step? What goal does it serve for a normal vmware user?

Thanks!

Comment 5 mxie@redhat.com 2022-09-23 08:54:01 UTC
(In reply to Laszlo Ersek from comment #4)
> (In reply to mxie from comment #2)
> 
> > 2. Edit vmx file of above vmware guest to delete entry
> > 'ethernet0.networkName' on the server where vmware guest files are stored
> 
> Is this a valid / supported configuration step (by vmware), or does it just
> work by chance / luck?
> 
> What is the purpose of this step? What goal does it serve for a normal
> vmware user?
> 
> Thanks!

This is just the way I used to reproduce the bug, in actual customer scenarios, the network name of vmware guest can be empty without editing vmx file. Such as, our another ESXi7.0 host has both standard switch and distributed switch, then open the setting of a guest on this ESXi7.0 host, add a new network device, don't select any network, setting can be saved successfully even if network name is empty. I can send you the VMware env info by mail if you want to try this scenario.

Comment 6 Laszlo Ersek 2022-09-23 09:57:25 UTC
Thanks for explaining!


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