https://www.vmware.com/pdf/vsp_4_vmdirectpath_host.pdf
Technical Note
VMware, Inc. 1
Configuration Examples and
Troubleshooting for VMDirectPath
VMware ESX 4.x
VMDirectPath allows guest operating systems to directly access an I/O device, bypassing the virtualization
layer. This direct path, or passthrough can improve performance for VMware ESX™ systems that utilize
high‐speed I/O devices, such as 10 Gigabit Ethernet.
ESX Host Requirements
VMDirectPath supports a direct device connection for virtual machines running on Intel Xeon 5500 systems,
which feature an implementation of the I/O memory management unit (IOMMU) called Virtual Technology
for Directed I/O (VT‐d). VMDirectPath can work on AMD platforms with I/O Virtualization Technology (AMD
IOMMU), but this configuration is offered as experimental support.
Some machines might not have this technology enabled in the BIOS by default. Refer to your hardware
documentation to learn how to enable this technology in the BIOS.
PCI Device Compatibility
Each virtual machine can connect to up to two passthrough devices, which include certain networking and
storage PCI devices. Supported devices include the Intel 82598 10 Gigabit Ethernet controller and Broadcom
57710 and 57711 10 Gigabit Ethernet controllers.
To configure devices for VMDirectPath, see “Configure Passthrough Devices on a Host” and “Configure a PCI
Device on a Virtual Machine” in the ESX Configuration Guide. Also see KB 1010789, “Configuring
VMDirectPath I/O passthrough devices on an ESX host.”
For an example of a VMX file with two passthrough devices connected in the virtual machine, see “Editing the
VMX File to Support Advanced Configuration” on page 2.
Enable or Disable VMDirectPath
Enable or disable VMDirectPath through the hardware advanced settings page of the vSphere Client.
Reboot the ESX host after enabling or disabling VMDirectPath.
Disable VMDirectPath and reboot the ESX host before removing physical devices.
VMware, Inc. 2
Configuration Examples and Troubleshooting for VMDirectPath
To find the VMDirectPath Configuration page in the vSphere Client
1 Select the ESX host from Inventory.
2 Select the Configuration tab.
3 Select Advanced Settings under Hardware.
To disable and disconnect the PCI Device
1 Use the vSphere Client to disable or remove the VMDirectPath configuration.
2 Reboot the ESX host.
3 Physically remove the device from the ESX host.
Verify IOMMU Is Enabled After ESX Is Booted
Use the --list option of the esxcfg-module command from the ESX service console or the
vicfg-module.pl command from the vSphere CLI to verify if IOMMU (VT‐d or AMD IOMMU) is enabled.
For details about this command, see “VMkernel Module Manipulation with vicfg‐module” in the vSphere
Command‐Line Interface Installation and Reference Guide.
If IOMMU is not enabled, refer to the hardware manual for your Intel or AMD machine to learn how to enable
VT‐d or AMD IOMMU.
Editing the VMX File to Support Advanced Configuration
While many devices work fine in the virtual machine with the default settings, advanced configuration is
sometimes necessary in the following cases:
If you are not able to boot the virtual machine configured with passthrough devices.
If the device is not working properly inside the virtual machine.
You know a specific configuration is required.
Typically, you should not edit the VMX file because changes to passthrough devices in the vSphere Client
overwrite any changes you make to this file. In addition, the following complications might arise:
If you manually upgrade the virtual machine’s hardware version from 4 to 7 by editing its VMX file, the
passthrough configuration might not be complete and you might not be able to boot the virtual machine.
If you manually remove or add lines related to the pciBridge, new passthrough devices might not be
added during later configuration.
Sample VMX File
The following example shows the contents of a VMX file after two passthrough devices are added to the
corresponding virtual machine.
This file is for reference. Do not use it as a template to overwrite the VMX file for your virtual machines.
In this example, there are two passthrough devices: pciPassthru0 and pciPassthru1. These indicate the
first and second PCI passthrough devices, respectively.
#!/bin/vmx
# version for configuration
config.version = "8"
# version for virtual machine (Regular version is 4)
virtualHW.version = "7"
# enable vnc
RemoteDisplay.vnc.enabled = "TRUE"
RemoteDisplay.vnc.port = "5900"
VMware, Inc. 3
Configuration Examples and Troubleshooting for VMDirectPath
# type of guest os
guestOS = "linux"
# display name for the VI Client/WebCenter
displayName = "RHEL3"
# scsi controller 0
scsi0.present = "true"
scsi0.virtualDev = "lsilogic"
# scsi hard drive
scsi0:0.present = "true"
scsi0:0.fileName = "/volumes/your-path/passthru.vmdk"
scsi0:0.deviceType = "scsi-hardDisk"
scsi0:0.redo = ""
# IDE CD drive
ide0:0.present ="true"
ide0:0.startConnected = "TRUE"
ide0:0.fileName = "/volumes/your-path/your-iso-image"
ide0:0.deviceType = "cdrom-image"
memsize = "512"
sched.mem.max = "512"
sched.mem.minsize = "512"
sched.swap.derivedName = "/volumes/your-path/passthru-12345.vswp"
svga.vramSize = "16777216"
# Please try not modify any of the following lines since they are auto
# generated by the VI Client when configuring passthru devices.
pciPassthru0.present = "TRUE"
pciPassthru0.deviceId = "3456"
pciPassthru0.vendorId = "12ab"
# The systemId is equivalent to output of "vsish -e cat /system/systemUuid"
pciPassthru0.systemId = "48c4619b-6d58-18db-2a0e-000423d1e6f6"
pciPassthru0.id = "03:00.0"
pciPassthru1.present = "TRUE"
pciPassthru1.deviceId = "6543"
pciPassthru1.vendorId = "78cd"
pciPassthru1.systemId = "48c4619b-6d58-18db-2a0e-000423d1e6f6"
pciPassthru1.id = "02:00.0"
# Please try not modify any of the following lines since they are auto
# generated by the VI Client when performing HW version upgrading.
pciBridge0.present = "TRUE"
pciBridge4.present = "TRUE"
pciBridge5.present = "TRUE"
pciBridge6.present = "TRUE"
pciBridge7.present = "TRUE"
pciBridge4.virtualDev = "pcieRootPort"
pciBridge4.pciSlotNumber = "21"
pciBridge4.functions = "8"
pciBridge5.virtualDev = "pcieRootPort"
pciBridge5.pciSlotNumber = "22"
pciBridge5.functions = "8"
pciBridge6.virtualDev = "pcieRootPort"
pciBridge6.pciSlotNumber = "23"
pciBridge6.functions = "8"
pciBridge7.virtualDev = "pcieRootPort"
pciBridge7.pciSlotNumber = "24"
pciBridge7.functions = "8"
pciBridge0.pciSlotNumber = "19"
pciPassthru0.pciSlotNumber = "160"
pciPassthru1.pciSlotNumber = "192"
VMware, Inc. 4
Configuration Examples and Troubleshooting for VMDirectPath
PCIPassthru Error Message
Sometimes the default passthrough setting for PCI devices might not work as expected. You might encounter
the following error when you try to boot the virtual machine:
PCIPassthru: Device 016:00.0 barIndex 0 type Mem realaddr 0xfa000000 size 33554432
PCIPassthru: PCI device 016:00.0 is marked wrong PCIe
PCIPassthru: Failed to register PCI slot 016:00.0
Setting pciPassthru0.virtualDev = "pci" resolves this error and allows PCI and PCI‐x devices to work
properly as VMDirectPath devices. The default of this option is pcie.
Setting the Physical Mode for IOAPIC
Setting pciPassthru0.msiEnabled = "FALSE" sets the physical mode to IOAPIC, if the virtual mode is
IOAPIC. The default setting for this option is TRUE, which means physical mode is MSI or MSI‐X. This default
works for most supported configurations. In some cases, however, you need to change the default.
One such case is when you have a Broadcom 57710 or 57711 device connected to a Windows 2003 or 2008
virtual machine. If either of these devices are not working as expected with passthrough (if you see a yellow
icon displayed in the Device Manager panel for the VMDirectPath device), edit the
pciPassthru
推荐本站淘宝优惠价购买喜欢的宝贝:
本文链接:https://hqyman.cn/post/6504.html 非本站原创文章欢迎转载,原创文章需保留本站地址!
休息一下~~