Configuring VMDirectPath I/O to present a wireless adapter to a virtual machine
- [Instructor] DirectPath I/O is a technology that allows for me to bypass the vSwitch and the VMKernel and present PCI hardware directly to the virtual machine. The typical use case for this in networking would be for extremely latency-sensitive applications as we're cutting through the middleman. DirectPath I/O does come with some stringent requirements and limitations, however. On the requirements side, our hardware has to support hardware memory management units. This is fairly common in newer hardware. For PCI devices, there's not a list of supported devices, but rather a list of PCI device requirements outlined in knowledge base article 2142307.
Most standard network cards should be supported, but it's best to review the guidelines. Finally, because we have to pin portions of memory, a full memory reservation is required for the virtual machine. When we enable DirectPath I/O, we're piercing the virtual-to-physical abstraction layer, and then some of our virtualization features will no longer be available. vMotion, high availability, and fault tolerance will not work; we can't hot add devices to our virtual machines; we can't take snapshots; and we can't suspend or resume the virtual machine.
I'm going to demonstrate a special case for DirectPath I/O in a lab environment. I want to present my onboard wifi adapters to a virtual machine, as it's not a piece of hardware that's supported by ESXi, so if I can present it to a virtual machine, that allows for me to connect my lab environment to wifi. I do want to emphasize that while this works, it's not officially supported by VMware. My first step is that I have to remove the PCI devices from the ESXi, so that I have the option of presenting them directly to a virtual machine. To do this, I'll select my ESXi host, go to Configure, scroll all the way down to Hardware and PCI Devices, and there's nothing currently showing up in the list that I could present to a virtual machine.
I'm going to click on Edit, and we can see that there's multiple options here. This one is my dual band wireless. Notice there's also my video card and my audio adapter. This is the ethernet adapter that I'm currently using to connect to the wired connections, so I don't want to remove that one. Be very cautious about removing USB, as that would, in this case, prevent my host from booting because it's booting off of a USB device.
The audio I can, in theory, present to a virtual machine, if I want to play audio through it. Graphics cards are a little bit more challenging to get to work through DirectPath I/O, and as of yet, I haven't managed to get my graphics card to present properly to a virtual machine. For now, I'm just going to do my dual band wireless. Click on OK, and now the device is showing up as available pending, meaning that I have to reboot the host before it can take effect, so that's my next step.
(typing) Once my ESXi host comes back online, I now show this device is available to a virtual machine. Now, when I add it, the virtual machine needs to be shut down; it already is. I can go to Edit Settings, and I want to select a new device. PCI Device.
There is my dual band wireless adapter. Notice it indicates here that I have to reserve all memory. It gives me a warning about some virtual machine operations being unavailable. Can't suspend migrate with vMotion, take or restore snapshots of such virtual machines. I also cannot move this virtual machine to another host, even if it's shut down, as this device doesn't exist on the other host. Click on OK, and once that task is finished, I can power on my virtual machine.
Now, if I go look at the hardware on this virtual machine, I can see that the wireless adapter now shows up, (clicking) and I can see the corporate networks that are available here. Now, let's take a look at DirectPath I/O's very close relative, SR-IOV.
- Using command line utilities
- Performing packet captures
- Using the hardware compatibility list
- Installing drivers
- Understanding NetQueue and RSS
- Configuring VMDirectPath I/O
- Understand DvFilters
- Configure multicast filters
- Reviewing VMXNET3 features