Bug 2125562

Summary: [RFE]Guests should have network after v2v conversion if source vmware guest's network is connected to a distributed switch
Product: Red Hat Enterprise Linux 9 Reporter: mxie <mxie>
Component: virt-v2vAssignee: Virtualization Maintenance <virt-maint>
Status: CLOSED MIGRATED QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 9.1CC: chhu, hongzliu, juzhou, lersek, mtessun, mzhan, rjones, tyan, tzheng, vwu, xiaodwan
Target Milestone: rcKeywords: FutureFeature, MigratedToJIRA, Triaged
Target Release: ---Flags: kkiwi: needinfo? (mtessun)
Hardware: x86_64   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-07-07 19:11:00 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:
Attachments:
Description Flags
guest-has-no-network-after-conversion.png none

Description mxie@redhat.com 2022-09-09 10:05:20 UTC
Created attachment 1910648 [details]
guest-has-no-network-after-conversion.png

Description of problem:
[RFE]Guests should have network after v2v conversion if source vmware guest's network is connected to a distributed switch

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 distributed switch of ESXi host to the guest

# cat esx7.0-rhel8.4-with-VDS-network.vmx |grep ethernet
ethernet0.virtualDev = "vmxnet3"
ethernet0.dvs.switchId = "50 34 26 b2 94 e9 3b 16-1d 68 87 bf ff 4a 54 39"
ethernet0.dvs.portId = "7"
ethernet0.dvs.portgroupId = "dvportgroup-1285"
ethernet0.dvs.connectionId = "40347428"
ethernet0.shares = "normal"
ethernet0.addressType = "vpx"
ethernet0.generatedAddress = "00:50:56:b4:ed:5a"
ethernet0.uptCompatibility = "TRUE"
ethernet0.present = "TRUE"

2.Use virsh to dump the guest xml from VMware
# virsh -c vpx://root.227.27/data/10.73.225.34/?no_verify=1 dumpxml esx7.0-rhel8.4-with-VDS-network
Enter root's password for 10.73.227.27: 
<domain type='vmware' xmlns:vmware='http://libvirt.org/schemas/domain/vmware/1.0'>
  <name>esx7.0-rhel8.4-with-VDS-network</name>
.....
<interface type='vds'>
      <mac address='00:50:56:b4:ed:5a' type='generated'/>
      <source switchid='503426b2-94e9-3b16-1d68-87bfff4a5439' portid='7' portgroupid='dvportgroup-1285' connectionid='40347428'/>
      <model type='vmxnet3'/>
    </interface>
......


3. Convert the guest from VMware to rhv by v2v
#  virt-v2v -ic vpx://root.227.27/data/10.73.225.34/?no_verify=1  -it vddk -io vddk-libdir=/home/vddk7.0.3 -io  vddk-thumbprint=76:75:59:0E:32:F5:1E:58:69:93:75:5A:7B:51:32:C5:D1:6D:F1:21 -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 esx7.0-rhel8.4-with-VDS-network  --mac 00:50:56:b4:ed:5a:bridge:ovirtmgmt -v -x |& tee > v2v-convert-guest-with-distributed-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:
Guests don't have network after v2v conversion if source vmware guest's network is connected to a distributed switch

Expected results:
As above description

Additional info:

Comment 2 Laszlo Ersek 2022-09-22 15:08:50 UTC
(In reply to mxie from comment #0)

> Steps to Reproduce:
> 1.Prepare a VMware guest and assign a network which is connected to a
> distributed switch of ESXi host to the guest

How exactly is this done on the vmware webui?

Is it at all possible on the basic esx webui, or does it require the thick vsphere client?

(Same questions for bug 2125556.)

Thanks!

Comment 4 mxie@redhat.com 2022-09-23 03:38:56 UTC
(In reply to Laszlo Ersek from comment #2)
> (In reply to mxie from comment #0)
> 
> > Steps to Reproduce:
> > 1.Prepare a VMware guest and assign a network which is connected to a
> > distributed switch of ESXi host to the guest
> 
> How exactly is this done on the vmware webui?
> 
> Is it at all possible on the basic esx webui, or does it require the thick
> vsphere client?
> 
> (Same questions for bug 2125556.)
> 
> Thanks!

1. Create a VDS on vsphere web client according to https://www.nakivo.com/blog/vmware-distributed-switch-configuration/
2. Add a new network device which is connected to DPortGroup to a guest, pls refer to screenshot 'vmware-guest-with-vds-network.png'