From: Martin Kletzander <mkletzan(a)redhat.com>
Resolves:
https://issues.redhat.com/browse/RHEL-7390
Signed-off-by: Martin Kletzander <mkletzan(a)redhat.com>
---
src/vmx/vmx.c | 84 ++++++++++++++++++-
tests/vmx2xmldata/esx-in-the-wild-15.vmx | 100 +++++++++++++++++++++++
tests/vmx2xmldata/esx-in-the-wild-15.xml | 45 ++++++++++
tests/vmx2xmldata/esx-in-the-wild-16.vmx | 91 +++++++++++++++++++++
tests/vmx2xmldata/esx-in-the-wild-16.xml | 37 +++++++++
tests/vmx2xmltest.c | 2 +
6 files changed, 358 insertions(+), 1 deletion(-)
create mode 100644 tests/vmx2xmldata/esx-in-the-wild-15.vmx
create mode 100644 tests/vmx2xmldata/esx-in-the-wild-15.xml
create mode 100644 tests/vmx2xmldata/esx-in-the-wild-16.vmx
create mode 100644 tests/vmx2xmldata/esx-in-the-wild-16.xml
diff --git a/src/vmx/vmx.c b/src/vmx/vmx.c
index 7fa00669a717..47eabe33c64e 100644
--- a/src/vmx/vmx.c
+++ b/src/vmx/vmx.c
@@ -97,6 +97,7 @@ def->os
sata[0..3]:[0..29] ->
<controller>:<unit> with 1 bus per controller
ide[0..1]:[0..1] ->
<bus>:<unit> with 1 controller
floppy[0..1] -> <unit> with 1
controller and 1 bus per controller
+ nvme[0..3]:[0..14] ->
<controller>:<namespace> with 1 bus per controller
def->disks[0]...
@@ -308,6 +309,19 @@ def->disks[0]...
->slotnum
+## disks: nvme hard drive ######################################################
+
+ nvme[0...3].present = "true"
# defaults to "false"
+ nvme[0...3]:[0...14].present = "true"
# defaults to "false"
+# Limits are taken from
https://configmax.broadcom.com/guest?vmwareproduct=vSphere&release=vS...
+...
+->type = _DISK_TYPE_FILE
+->device = _DISK_DEVICE_DISK
+->bus = _DISK_BUS_NVME
+->src = <value>.vmdk <=> nvme0:0.fileName =
"<value>.vmdk"
+->dst = nvme<controller>n<namespace>
+->cachemode <=> nvme0:0.writeThrough =
"<value>" # defaults to false, true -> _DISK_CACHE_WRITETHRU,
false _DISK_CACHE_DEFAULT
+
################################################################################
## filesystems #################################################################
@@ -573,6 +587,7 @@ static int virVMXParseVNC(virConf *conf, virDomainGraphicsDef **def);
static int virVMXParseSCSIController(virConf *conf, int controller, bool *present,
int *virtualDev);
static int virVMXParseSATAController(virConf *conf, int controller, bool *present);
+static int virVMXParseNVMEController(virConf *conf, int controller, bool *present);
static int virVMXParseDisk(virVMXContext *ctx, virDomainXMLOption *xmlopt,
virConf *conf, int device, int busType,
int controllerOrBus, int unit, virDomainDiskDef **def,
@@ -1843,6 +1858,30 @@ virVMXParseConfig(virVMXContext *ctx,
VIR_APPEND_ELEMENT(def->disks, def->ndisks, disk);
}
+ /* def:disks (nvme) */
+ for (controller = 0; controller < 4; ++controller) {
+ if (virVMXParseNVMEController(conf, controller, &present) < 0)
+ goto cleanup;
+
+ if (!present)
+ continue;
+
+ for (unit = 0; unit < 15; unit++) {
+ g_autoptr(virDomainDiskDef) disk = NULL;
+
+ if (virVMXParseDisk(ctx, xmlopt, conf, VIR_DOMAIN_DISK_DEVICE_DISK,
+ VIR_DOMAIN_DISK_BUS_NVME, controller, unit,
+ &disk, def) < 0) {
+ goto cleanup;
+ }
+
+ if (!disk)
+ continue;
+
+ VIR_APPEND_ELEMENT(def->disks, def->ndisks, disk);
+ }
+ }
+
/* def:fss */
if (virVMXGetConfigBoolean(conf, "isolation.tools.hgfs.disable",
&hgfs_disabled, true, true) < 0) {
@@ -2156,6 +2195,27 @@ virVMXParseSATAController(virConf *conf, int controller, bool
*present)
}
+static int
+virVMXParseNVMEController(virConf *conf, int controller, bool *present)
+{
+ char present_name[32];
+
+ if (controller < 0 || controller > 3) {
+ virReportError(VIR_ERR_INTERNAL_ERROR,
+ _("NVMe controller index %1$d out of [0..3] range"),
+ controller);
+ return -1;
+ }
+
+ g_snprintf(present_name, sizeof(present_name), "nvme%d.present",
controller);
+
+ if (virVMXGetConfigBoolean(conf, present_name, present, false, true) < 0)
+ return -1;
+
+ return 0;
+}
+
+
static int
virVMXGenerateDiskTarget(virDomainDiskDef *def,
virDomainDef *vmdef,
@@ -2164,6 +2224,7 @@ virVMXGenerateDiskTarget(virDomainDiskDef *def,
{
const char *prefix = NULL;
unsigned int idx = 0;
+ unsigned int nvme_ctrl = 0;
switch (def->bus) {
case VIR_DOMAIN_DISK_BUS_SCSI:
@@ -2241,6 +2302,25 @@ virVMXGenerateDiskTarget(virDomainDiskDef *def,
break;
case VIR_DOMAIN_DISK_BUS_NVME:
+ if (controllerOrBus < 0 || controllerOrBus > 3) {
+ virReportError(VIR_ERR_INTERNAL_ERROR,
+ _("NVMe controller index %1$d out of [0..3]
range"),
+ controllerOrBus);
+ return -1;
+ }
+
+ if (unit < 0 || unit > 14) {
+ virReportError(VIR_ERR_INTERNAL_ERROR,
+ _("NVMe NSID %1$d out of [0..14] range"),
+ unit);
+ return -1;
+ }
+
+ prefix = "nvme";
+ nvme_ctrl = controllerOrBus;
+ idx = unit;
+ break;
+
case VIR_DOMAIN_DISK_BUS_VIRTIO:
case VIR_DOMAIN_DISK_BUS_XEN:
case VIR_DOMAIN_DISK_BUS_USB:
@@ -2258,7 +2338,7 @@ virVMXGenerateDiskTarget(virDomainDiskDef *def,
return -1;
}
- def->dst = virIndexToDiskName(0, idx, prefix);
+ def->dst = virIndexToDiskName(nvme_ctrl, idx, prefix);
return 0;
}
@@ -2339,6 +2419,8 @@ virVMXParseDisk(virVMXContext *ctx, virDomainXMLOption *xmlopt,
virConf *conf,
prefix = g_strdup_printf("sata%d:%d", controllerOrBus, unit);
} else if (busType == VIR_DOMAIN_DISK_BUS_IDE) {
prefix = g_strdup_printf("ide%d:%d", controllerOrBus, unit);
+ } else if (busType == VIR_DOMAIN_DISK_BUS_NVME) {
+ prefix = g_strdup_printf("nvme%d:%d", controllerOrBus, unit);
} else {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("Unsupported bus type '%1$s' for device type
'%2$s'"),
diff --git a/tests/vmx2xmldata/esx-in-the-wild-15.vmx
b/tests/vmx2xmldata/esx-in-the-wild-15.vmx
new file mode 100644
index 000000000000..5a37e3c1a64a
--- /dev/null
+++ b/tests/vmx2xmldata/esx-in-the-wild-15.vmx
@@ -0,0 +1,100 @@
+.encoding = "UTF-8"
+config.version = "8"
+virtualHW.version = "19"
+vmci0.present = "TRUE"
+floppy0.present = "FALSE"
+numvcpus = "2"
+memSize = "2048"
+tools.upgrade.policy = "manual"
+sched.cpu.units = "mhz"
+vm.createDate = "1576746358597648"
+nvme0.present = "TRUE"
+ide0:0.startConnected = "FALSE"
+ide0:0.deviceType = "atapi-cdrom"
+ide0:0.fileName = "/vmfs/devices/cdrom/mpx.vmhba0:C0:T0:L0"
+ide0:0.present = "TRUE"
+nvme0:0.fileName = "dokuwiki.vmdk"
+sched.nvme0:0.shares = "normal"
+sched.nvme0:0.throughputCap = "off"
+nvme0:0.present = "TRUE"
+nvme0:1.fileName = "dokuwiki_1.vmdk"
+sched.nvme0:1.shares = "normal"
+sched.nvme0:1.throughputCap = "off"
+nvme0:1.present = "TRUE"
+ethernet0.virtualDev = "vmxnet3"
+ethernet0.networkName = "inside"
+ethernet0.addressType = "vpx"
+ethernet0.generatedAddress = "00:50:56:83:c9:0c"
+ethernet0.uptCompatibility = "TRUE"
+ethernet0.present = "TRUE"
+displayName = "dokuwiki"
+guestOS = "debian11-64"
+toolScripts.afterPowerOn = "TRUE"
+toolScripts.afterResume = "TRUE"
+toolScripts.beforeSuspend = "TRUE"
+toolScripts.beforePowerOff = "TRUE"
+tools.syncTime = "FALSE"
+uuid.bios = "42 03 38 bd 1c 9e ad 50-99 a2 59 e9 2d dd a8 b6"
+vc.uuid = "50 03 41 d5 fe 23 ac 46-8c b3 77 a8 e5 a1 14 3d"
+tools.guest.desktop.autolock = "FALSE"
+nvram = "dokuwiki.nvram"
+pciBridge0.present = "TRUE"
+svga.present = "TRUE"
+pciBridge4.present = "TRUE"
+pciBridge4.virtualDev = "pcieRootPort"
+pciBridge4.functions = "8"
+pciBridge5.present = "TRUE"
+pciBridge5.virtualDev = "pcieRootPort"
+pciBridge5.functions = "8"
+pciBridge6.present = "TRUE"
+pciBridge6.virtualDev = "pcieRootPort"
+pciBridge6.functions = "8"
+pciBridge7.present = "TRUE"
+pciBridge7.virtualDev = "pcieRootPort"
+pciBridge7.functions = "8"
+hpet0.present = "TRUE"
+sched.cpu.latencySensitivity = "normal"
+svga.autodetect = "TRUE"
+ethernet0.pciSlotNumber = "192"
+monitor.phys_bits_used = "45"
+numa.autosize.cookie = "20012"
+numa.autosize.vcpu.maxPerVirtualNode = "2"
+pciBridge0.pciSlotNumber = "17"
+pciBridge4.pciSlotNumber = "21"
+pciBridge5.pciSlotNumber = "22"
+pciBridge6.pciSlotNumber = "23"
+pciBridge7.pciSlotNumber = "24"
+softPowerOff = "FALSE"
+vmci0.pciSlotNumber = "32"
+vmotion.checkpointFBSize = "4194304"
+vmotion.checkpointSVGAPrimarySize = "16777216"
+svga.guestBackedPrimaryAware = "TRUE"
+viv.moid =
"b06e4d96-3801-44bc-a80b-000c9d5011de:vm-4132:xfcr8Wfnh0NDebe8d4RfGMCmMZwHgM/hdwwwZBOfda0="
+toolsInstallManager.updateCounter = "5"
+guestInfo.detailed.data = "architecture='X86' bitness='64'
distroAddlVersion='12 (bookworm)' distroName='Debian GNU/Linux'
distroVersion='12' familyName='Linux'
kernelVersion='6.1.0-31-amd64' prettyName='Debian GNU/Linux 12
(bookworm)'"
+nvme0.pciSlotNumber = "224"
+vmotion.svga.mobMaxSize = "16777216"
+vmotion.svga.graphicsMemoryKB = "16384"
+nvme0.subnqnUUID = "52 1c 76 62 33 0a 35 92-ec d2 e8 fb b6 1e 48 40"
+migrate.hostLog = "dokuwiki-4798ad89.hlog"
+sched.cpu.min = "0"
+sched.cpu.shares = "normal"
+sched.mem.min = "0"
+sched.mem.minSize = "0"
+sched.mem.shares = "normal"
+migrate.encryptionMode = "opportunistic"
+ftcpt.ftEncryptionMode = "ftEncryptionOpportunistic"
+guestinfo.vmtools.buildNumber = "21223074"
+guestinfo.vmtools.description = "open-vm-tools 12.2.0 build 21223074"
+guestinfo.vmtools.versionNumber = "12352"
+guestinfo.vmtools.versionString = "12.2.0"
+guestinfo.vmware.components.available = "none"
+sched.swap.derivedName =
"/vmfs/volumes/730da1ed-8e83d87a-0000-000000000000/dokuwiki/dokuwiki-dc0a874b.vswp"
+uuid.location = "56 4d 1b 77 e4 d9 3e 43-31 31 2a 9b d2 d5 b1 18"
+nvme0:0.redo = ""
+nvme0:1.redo = ""
+svga.vramSize = "16777216"
+vmci0.id = "769501366"
+cleanShutdown = "FALSE"
+config.readOnly = "FALSE"
+guestinfo.appInfo = "{|0A|22version|22:|221|22, |0A|22updateCounter|22:|224|22,
|0A|22publishTime|22:|222025-03-07T05:47:53.504Z|22,
|0A|22applications|22:[|0A{|22a|22:|22kworker/1:2-ata_sff|22,|22v|22:|22|22},|0A{|22a|22:|22kworker/1:0-ata_sff|22,|22v|22:|22|22},|0A{|22a|22:|22kworker/0:1|22,|22v|22:|22|22},|0A{|22a|22:|22kworker/1:1-events|22,|22v|22:|22|22},|0A{|22a|22:|22kworker/u4:2-events_unbound|22,|22v|22:|22|22},|0A{|22a|22:|22apache2|22,|22v|22:|22|22},|0A{|22a|22:|22kworker/0:3-events|22,|22v|22:|22|22},|0A{|22a|22:|22kworker/u4:0-events_unbound|22,|22v|22:|22|22},|0A{|22a|22:|22exim4|22,|22v|22:|22|22},|0A{|22a|22:|22sshd:
/usr/sbin/sshd -D [listener] 0 of 10-100
startups|22,|22v|22:|22|22},|0A{|22a|22:|22agetty|22,|22v|22:|22|22},|0A{|22a|22:|22cron|22,|22v|22:|22|22},|0A{|22a|22:|22systemd-logind|22,|22v|22:|22|22},|0A{|22a|22:|22rsyslogd|22,|22v|22:|22|22},|0A{|22a|22:|22dbus-daemon|22,|22v|22:|22|22},|0A{|22a|22:|22acpid|22,|22v|22:|22|22},|0A{|22a|22:|22xprtiod|22,|22v|22:|22|22},|0A{|22a|22:|22rpciod|22,|22v|22:|22|22},|0A{|22a|22:|22vmtoolsd|22,|22v|22:|22|22},|0A{|22a|22:|22VGAuthService|22,|22v|22:|22|22},|0A{|22a|22:|22systemd-timesyncd|22,|22v|22:|22|22},|0A{|22a|22:|22rpcbind|22,|22v|22:|22|22},|0A{|22a|22:|22irq/16-vmwgfx|22,|22v|22:|22|22},|0A{|22a|22:|22irq/63-vmw_vmci|22,|22v|22:|22|22},|0A{|22a|22:|22irq/62-vmw_vmci|22,|22v|22:|22|22},|0A{|22a|22:|22systemd-udevd|22,|22v|22:|22|22},|0A{|22a|22:|22systemd-journald|22,|22v|22:|22|22},|0A{|22a|22:|22ext4-rsv-conver|22,|22v|22:|22|22},|0A{|22a|22:|22jbd2/nvme0n1p1-8|22,|22v|22:|22|22},|0A{|22a|22:|22kworker/1:2H-kblockd|22,|22v|22:|22|22},|0A{|22a|22:|22nvme-delete-wq|22,|22v|22:|22|22},|0A{|22a|22:|22nvme-reset-wq|22,|22v|22:|22|22},|0A{|22a|22:|22nvme-wq|22,|22v|22:|22|22},|0A{|22a|22:|22scsi_tmf_1|22,|22v|22:|22|22},|0A{|22a|22:|22scsi_eh_1|22,|22v|22:|22|22},|0A{|22a|22:|22scsi_tmf_0|22,|22v|22:|22|22},|0A{|22a|22:|22scsi_eh_0|22,|22v|22:|22|22},|0A{|22a|22:|22ata_sff|22,|22v|22:|22|22},|0A{|22a|22:|22kworker/0:1H-kblockd|22,|22v|22:|22|22},|0A{|22a|22:|22kworker/u5:0|22,|22v|22:|22|22},|0A{|22a|22:|22zswap-shrink|22,|22v|22:|22|22},|0A{|22a|22:|22kstrp|22,|22v|22:|22|22},|0A{|22a|22:|22ipv6_addrconf|22,|22v|22:|22|22},|0A{|22a|22:|22mld|22,|22v|22:|22|22},|0A{|22a|22:|22acpi_thermal_pm|22,|22v|22:|22|22},|0A{|22a|22:|22irq/55-pciehp|22,|22v|22:|22|22},|0A{|22a|22:|22irq/54-pciehp|22,|22v|22:|22|22},|0A{|22a|22:|22irq/53-pciehp|22,|22v|22:|22|22},|0A{|22a|22:|22irq/52-pciehp|22,|22v|22:|22|22},|0A{|22a|22:|22irq/51-pciehp|22,|22v|22:|22|22},|0A{|22a|22:|22irq/50-pciehp|22,|22v|22:|22|22},|0A{|22a|22:|22irq/49-pciehp|22,|22v|22:|22|22},|0A{|22a|22:|22irq/48-pciehp|22,|22v|22:|22|22},|0A{|22a|22:|22irq/47-pciehp|22,|22v|22:|22|22},|0A{|22a|22:|22irq/46-pciehp|22,|22v|22:|22|22},|0A{|22a|22:|22irq/45-pciehp|22,|22v|22:|22|22},|0A{|22a|22:|22irq/44-pciehp|22,|22v|22:|22|22},|0A{|22a|22:|22irq/43-pciehp|22,|22v|22:|22|22},|0A{|22a|22:|22irq/42-pciehp|22,|22v|22:|22|22},|0A{|22a|22:|22irq/41-pciehp|22,|22v|22:|22|22},|0A{|22a|22:|22irq/40-pciehp|22,|22v|22:|22|22},|0A{|22a|22:|22irq/39-pciehp|22,|22v|22:|22|22},|0A{|22a|22:|22irq/38-pciehp|22,|22v|22:|22|22},|0A{|22a|22:|22irq/37-pciehp|22,|22v|22:|22|22},|0A{|22a|22:|22irq/36-pciehp|22,|22v|22:|22|22},|0A{|22a|22:|22irq/35-pciehp|22,|22v|22:|22|22},|0A{|22a|22:|22irq/34-pciehp|22,|22v|22:|22|22},|0A{|22a|22:|22irq/33-pciehp|22,|22v|22:|22|22},|0A{|22a|22:|22irq/32-pciehp|22,|22v|22:|22|22},|0A{|22a|22:|22irq/31-pciehp|22,|22v|22:|22|22},|0A{|22a|22:|22irq/30-pciehp|22,|22v|22:|22|22},|0A{|22a|22:|22irq/29-pciehp|22,|22v|22:|22|22},|0A{|22a|22:|22irq/28-pciehp|22,|22v|22:|22|22},|0A{|22a|22:|22irq/27-pciehp|22,|22v|22:|22|22},|0A{|22a|22:|22irq/26-pciehp|22,|22v|22:|22|22},|0A{|22a|22:|22irq/25-pciehp|22,|22v|22:|22|22},|0A{|22a|22:|22irq/24-pciehp|22,|22v|22:|22|22},|0A{|22a|22:|22kthrotld|22,|22v|22:|22|22},|0A{|22a|22:|22kswapd0|22,|22v|22:|22|22},|0A{|22a|22:|22kworker/1:1H-kblockd|22,|22v|22:|22|22},|0A{|22a|22:|22devfreq_wq|22,|22v|22:|22|22},|0A{|22a|22:|22edac-poller|22,|22v|22:|22|22},|0A{|22a|22:|22tpm_dev_wq|22,|22v|22:|22|22},|0A{|22a|22:|22blkcg_punt_bio|22,|22v|22:|22|22},|0A{|22a|22:|22kblockd|22,|22v|22:|22|22},|0A{|22a|22:|22kintegrityd|22,|22v|22:|22|22},|0A{|22a|22:|22khugepaged|22,|22v|22:|22|22},|0A{|22a|22:|22ksmd|22,|22v|22:|22|22},|0A{|22a|22:|22kcompactd0|22,|22v|22:|22|22},|0A{|22a|22:|22writeback|22,|22v|22:|22|22},|0A{|22a|22:|22oom_reaper|22,|22v|22:|22|22},|0A{|22a|22:|22khungtaskd|22,|22v|22:|22|22},|0A{|22a|22:|22kauditd|22,|22v|22:|22|22},|0A{|22a|22:|22inet_frag_wq|22,|22v|22:|22|22},|0A{|22a|22:|22kdevtmpfs|22,|22v|22:|22|22},|0A{|22a|22:|22ksoftirqd/1|22,|22v|22:|22|22},|0A{|22a|22:|22migration/1|22,|22v|22:|22|22},|0A{|22a|22:|22cpuhp/1|22,|22v|22:|22|22},|0A{|22a|22:|22cpuhp/0|22,|22v|22:|22|22},|0A{|22a|22:|22migration/0|22,|22v|22:|22|22},|0A{|22a|22:|22rcu_preempt|22,|22v|22:|22|22},|0A{|22a|22:|22ksoftirqd/0|22,|22v|22:|22|22},|0A{|22a|22:|22rcu_tasks_trace_kthread|22,|22v|22:|22|22},|0A{|22a|22:|22rcu_tasks_rude_kthread|22,|22v|22:|22|22},|0A{|22a|22:|22rcu_tasks_kthread|22,|22v|22:|22|22},|0A{|22a|22:|22mm_percpu_wq|22,|22v|22:|22|22},|0A{|22a|22:|22kworker/0:0H-events_highpri|22,|22v|22:|22|22},|0A{|22a|22:|22netns|22,|22v|22:|22|22},|0A{|22a|22:|22slub_flushwq|22,|22v|22:|22|22},|0A{|22a|22:|22rcu_par_gp|22,|22v|22:|22|22},|0A{|22a|22:|22rcu_gp|22,|22v|22:|22|22},|0A{|22a|22:|22kthreadd|22,|22v|22:|22|22},|0A{|22a|22:|22init|22,|22v|22:|22|22}]}"
diff --git a/tests/vmx2xmldata/esx-in-the-wild-15.xml
b/tests/vmx2xmldata/esx-in-the-wild-15.xml
new file mode 100644
index 000000000000..77b094e9d5b5
--- /dev/null
+++ b/tests/vmx2xmldata/esx-in-the-wild-15.xml
@@ -0,0 +1,45 @@
+<domain type='vmware'>
+ <name>dokuwiki</name>
+ <uuid>420338bd-1c9e-ad50-99a2-59e92ddda8b6</uuid>
+ <memory unit='KiB'>2097152</memory>
+ <currentMemory unit='KiB'>2097152</currentMemory>
+ <vcpu placement='static'>2</vcpu>
+ <cputune>
+ <shares>2000</shares>
+ </cputune>
+ <os>
+ <type arch='x86_64'>hvm</type>
+ </os>
+ <clock offset='utc'/>
+ <on_poweroff>destroy</on_poweroff>
+ <on_reboot>restart</on_reboot>
+ <on_crash>destroy</on_crash>
+ <devices>
+ <disk type='block' device='cdrom'>
+ <source dev='/vmfs/devices/cdrom/mpx.vmhba0:C0:T0:L0'/>
+ <target dev='hda' bus='ide'/>
+ <readonly/>
+ <address type='drive' controller='0' bus='0'
target='0' unit='0'/>
+ </disk>
+ <disk type='file' device='disk'>
+ <source file='[datastore] directory/dokuwiki.vmdk'/>
+ <target dev='nvme0n1' bus='nvme'/>
+ <address type='drive' controller='0' bus='0'
target='0' unit='0'/>
+ </disk>
+ <disk type='file' device='disk'>
+ <source file='[datastore] directory/dokuwiki_1.vmdk'/>
+ <target dev='nvme0n2' bus='nvme'/>
+ <address type='drive' controller='0' bus='0'
target='0' unit='1'/>
+ </disk>
+ <controller type='ide' index='0'/>
+ <controller type='nvme' index='0'/>
+ <interface type='bridge'>
+ <mac address='00:50:56:83:c9:0c' type='generated'/>
+ <source bridge='inside'/>
+ <model type='vmxnet3'/>
+ </interface>
+ <video>
+ <model type='vmvga' vram='16384' primary='yes'/>
+ </video>
+ </devices>
+</domain>
diff --git a/tests/vmx2xmldata/esx-in-the-wild-16.vmx
b/tests/vmx2xmldata/esx-in-the-wild-16.vmx
new file mode 100644
index 000000000000..ffbb64c30357
--- /dev/null
+++ b/tests/vmx2xmldata/esx-in-the-wild-16.vmx
@@ -0,0 +1,91 @@
+.encoding = "UTF-8"
+config.version = "8"
+virtualHW.version = "20"
+nvram = "Auto-esx8.0-rhel9.4-efi-nvme-disk.nvram"
+svga.present = "TRUE"
+vmci0.present = "TRUE"
+hpet0.present = "TRUE"
+floppy0.present = "FALSE"
+svga.vramSize = "8388608"
+RemoteDisplay.maxConnections = "-1"
+memSize = "2048"
+firmware = "efi"
+powerType.powerOff = "default"
+powerType.suspend = "default"
+powerType.reset = "default"
+tools.upgrade.policy = "manual"
+sched.cpu.units = "mhz"
+sched.cpu.affinity = "all"
+sched.cpu.latencySensitivity = "normal"
+vm.createDate = "1714291828619860"
+scsi0.virtualDev = "pvscsi"
+scsi0.present = "TRUE"
+sata0.present = "TRUE"
+sata0:0.deviceType = "atapi-cdrom"
+sata0:0.fileName = "emptyBackingString"
+sata0:0.present = "TRUE"
+ethernet0.allowGuestConnectionControl = "FALSE"
+ethernet0.virtualDev = "vmxnet3"
+ethernet0.networkName = "VM Network"
+ethernet0.addressType = "vpx"
+ethernet0.generatedAddress = "00:50:56:a0:a6:7e"
+ethernet0.uptCompatibility = "TRUE"
+ethernet0.present = "TRUE"
+displayName = "Auto-esx8.0-rhel9.4-efi-nvme-disk"
+guestOS = "rhel9-64"
+chipset.motherboardLayout = "acpi"
+uefi.secureBoot.enabled = "TRUE"
+toolScripts.afterPowerOn = "TRUE"
+toolScripts.afterResume = "TRUE"
+toolScripts.beforeSuspend = "TRUE"
+toolScripts.beforePowerOff = "TRUE"
+uuid.bios = "42 20 df 89 e3 a8 85 13-f6 11 ad 25 2b fd 70 47"
+vc.uuid = "50 20 19 6e c5 c8 73 10-fc db d2 93 3d 0c 4b 2f"
+migrate.hostLog = "Auto-esx8.0-rhel9.4-efi-nvme-disk-2f773b32.hlog"
+sched.cpu.min = "0"
+sched.cpu.shares = "normal"
+sched.mem.min = "0"
+sched.mem.minSize = "0"
+sched.mem.shares = "normal"
+migrate.encryptionMode = "opportunistic"
+ftcpt.ftEncryptionMode = "ftEncryptionOpportunistic"
+viv.moid =
"e00e5864-a7ed-4b49-b99a-71da911f679c:vm-1153:hT+j9eNfGClvAYYIPwnfo375t/28bM62O4s/axWXFiQ="
+nvme0.present = "TRUE"
+nvme0:0.fileName = "Auto-esx8.0-rhel9.4-efi-nvme-disk.vmdk"
+nvme0:0.present = "TRUE"
+sched.nvme0:0.shares = "normal"
+sched.nvme0:0.throughputCap = "off"
+vmxstats.filename = "Auto-esx8.0-rhel9.4-efi-nvme-disk.scoreboard"
+numa.autosize.cookie = "10012"
+numa.autosize.vcpu.maxPerVirtualNode = "1"
+cpuid.coresPerSocket.cookie = "1"
+sched.swap.derivedName =
"/vmfs/volumes/c97af7e9-686a74ad/Auto-esx8.0-rhel9.4-efi-nvme-disk/Auto-esx8.0-rhel9.4-efi-nvme-disk-c0e0a2b4.vswp"
+uuid.location = "56 4d 50 90 75 ac 76 f0-75 bb f2 3b ae e2 71 2f"
+pciBridge1.present = "TRUE"
+pciBridge1.virtualDev = "pciRootBridge"
+pciBridge1.functions = "1"
+pciBridge1:0.pxm = "0"
+pciBridge0.present = "TRUE"
+pciBridge0.virtualDev = "pciRootBridge"
+pciBridge0.functions = "1"
+pciBridge0.pxm = "-1"
+scsi0.pciSlotNumber = "32"
+ethernet0.pciSlotNumber = "33"
+sata0.pciSlotNumber = "34"
+nvme0.pciSlotNumber = "35"
+nvme0:0.redo = ""
+scsi0.sasWWID = "50 05 05 69 e3 a8 85 10"
+vmotion.checkpointFBSize = "8388608"
+vmotion.checkpointSVGAPrimarySize = "8388608"
+vmotion.svga.mobMaxSize = "8388608"
+vmotion.svga.graphicsMemoryKB = "8192"
+vmci0.id = "738029639"
+nvme0.subnqnUUID = "52 1c e6 f0 b2 e7 62 ee-8e 17 e3 79 14 52 b2 91"
+monitor.phys_bits_used = "45"
+cleanShutdown = "TRUE"
+softPowerOff = "TRUE"
+svga.guestBackedPrimaryAware = "TRUE"
+tools.syncTime = "FALSE"
+guestInfo.detailed.data = "architecture='X86' bitness='64'
cpeString='cpe:/o:redhat:enterprise_linux:9::baseos' distroAddlVersion='9.4
(Plow)' distroName='Red Hat Enterprise Linux' distroVersion='9.4'
familyName='Linux' kernelVersion='5.14.0-383.el9.x86_64'
prettyName='Red Hat Enterprise Linux 9.4 Beta (Plow)'"
+sata0:0.startConnected = "FALSE"
+sata0:0.clientDevice = "TRUE"
diff --git a/tests/vmx2xmldata/esx-in-the-wild-16.xml
b/tests/vmx2xmldata/esx-in-the-wild-16.xml
new file mode 100644
index 000000000000..147bc0825a09
--- /dev/null
+++ b/tests/vmx2xmldata/esx-in-the-wild-16.xml
@@ -0,0 +1,37 @@
+<domain type='vmware'>
+ <name>Auto-esx8.0-rhel9.4-efi-nvme-disk</name>
+ <uuid>4220df89-e3a8-8513-f611-ad252bfd7047</uuid>
+ <memory unit='KiB'>2097152</memory>
+ <currentMemory unit='KiB'>2097152</currentMemory>
+ <vcpu placement='static'>1</vcpu>
+ <cputune>
+ <shares>1000</shares>
+ </cputune>
+ <os firmware='efi'>
+ <type arch='x86_64'>hvm</type>
+ <firmware>
+ <feature enabled='yes' name='enrolled-keys'/>
+ <feature enabled='yes' name='secure-boot'/>
+ </firmware>
+ </os>
+ <clock offset='utc'/>
+ <on_poweroff>destroy</on_poweroff>
+ <on_reboot>restart</on_reboot>
+ <on_crash>destroy</on_crash>
+ <devices>
+ <disk type='file' device='disk'>
+ <source file='[datastore]
directory/Auto-esx8.0-rhel9.4-efi-nvme-disk.vmdk'/>
+ <target dev='nvme0n1' bus='nvme'/>
+ <address type='drive' controller='0' bus='0'
target='0' unit='0'/>
+ </disk>
+ <controller type='nvme' index='0'/>
+ <interface type='bridge'>
+ <mac address='00:50:56:a0:a6:7e' type='generated'/>
+ <source bridge='VM Network'/>
+ <model type='vmxnet3'/>
+ </interface>
+ <video>
+ <model type='vmvga' vram='8192' primary='yes'/>
+ </video>
+ </devices>
+</domain>
diff --git a/tests/vmx2xmltest.c b/tests/vmx2xmltest.c
index 3ca954100085..bcd95ed87dcc 100644
--- a/tests/vmx2xmltest.c
+++ b/tests/vmx2xmltest.c
@@ -265,6 +265,8 @@ mymain(void)
DO_TEST("esx-in-the-wild-12");
DO_TEST("esx-in-the-wild-13");
DO_TEST("esx-in-the-wild-14");
+ DO_TEST("esx-in-the-wild-15");
+ DO_TEST("esx-in-the-wild-16");
DO_TEST("gsx-in-the-wild-1");
DO_TEST("gsx-in-the-wild-2");
--
2.49.0