RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1988211 - Can't dump the guest xml from VMware if guest network has no entry 'ethernet0.networkName'
Summary: Can't dump the guest xml from VMware if guest network has no entry 'ethernet0...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: libvirt
Version: 9.0
Hardware: x86_64
OS: Unspecified
medium
medium
Target Milestone: beta
: ---
Assignee: Martin Kletzander
QA Contact: mxie@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-07-30 04:48 UTC by mxie@redhat.com
Modified: 2023-05-09 08:07 UTC (History)
17 users (show)

Fixed In Version: libvirt-8.7.0-1.el9
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-05-09 07:26:10 UTC
Type: Bug
Target Upstream Version: 8.7.0
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 6575841 0 None None None 2022-06-15 04:21:56 UTC
Red Hat Product Errata RHBA-2023:2171 0 None None None 2023-05-09 07:26:53 UTC

Description mxie@redhat.com 2021-07-30 04:48:27 UTC
Description of problem
Can't dump the guest xml from VMware if guest network has no entry 'ethernet0.networkName'


Version-Release number of selected component (if applicable):
libvirt-client-7.5.0-1.el9.x86_64
qemu-kvm-6.0.0-10.el9.x86_64


How reproducible:
100%

Steps to Reproduce:
1.Prepare a guest whose network has no entry 'ethernet0.networkName' on Vmware environment

#cat esx7.0-win2016-date-yyyy-m-d-china/esx7.0-win2016-date-yyyy-m-d-china.vmx |grep ethernet
ethernet0.virtualDev = "e1000e"
ethernet0.addressType = "vpx"
ethernet0.generatedAddress = "00:50:56:83:ef:9a"
ethernet0.present = "TRUE"
ethernet0.pciSlotNumber = "192"


2.Use virsh to dump the guest xml from VMware
# virsh -c vpx://root.198.169/data/10.73.199.217/?no_verify=1  dumpxml esx7.0-win2016-date-yyyy-m-d-china
Enter root's password for 10.73.198.169:
error: internal error: Missing essential config entry 'ethernet0.networkName'


Actual results:
As above description


Expected results:
Can dump the guest xml from VMware if guest network has no entry 'ethernet0.networkName' because VMware guest can power on and boot into OS successfully even if there is no entry 'ethernet0.networkName'

Additional info:
1.Can reproduce the bug on rhel8.5 AV:
libvirt-client-7.5.0-1.module+el8.5.0+11664+59f87560.x86_64
qemu-kvm-6.0.0-25.module+el8.5.0+11890+8e7c3f51.x86_6

Comment 1 Richard W.M. Jones 2021-07-30 06:39:41 UTC
Does this affect virt-v2v?  Presumably it would stop us from
getting the libvirt XML which is the first step for VMware conversions.

Comment 2 mxie@redhat.com 2021-07-30 08:11:22 UTC
(In reply to Richard W.M. Jones from comment #1)
> Does this affect virt-v2v?  Presumably it would stop us from
> getting the libvirt XML which is the first step for VMware conversions.

Yes, v2v conversion will be failed 

# virt-v2v -ic vpx://root.198.169/data/10.73.199.217/?no_verify=1 -it vddk -io vddk-libdir=/home/vddk7.0.2 -io  vddk-thumbprint=B5:52:1F:B4:21:09:45:24:51:32:56:F6:63:6A:93:5D:54:08:2D:78 esx7.0-win2016-date-yyyy-m-d-china   -o rhv-upload -of qcow2 -oc https://dell-per740-22.lab.eng.pek2.redhat.com/ovirt-engine/api -ip /home/passwd -op /home/rhvpasswd  -os nfs_data  -b ovirtmgmt 
[   0.9] Opening the source -i libvirt -ic vpx://root.198.169/data/10.73.199.217/?no_verify=1 esx7.0-win2016-date-yyyy-m-d-china -it vddk  -io vddk-libdir=/home/vddk7.0.2 -io vddk-thumbprint=B5:52:1F:B4:21:09:45:24:51:32:56:F6:63:6A:93:5D:54:08:2D:78
virt-v2v: error: exception: libvirt: VIR_ERR_INTERNAL_ERROR: VIR_FROM_NONE: 
internal error: Missing essential config entry 'ethernet0.networkName'

If reporting bugs, run virt-v2v with debugging enabled and include the 
complete output:

  virt-v2v -v -x [...]

Comment 8 Jaroslav Suchanek 2022-07-29 14:26:08 UTC
Martin, please have a look. This has increased in priority. Thanks.

Comment 9 Martin Kletzander 2022-08-01 07:25:51 UTC
I suppose this config describes a VM with a network adapter that is not connected to any network.  Is that what it looks like when this VM boots in VMWare?

Comment 10 mxie@redhat.com 2022-08-01 08:30:29 UTC
(In reply to Martin Kletzander from comment #9)
> I suppose this config describes a VM with a network adapter that is not
> connected to any network.  Is that what it looks like when this VM boots in
> VMWare?

VM guest can boot into OS normally if there is no entry 'ethernet0.networkName' in guest vmx file and config setting, details pls refer to screenshots "guest-has-no-network-name-in-setting-and-vmx.png" and "guest-boot-normally-when-no-network-name-in-setting-and-vmx.png.png"

Comment 14 Richard W.M. Jones 2022-08-01 09:19:54 UTC
https://github.com/libguestfs/virt-v2v/blob/ddab06d5eb99696f5fd1073b8ec91efbc8c3e4ab/lib/types.ml#L67

This is what virt-v2v models internally, so fetching as much of that
information as possible would be what we want.  The most important
parts are the MAC address and the emulated network card (eg. "e1000e").

Comment 22 mxie@redhat.com 2022-09-09 06:51:50 UTC
Reproduce the bug with below builds:
libvirt-libs-8.5.0-6.el9.x86_64
qemu-img-7.0.0-12.el9.x86_64


Steps to reproduce:

Scenario1:
1.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"

1.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: 
error: internal error: Missing essential config entry 'ethernet0.networkName'


Scenario2:
2.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.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: 
error: internal error: Missing essential config entry 'ethernet0.networkName'


Test the bug with below builds:
libvirt-libs-8.7.0-1.el9.x86_64
qemu-img-7.1.0-1.el9.x86_64

Steps:
1. Use virsh to dump the guest xml of step1.1 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>
.....

2. Use virsh to dump the guest xml of step2.1 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>
......


Result:
   The bug has been fixed.

Comment 26 mxie@redhat.com 2022-09-27 05:50:08 UTC
Verify the bug with below builds:
libvirt-client-8.7.0-1.el9.x86_64
qemu-img-7.1.0-1.el9.x86_64


Steps:
1.Prepare a ESXi host which has both standard switch and distributed switch, then prepare a guest which has two network devices, one is connected to distributed switch,which has network name 'DPortGroup', another one isn't connected any switch,which has empty network name


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-x86_64
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-x86_64</name>
    .....
    <interface type='vds'>
      <mac address='00:50:56:b4:4e:19' type='generated'/>
      <source switchid='503426b2-94e9-3b16-1d68-87bfff4a5439' portid='6' portgroupid='dvportgroup-1285' connectionid='136631795'/>
      <model type='vmxnet3'/>
    </interface>
    <interface type='null'>
      <mac address='00:50:56:b4:f0:1a' type='generated'/>
      <model type='vmxnet3'/>
    </interface>
    <video>
      <model type='vmvga' vram='8192' primary='yes'/>
    </video>
  </devices>
  <vmware:datacenterpath>data</vmware:datacenterpath>
  <vmware:moref>vm-122</vmware:moref>
</domain>


Result:
   The bug has been fixed, move the bug from ON_QA to VERIFIED

Comment 28 errata-xmlrpc 2023-05-09 07:26:10 UTC
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 (libvirt bug fix and enhancement update), 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-2023:2171


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