RHEV Upgrade Saga: KVM Client Take II

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.

  1. Select the VM and open it
  2. Choose Edit settings
  3. Click on Add Hardware
  4. Select PCI Host Device
  5. Select the PCI Device to Attach (Quadro K4000)Virt Manager to add PCI Device
  6. Finish the dialog
  7. Repeat Steps 3–6 for the GK106 HDMI Audio Controller on the Quadro K4000
  8. Click on Add Hardware
  9. Select USB Host Device
  10. Select the Chesen PS/2 Device presented via KVM
  11. Finish the dialog
  12. 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.

Edward Haletky

Edward L. Haletky, aka Texiwill, is an author, analyst, developer, technologist, and business owner. Edward owns AstroArch Consulting, Inc., providing virtualization, security, network consulting and development and TVP Strategy where he is also an Analyst. Edward is the Moderator and Host of the Virtualization Security Podcast as well as a guru and moderator for the VMware Communities Forums, providing answers to security and configuration questions. Edward is working on new books on Virtualization.

Leave a Reply

Your email address will not be published. Required fields are marked *

19 − seventeen =