-
Notifications
You must be signed in to change notification settings - Fork 108
VMs created with EFI missing the chipset.motherboardLayout setting #472
Description
Overview of the Issue
When creating a VM (vCenter / ESX 8.0 Update 3) using the vSphere ISO method, the resulting VM works fine but does not contain the option 'chipset.motherboardLayout' when inspecting the VMX file for the VM.
If a VM is created using the vSphere UI (with the same hardware configuration) this line IS present in the file (it is set to 'acpi').
The line being missing causes problems when exporting and then re-importing the VM from a vCenter, since when it's imported the missing line gets added - the result of this is that the PCI IDs for the VM change, so internal OS IDs for things like the network interfaces change. For example in my Linux VM 'ens192' becomes 'ens33'.
The issue of changing PCI IDs is detailed here; https://knowledge.broadcom.com/external/article/313466/virtual-device-pci-slot-changes-upon-upg.html which led me to inspect that property - but even though my Packer built VM is being created on hardware version 21 it is not present. I also confirmed the workaround they list, which does solve the issue but requires manual intervention to the VMX.
I tried to use the 'configuration_parameters' option of the Packer plugin to add this option and set it to 'acpi' so that my PCI IDs remain the same regardless of whether the VM has been exported / re-imported, but the option doesn't appear to get set.
Reproduction Steps
Deploy a VM using vSphere ISO (I'm using RHEL9 not that should matter) - configuration is simply setting basic CPU, RAM etc.. nothing to specify the hardware version, so it defaults to the latest (21 in my case) and use EFI.
- Once the VM is built, power it off and inspect the advanced properties - note the ethernet0 PCI ID.
- Check the VMX file for the VM, note the lack of any line setting 'chipset.motherboardLayout'
- Export the VM to OVF and then re-import it back into vCenter
- Inspect the advanced properties again, note the ethernet0 PCI ID (it should be the same)
- Power on the imported VM
- Inspect the ethernet0 PCI ID once more.. it should now have changed!
- Check the VMX file for the imported VM, you should find a line setting 'chipset.motherboardLayout'
Packer Version
- 1.11.2
Plugin Version and Builders
- 1.4.0
Please select the builder.
-
vsphere-iso -
vsphere-clone
VMware vSphere Version
- 8.0 Update 3
Guest Operating System
- RHEL 9
- Server 2022
Simplified Packer Buildfile
Unfortunately I cannot access the buildfile - the build config is noted above, it is nothing special just a simple install from ISO.
Operating System and Environment Details
- Operating System: RHEL 9