ESXi Desired State cluster configuration remediation fails with the error "Apply plugin 'DELETE:esx:hardware:pci_devices' failed."
Review of /var/run/log/settingsd.log reveals the following sequence of events, indicating the failure of the esx:hardware:pci_devices plugin during the apply operation:
VMware vSphere ESXi Host
VMware vCenter Server
The incorrect PCI device configurations on the affected ESXi host nodes. The ESXi configuration store (config store) contains entries for PCI devices that are not physically present on the server hardware. These phantom devices often have "null" hardware labels and missing device names, appearing with characteristics like "hardware label": "#" and a sbdf address (e.g., "sbdf": "0000:d8:00.2") but no corresponding physical device.
#configstorecli config current get -c esx -g hardware -k pci_devices This command will display entries similar to:
lspci | grep "<sbdf>"and the output will be empty.
configstorecli config current delete -c esx -g hardware -k pci_devices --all
configstorecli config current delete -c esx -g hardware -k pci_devices -i <sbdf>Note: This command can be executed directly on the ESXi host without requiring the host to be placed into maintenance mode. However, it is critically important to thoroughly validate that the PCI devices being targeted for deletion are indeed unused and do not correspond to any active hardware components. Incorrectly deleting entries for in-use PCI devices can lead to system instability or hardware malfunction. Always verify the status and purpose of each PCI device entry before executing this command.