KVM Paravirtualized (virtio) Drivers

Updated -

Important: On Red Hat Enterprise Linux 7, Windows guest virtual machines are supported only under specific subscription programs, such as Advanced Mission Critical (AMC). If you are unsure whether your subscription model includes support for Windows guests, contact customer support.

Paravirtualized drivers enhance the performance of guests, decreasing guest I/O latency and increasing throughput to near bare-metal levels. It is recommended to use the paravirtualized drivers for fully virtualized guests running I/O heavy tasks and applications.

virtio drivers are KVM's paravirtualized device drivers, available for Windows guest virtual machines running on KVM hosts. These drivers are included in the virtio package. The virtio package supports block (storage) devices and network interface controllers.

The KVM virtio drivers are automatically loaded and installed on the following:

  • Red Hat Enterprise Linux 4.8 and newer
  • Red Hat Enterprise Linux 5.3 and newer
  • Red Hat Enterprise Linux 6 and newer
  • Red Hat Enterprise Linux 7 and newer
  • Some versions of Linux based on the 2.6.27 kernel or newer kernel versions

Versions of Red Hat Enterprise Linux in the list above detect and install the drivers. Additional installation steps are not required.
In Red Hat Enterprise Linux 3 (3.9 and above), manual installation is required.

Note: PCI devices are limited by the virtualized system architecture. Refer to Guest Virtual Machine Device Configuration for additional limitations when using assigned devices.

Using KVM virtio drivers, the following Microsoft Windows versions are expected to run similarly to bare-metal-based systems:

Note: Network connectivity issues sometimes arise when attempting to use older virtio drivers with newer versions of QEMU. Keeping the drivers up to date is therefore recommended.

Installing the KVM Windows virtio Drivers

This section covers the installation process for the KVM Windows virtio drivers. The KVM virtio drivers can be loaded during the Windows installation or installed after the guest's installation.

You can install the virtio drivers on a guest virtual machine using one of the following methods:

  • hosting the installation files on a network accessible to the virtual machine
  • using a virtualized CD-ROM device of the driver installation disk .iso file
  • using a USB drive, by mounting the same (provided) .ISO file that you would use for the CD-ROM
  • using a virtualized floppy device to install the drivers during boot time (required and recommended only for Windows Server 2003)

This procedure describes installation from the paravirtualized installer disk as a virtualized CD-ROM device.

  1. Download the drivers

    The virtio-win package contains the virtio block and network drivers for all supported Windows guest virtual machines.
    Note: The virtio-win package can be found here. Search for virtio-win and click Download Latest. It requires access to one of the following channels:

    • RHEL Client Supplementary (v. 7)
    • RHEL Server Supplementary (v. 7)
    • RHEL Workstation Supplementary (v. 7)

    Download and install the virtio-win package on the host with the yum command.

    # yum install virtio-win

    The list of virtio-win packages that are supported on Windows operating systems, and the current certified package version, can be found here.

    Note that the Red Hat Enterprise Virtualization Hypervisor and Red Hat Enterprise Linux are created on the same code base, so the drivers for the same version (for example, Red Hat Enterprise Virtualization Hypervisor 3.3 and Red Hat Enterprise Linux 6.5) are supported for both environments.

    The virtio-win package installs a CD-ROM image, virtio-win.iso, in the /usr/share/virtio-win/ directory.

  2. Install the virtio drivers

    When booting a Windows guest that uses virtio-win devices, the relevant virtio-win device drivers must already be installed on this guest. The virtio-win drivers are not provided as inbox drivers in Microsoft's Windows installation kit, so installation of a Windows guest on a virtio-win storage device (viostor/virtio-scsi) requires that you provide the appropriate driver during the installation, either directly from the virtio-win.iso or from the supplied Virtual Floppy image virtio-win<version>.vfd.

Installing the Drivers on an Installed Windows Guest Virtual machine

This procedure describes installing the virtio drivers with a virtualized CD-ROM after Windows is installed.
Follow this procedure to add a CD-ROM image with virt-manager and then install the drivers.

  1. Open virt-manager and the guest virtual machine

    Open virt-manager, then open the guest virtual machine from the list by double-clicking the guest name.

  2. Open the hardware window

    Click on the toolbar at the top of the window to view virtual hardware details.

    Click Add Hardware at the bottom of the new view that appears.

    A wizard opens for adding the new device.

  3. Select the ISO file

    Ensure that the Select managed or other existing storage radio button is selected, and browse to the virtio driver's .iso image file. The default location for the latest version of the drivers is /usr/share/virtio-win/virtio-win.iso.

    Change the Device type to IDE cdrom and click Forward to proceed.

    The Add new virtual hardware wizard

  4. Reboot

    Reboot or start the virtual machine to begin using the driver disk. Virtualized IDE devices require a restart to for the virtual machine to recognize the new device.

  5. Open the Device Manager

    For information on opening Device Manager, refer to the Windows documentation.

  6. Start the driver update wizard

    1. View available system devices

      Expand System devices by clicking on the arrow to its left.

      Viewing available system devices in the Computer Management window

    2. Locate the appropriate device

      There are up to four drivers available: the balloon driver, the serial driver, the network driver, and the block driver.

      • Balloon, the balloon driver, affects the PCI standard RAM Controller in the System devices group.
      • vioserial, the serial driver, affects the PCI Simple Communication Controller in the System devices group.
      • NetKVM, the network driver, affects the Network adapters group. This driver is only available if a virtio NIC is configured. Configurable parameters for this driver are documented in Appendix E, NetKVM Driver Parameters.
      • viostor, the block driver, affects the Disk drives group. This driver is only available if a virtio disk is configured.

      Right-click on the device whose driver you wish to update, and select Update Driver from the pop-up menu.

      This example installs the balloon driver, so right-click on PCI standard RAM Controller.

    3. Open the driver update wizard

      From the drop-down menu, select Update Driver Software to access the driver update wizard.

    Opening the driver update wizard

  7. Specify how to find the driver

    The first page of the driver update wizard asks how you want to search for driver software. Click Browse my computer for driver software.

    The Update Driver Software wizard

  8. Select the driver to install

    1. Open a file browser

      Click Browse.

    2. Browse to the location of the driver

      A separate driver is provided for each combination of operating systems and architectures. The drivers are arranged hierarchically according to their driver type, the operating system, and the architecture on which they will be installed: driver_type/os/arch/.

      For example, the Balloon driver for a Windows 7 operating system with an x86 (32-bit) architecture, resides in the Balloon/w7/x86 directory.

      Once you have navigated to the correct location, click OK.

    3. Click Next to continue

      The following screen is displayed while the driver installs:

      The Update Driver Software wizard

  9. Close the installer

    The following screen is displayed when installation is complete:

    The Update Driver Software wizard

    Click Close to close the installer.

  10. Reboot

    Reboot the virtual machine to complete the driver installation.

Installing Drivers During the Windows Installation

You can install the virtio drivers during a Windows installation.
This method allows a Windows guest virtual machine to use the virtio drivers for the default storage device.

  1. Install the virtio-win package

    # yum install virtio-win

    Note: The virtio-win package can be found here.

    It requires access to one of the following channels:

    • RHEL Client Supplementary (v. 7)
    • RHEL Server Supplementary (v. 7)
    • RHEL Workstation Supplementary (v. 7)
  2. Creating the guest virtual machine

    Important: Create the virtual machine, as normal, without starting the virtual machine. Follow one of the procedures below.

    Select one of the following guest-creation methods, and follow the instructions.

    • Create the guest virtual machine with virsh

      This method attaches the virtio driver floppy disk to a Windows guest before the installation.

      If the virtual machine is created from an XML definition file with virsh, use the virsh define command not the virsh create command.

      1. Create, but do not start, the virtual machine. Refer to Defining a Guest Virtual Machine with an XML File for details on creating virtual machines with the virsh command.

      2. Add the driver disk as a virtualized floppy disk with the virsh command. This example can be copied and used if there are no other virtualized floppy devices attached to the guest virtual machine. Note that vm_name should be replaced with the name of the virtual machine.

        # virsh attach-disk *vm_name* /usr/share/virtio-win/virtio-win.vfd fda --type floppy

        Continue with step 3.

    • Create the guest virtual machine with virt-manager and changing the disk type

      1. At the final step of the virt-manager guest creation wizard, check the Customize configuration before install checkbox.

        The virt-manager guest creation wizard

        Click Finish.

      2. Open the Add Hardware wizard

        Click Add Hardware in the bottom left of the new panel.

      3. Select storage device

        Storage is the default selection in the Hardware type list.

        The Add new virtual hardware wizard

        Ensure that the Select managed or other existing storage radio button is selected.

        Click Browse.

        In the window that opens, click Browse Local.

        Navigate to /usr/share/virtio-win/virtio-win.vfd, and click Select to confirm.

        Change Device type to Floppy disk.

        Click Finish to continue.

      4. Confirm settings

        Review the device settings.

        The virtual machine hardware information window

        You have now created a removable device accessible by your virtual machine.

      5. Change the hard disk type

        Select the disk and click Remove.

        The virtual machine hardware information window

        Add a new virtual storage device by clicking Add Hardware.

        Change the Device type from IDE disk to Virtio Disk.

        Click Finish to confirm the operation.

        The virtual machine hardware information window

      6. Ensure settings are correct

        Review the settings for VirtIO Disk 1.

        The virtual machine hardware information window

        When you are satisfied with the configuration details, click Begin Installation.

        Continue with step 3.

    • Create the guest virtual machine with virt-install

      Append the following parameter exactly as listed below to add the driver disk to the installation with the virt-install command:

      --disk path=/usr/share/virtio-win/virtio-win.vfd,device=floppy

      Important: If the device you want to add is a disk (that is, not a floppy disk or a CD-ROM), you will also need to add the bus=virtio option to the end of the --disk parameter:

      --disk path=/usr/share/virtio-win/virtio-win.vfd,device=disk,bus=virtio

      Based on the version of Windows you are installing, append the relevant option to the virt-install command. For a list of Windows versions and the appropriate option, run the following command:

      osinfo-query os

      The following is an example of the option for Windows 7:

      --os-variant win7
  3. Additional steps for driver installation

    During the installation, additional steps are required to install drivers.

    For information on installing these drivers, refer to the documentation for the version of Windows that you are installing.