In my June 2014 RHEV Upgrade Saga article, I discussed how to build a KVM client for your own use. The method used the Q35 (2009) chipset features that were dropped from RHEL 7 KVM as of version 7.1. This has caused quite a few issues with my deployment of a KVM client system. However, since I have Ivy Bridge (maybe Haswell) chips in my SuperMicro 3U KVM server, I also have access to Intel VT-d, as well as to VT-x, AES-NI, and many other useful chipset features. The most important for a KVM client is Intel VT-d, as it allows you to map USB and PCI devices directly to a VM.
To recover after upgrading everything, this is just what I needed to do. I used the previous writeup, following Steps 1 through 17 but skipping Step 16 (which dealt with vfio-bind). I no longer needed vfio-bind, and I no longer needed to add vfio_pci_vga into the kernel for RHEL 7. Instead, I added the hardware directly to the VM.
I took my existing VM and, using the following, edited out all the extra items that had been added to make a KVM client. Those items in Step 22 of the previous post now need to be removed.
Then, I was able to attach the Quadro (PCI) and Chesen PS/2 (USB) devices directly to the VM using the following within virt-manager.
- Select the VM and open it
- Choose Edit settings
- Click on Add Hardware
- Select PCI Host Device
- Select the PCI Device to Attach (Quadro K4000)
- Finish the dialog
- Repeat Steps 3–6 for the GK106 HDMI Audio Controller on the Quadro K4000
- Click on Add Hardware
- Select USB Host Device
- Select the Chesen PS/2 Device presented via KVM
- Finish the dialog
- Boot the VM.
This is a much simpler approach than trying to find a way to map PCIe devices into a VM using vfio-pci-vga within the KVM kernel. There are fewer steps, and the result is the same. Granted, I did have to ensure that I was using the latest and greatest NVIDIA driver within the VM; otherwise, it just would not work. As of this writing, it is version 349.16.
This would not have been possible without Intel VT-d and the modern changes to KVM that exist within RHEL 7. Older kernels still require the vfio enhancements.
Eventually, I fully expect KVM to have virtual GPU support for GRID and other Kepler-based NVIDIA GPUs.