The hot add and hot remove commands require the use of the ESXi PCI ID corresponding to the NVMe passthrough hard disk. The example below describes the process of obtaining the ESXi PCI ID for the NVMe hard disk named nvme0n1 on an SCVM named s100.
Run the following command in the SCVM containing the NVMe passthrough disk to get the corresponding SCVM PCI ID.
udevadm info -q path /dev/nvme0n1Output example
/devices/pci0000:03/0000:03:00.0/nvme/nvme0/nvme0n1The 0000:03:00.0 in the output is the SCVM PCI ID of the hard disk.
Run the following command to obtain the device name and slot number of the ESXi virtual machine corresponding to the PCI device based on the SCVM PCI ID.
lspci -v -s 0000:03:00.0Output example
03:01.0 Non-Volatile memory controller: Intel Corporation NVMe Datacenter SSD [3DNAND, Beta Rock Controller] (prog-if 02 [NVM Express])
DeviceName: pciPassthru1
Subsystem: Intel Corporation NVMe Datacenter SSD [3DNAND] ME 2.5" U.2 (P4610)
Physical Slot: 65
Flags: bus master, fast devsel, latency 64, IRQ 18, NUMA node 0
Memory at ffb14000 (64-bit, non-prefetchable) [size=16K]
Capabilities: [40] Power Management version 3
Capabilities: [50] MSI-X: Enable+ Count=128 Masked-
Capabilities: [60] Express Endpoint, MSI 00
Capabilities: [a0] MSI: Enable- Count=1/1 Maskable- 64bit+
Capabilities: [100] Advanced Error Reporting
Capabilities: [150] Virtual Channel
Capabilities: [180] Power Budgeting <?>
Capabilities: [190] Alternative Routing-ID Interpretation (ARI)
Capabilities: [270] Device Serial Number 55-cd-2e-41-50-99-15-f8
Capabilities: [2a0] Secondary PCI Express
Capabilities: [2d0] Latency Tolerance Reporting
Capabilities: [310] L1 PM Substates
Kernel driver in use: nvme
Kernel modules: nvme In the output above, DeviceName indicates the device name of the ESXi virtual machine corresponding to this PCI device, while the Physical Slot indicates the slot number.
Note:
Some PCI devices may not have a
DeviceName; in such cases, obtaining only thePhysical Slotis sufficient.
Log in to the ESXi host where the SCVM resides via SSH, and run the following command to locate the configuration file directory of the SCVM.
find /vmfs/volumes/ -type d -name 's100'Output example
/vmfs/volumes/65002d70-e4c9f18d-d7e5-b49691f2e1c8/s100After entering the SCVM configuration file directory, locate the SCVM .vmx file and run the following command to obtain the <devicename>.id, where <devicename> indicates the device name obtained in step 2, such as pciPassthru1.
Note:
If only the slot number such as
65is obtained in step 2, you can identify the device name aspciPassthru1based on the output linepciPassthru1.pciSlotNumber = "65".
grep 'pciPassthru' s100.vmxOutput example
pciPassthru0.id = "00000:090:00.0"
pciPassthru0.deviceId = "0x005d"
pciPassthru0.vendorId = "0x1000"
pciPassthru0.systemId = "658e9fb5-c1e3-43f4-7b65-7cd30ae17a18"
pciPassthru0.present = "TRUE"
pciPassthru1.id = "00000:217:00.0"
pciPassthru1.deviceId = "0x0a54"
pciPassthru1.vendorId = "0x8086"
pciPassthru1.systemId = "658e9fb5-c1e3-43f4-7b65-7cd30ae17a18"
pciPassthru1.present = "TRUE"
pciPassthru2.id = "00000:218:00.0"
pciPassthru2.deviceId = "0x0a54"
pciPassthru2.vendorId = "0x8086"
pciPassthru2.systemId = "658e9fb5-c1e3-43f4-7b65-7cd30ae17a18"
pciPassthru2.present = "TRUE"
pciPassthru0.pxm = "0"
pciPassthru1.pxm = "0"
pciPassthru2.pxm = "0"
pciPassthru0.pciSlotNumber = "64"
pciPassthru1.pciSlotNumber = "65"
pciPassthru2.pciSlotNumber = "66" Convert the decimal number in <devicename>.id obtained in the previous step to hexadecimal. For example, if the decimal number is 217, its hexadecimal equivalent will be d9, and the corresponding ESXi PCI ID of the device will be 0000:d9:00.0.