[PATCH 9/9] vmx2xmltest: Add a test case for disks in subfolder

Michal Privoznik via Devel posted 9 patches 1 day, 1 hour ago
[PATCH 9/9] vmx2xmltest: Add a test case for disks in subfolder
Posted by Michal Privoznik via Devel 1 day, 1 hour ago
From: Michal Privoznik <mprivozn@redhat.com>

This test case demonstrates correctness of the previous fix.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
---
 tests/vmx2xmldata/esx-in-the-wild-17.vmx | 106 +++++++++++++++++++++++
 tests/vmx2xmldata/esx-in-the-wild-17.xml |  46 ++++++++++
 tests/vmx2xmltest.c                      |   1 +
 3 files changed, 153 insertions(+)
 create mode 100644 tests/vmx2xmldata/esx-in-the-wild-17.vmx
 create mode 100644 tests/vmx2xmldata/esx-in-the-wild-17.xml

diff --git a/tests/vmx2xmldata/esx-in-the-wild-17.vmx b/tests/vmx2xmldata/esx-in-the-wild-17.vmx
new file mode 100644
index 0000000000..ebbf76b449
--- /dev/null
+++ b/tests/vmx2xmldata/esx-in-the-wild-17.vmx
@@ -0,0 +1,106 @@
+.encoding = "UTF-8"
+config.version = "8"
+virtualHW.version = "20"
+vmci0.present = "TRUE"
+floppy0.present = "FALSE"
+svga.vramSize = "8388608"
+numvcpus = "2"
+memSize = "4096"
+tools.upgrade.policy = "manual"
+sched.cpu.units = "mhz"
+vm.createDate = "1760939758649227"
+usb_xhci.present = "TRUE"
+scsi0.virtualDev = "lsisas1068"
+scsi0.present = "TRUE"
+sata0.present = "TRUE"
+sata0:0.deviceType = "cdrom-image"
+sata0:0.fileName = "/vmfs/volumes/f84f070c-0d65498d/win-iso/windows_11_x64_official_dvd.iso"
+sata0:0.present = "TRUE"
+scsi0:0.deviceType = "scsi-hardDisk"
+scsi0:0.fileName = "esx8.0-win11-with-second-disk-in-subfolder.vmdk"
+sched.scsi0:0.shares = "normal"
+sched.scsi0:0.throughputCap = "off"
+scsi0:0.present = "TRUE"
+ethernet0.allowGuestConnectionControl = "FALSE"
+ethernet0.virtualDev = "e1000e"
+ethernet0.networkName = "Mgmt Network"
+ethernet0.addressType = "vpx"
+ethernet0.generatedAddress = "00:50:56:a5:b8:68"
+ethernet0.present = "TRUE"
+displayName = "esx8.0-win11-with-second-disk-in-subfolder"
+guestOS = "windows2019srvNext-64"
+chipset.motherboardLayout = "i440bx"
+toolScripts.afterPowerOn = "TRUE"
+toolScripts.afterResume = "TRUE"
+toolScripts.beforeSuspend = "TRUE"
+toolScripts.beforePowerOff = "TRUE"
+tools.syncTime = "FALSE"
+tools.guest.desktop.autolock = "TRUE"
+uuid.bios = "42 25 6e c1 e0 66 93 64-3d d1 36 a0 b7 52 63 dd"
+vc.uuid = "50 25 0f 27 53 8b 50 91-a4 3b a5 0c e9 5f 23 82"
+nvram = "esx8.0-win11-with-second-disk-in-subfolder.nvram"
+svga.present = "TRUE"
+pciBridge0.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"
+RemoteDisplay.maxConnections = "-1"
+sched.cpu.latencySensitivity = "normal"
+disk.EnableUUID = "TRUE"
+vmxstats.filename = "esx8.0-win11-x86_64-latest.scoreboard"
+numa.autosize.cookie = "20012"
+numa.autosize.vcpu.maxPerVirtualNode = "2"
+cpuid.coresPerSocket.cookie = "2"
+vm.genidX = "2627911129287880091"
+pciBridge0.pciSlotNumber = "17"
+pciBridge4.pciSlotNumber = "21"
+pciBridge5.pciSlotNumber = "22"
+pciBridge6.pciSlotNumber = "23"
+pciBridge7.pciSlotNumber = "24"
+scsi0.pciSlotNumber = "160"
+ethernet0.pciSlotNumber = "192"
+usb_xhci.pciSlotNumber = "224"
+sata0.pciSlotNumber = "32"
+scsi0.sasWWID = "50 05 05 61 e0 66 93 60"
+vmotion.checkpointFBSize = "8388608"
+vmotion.checkpointSVGAPrimarySize = "8388608"
+vmotion.svga.mobMaxSize = "8388608"
+vmotion.svga.graphicsMemoryKB = "8192"
+monitor.phys_bits_used = "45"
+softPowerOff = "TRUE"
+tools.remindInstall = "TRUE"
+migrate.hostLog = "esx8.0-win11-with-second-disk-in-subfolder-1b240d0d.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 = "52300e6b-6a64-4109-b144-f3efe9426650:vm-545:2azK3dLANCIEKysfZbstuwb/2iSvArcsaQpXPpR56RY="
+sched.swap.derivedName = "/vmfs/volumes/124778e2-48604a5f/esx8.0-win11-with-second-disk-in-subfolder/esx8.0-win11-with-second-disk-in-subfolder-5474484f.vswp"
+uuid.location = "56 4d 73 7b a7 00 67 05-e5 0a b7 00 56 d4 1e 54"
+vm.genid = "3571897048718482545"
+scsi0:0.redo = ""
+scsi0:1.deviceType = "scsi-hardDisk"
+scsi0:1.fileName = "subfolder/esx8.0-win11-with-second-disk-in-subfolder_1.vmdk"
+sched.scsi0:1.shares = "normal"
+sched.scsi0:1.throughputCap = "off"
+scsi0:1.present = "TRUE"
+scsi0:1.redo = ""
+vmci0.id = "-1219337251"
+cleanShutdown = "TRUE"
+usb_xhci:4.present = "TRUE"
+usb_xhci:4.deviceType = "hid"
+usb_xhci:4.port = "4"
+usb_xhci:4.parent = "-1"
diff --git a/tests/vmx2xmldata/esx-in-the-wild-17.xml b/tests/vmx2xmldata/esx-in-the-wild-17.xml
new file mode 100644
index 0000000000..ae66de7431
--- /dev/null
+++ b/tests/vmx2xmldata/esx-in-the-wild-17.xml
@@ -0,0 +1,46 @@
+<domain type='vmware'>
+  <name>esx8.0-win11-with-second-disk-in-subfolder</name>
+  <uuid>42256ec1-e066-9364-3dd1-36a0b75263dd</uuid>
+  <genid>3191ed70-eb21-9c71-2478-373fb27fed9b</genid>
+  <memory unit='KiB'>4194304</memory>
+  <currentMemory unit='KiB'>4194304</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='file' device='disk'>
+      <source file='[datastore] directory/esx8.0-win11-with-second-disk-in-subfolder.vmdk'/>
+      <target dev='sda' bus='scsi'/>
+      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
+    </disk>
+    <disk type='file' device='disk'>
+      <source file='[datastore] directory/subfolder/esx8.0-win11-with-second-disk-in-subfolder_1.vmdk'/>
+      <target dev='sdb' bus='scsi'/>
+      <address type='drive' controller='0' bus='0' target='0' unit='1'/>
+    </disk>
+    <disk type='file' device='cdrom'>
+      <source file='[f84f070c-0d65498d] win-iso/windows_11_x64_official_dvd.iso'/>
+      <target dev='sda' bus='sata'/>
+      <readonly/>
+      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
+    </disk>
+    <controller type='scsi' index='0' model='lsisas1068'/>
+    <controller type='sata' index='0'/>
+    <interface type='bridge'>
+      <mac address='00:50:56:a5:b8:68' type='generated'/>
+      <source bridge='Mgmt Network'/>
+      <model type='e1000e'/>
+    </interface>
+    <video>
+      <model type='vmvga' vram='8192' primary='yes'/>
+    </video>
+  </devices>
+</domain>
diff --git a/tests/vmx2xmltest.c b/tests/vmx2xmltest.c
index cb8e04af0d..fcca765bed 100644
--- a/tests/vmx2xmltest.c
+++ b/tests/vmx2xmltest.c
@@ -223,6 +223,7 @@ mymain(void)
     DO_TEST("esx-in-the-wild-14");
     DO_TEST("esx-in-the-wild-15");
     DO_TEST("esx-in-the-wild-16");
+    DO_TEST("esx-in-the-wild-17");
 
     DO_TEST("gsx-in-the-wild-1");
     DO_TEST("gsx-in-the-wild-2");
-- 
2.51.0