VMware Cloud Community
MTU1500
Contributor
Contributor
Jump to solution

ESXi 7.x PCI Passthru Automation using Kickstart

Previous to version ESXi 7 we were able to use data retrieved via esxcli hardware pci list command to automate the addition of PCI devices to the esx.conf file for passthru. This is done using .cfg files and and kickstart files during boot.

This is a very unique use case and passthru must be enabled during boot/firstboot.

After testing the same logic on the latest version of ESXi 7 it appears the there entries are written to the ah-trees.conf file. This file will not persist if it is dynamically created at boot based on information gathered from the pci hardware list. I assume this is because data needs to be written to the new configuration storage database called ConfigStore which I can't seem to find much information about. I assume I need to get my entries in there but can't use the GUI or PowerCLI to do so.

Does anyone have any advice or additional information on how I can enable PCI passthru for specific PCI devices in the kickstart/cfg files?

Reply
0 Kudos
1 Solution

Accepted Solutions
MTU1500
Contributor
Contributor
Jump to solution

Looping though my pci devices and using the following command did the trick:

esxcli hardware pci pcipassthru set --device-id=${PCI_DEVICE} --apply-now --enabled=true

View solution in original post

Reply
0 Kudos
3 Replies
MTU1500
Contributor
Contributor
Jump to solution

 
Tags (3)
Reply
0 Kudos
MTU1500
Contributor
Contributor
Jump to solution

Looping though my pci devices and using the following command did the trick:

esxcli hardware pci pcipassthru set --device-id=${PCI_DEVICE} --apply-now --enabled=true
Reply
0 Kudos
PatrickVx
Contributor
Contributor
Jump to solution

You can fix the issue "permanently" by adding those lines to /etc/rc.local.d/local.sh

Just change the ID for your hardware ID

You can find the ID under : /host/manage/hardware/pci-devices

Normally you only need to toggle the main GPU ID and not the child ones.

 

esxcli hardware pci pcipassthru set --device-id=0000:00:00.0 --apply-now --enable=false
esxcli hardware pci pcipassthru set --device-id=0000:00:00.0 --apply-now --enable=true

 

 

Reply
0 Kudos