Chapter 11. KVM Para-virtualized Drivers
Para-virtualized drivers are available for virtualized Windows guests running on KVM hosts. These para-virtualized drivers are included in the virtio package. The virtio package supports block (storage) devices and network interface controllers.
Para-virtualized drivers enhance the performance of fully virtualized guests. With the para-virtualized drivers guest I/O latency decreases and throughput increases to near bare-metal levels. It is recommended to use the para-virtualized drivers for fully virtualized guests running I/O heavy tasks and applications.
The KVM para-virtualized drivers are automatically loaded and installed on the following:
Versions of Red Hat Enterprise Linux in the list above detect and install the drivers, additional installation steps are not required.
The following Microsoft Windows versions are expected to function normally using KVM para-virtualized drivers:
11.1. Using the para-virtualized drivers with Red Hat Enterprise Linux 3.9 guests
Para-virtualized drivers for Red Hat Enterprise Linux 3.9 consist of five kernel modules:
virtio_ring. All five modules must be loaded to use both the para-virtualized block and network devices drivers.
To use the network device driver only, load the
virtio_pci modules. To use the block device driver only, load the
package modifies the initrd RAM disk file in the
directory. The original initrd file is saved to
. The original initrd file is replaced with a new initrd RAM disk containing the
driver modules. The initrd RAM disk is modified to allow the guest to boot from a storage device using the para-virtualized drivers. To use a different initrd file, you must ensure that drivers are loaded with the
script (Loading the para-virtualized drivers with the sysinit script
) or when creating new initrd RAM disk (Adding the para-virtualized drivers to the initrd RAM disk
Loading the para-virtualized drivers with the sysinit script
This procedure covers loading the para-virtualized driver modules during the boot sequence on a Red Hat Enterprise Linux 3.9 or newer guest with the
sysinit script. Note that the guest cannot use the para-virtualized drivers for the default boot disk if the modules are loaded with the
The drivers must be loaded in the following order:
Only order of
virtio_blk can be change. If the drivers are loaded in a different order, drivers will not work.
Configure the modules to . Locate the following section of the
if [ -f /etc/rc.modules ]; then
Append the following lines after that section:
if [ -f /etc/rc.modules ]; then
modprobe virtio_ring # Comment this out if you do not need block driver
modprobe virtio_blk # Comment this out if you do not need block driver
modprobe virtio_net # Comment this out if you do not need net driver
Reboot the guest to load the kernel modules.
Adding the para-virtualized drivers to the initrd RAM disk
This procedure covers loading the para-virtualized driver modules with the kernel on a Red Hat Enterprise Linux 3.9 or newer guest by including the modules in the initrd RAM disk. The mkinitrd tool configures the initrd RAM disk to load the the modules. Specify the additional modules with the
--with parameter for the
mkinitrd command. Append following set of parameters, in the exact order, when using the
mkinitrd command to create a custom initrd RAM disk:
--with virtio --with virtio_ring --with virtio_blk --with virtio_net --with virtio_pci
AMD64 and Intel 64 issues
x86_64 version of the virtio package for AMD64 systems.
ia32e version of the virtio package for Intel 64 systems. Using the
x86_64 version of the virtio may cause a '
Unresolved symbol' error during the boot sequence on Intel 64 systems.
Network performance issues
If you experience low performance with the para-virtualized network drivers, verify the setting for the GSO and TSO features on the host system. The para-virtualized network drivers require that the GSO and TSO options are disabled for optimal performance.
Verify the status of the GSO and TSO settings, use the command on the host (replacing
interface with the network interface used by the guest):
# ethtool -k
Disable the GSO and TSO options with the following commands on the host:
# ethtool -K
interface gso off
# ethtool -K
interface tso off
Para-virtualized driver swap partition issue
After activating the para-virtualized block device driver the swap partition may not be available. This issue is may be caused by a change in disk device name. To fix this issue, open the
/etc/fstab file and locate the lines containing swap partitions, for example:
/dev/hda3 swap swap defaults 0 0
The para-virtualized drivers use the
/dev/vd* naming convention, not the
/dev/hd* naming convention. To resolve this issue modify the incorrect swap entries in the
/etc/fstab file to use the
/dev/vd* convention, for the example above:
/dev/vda3 swap swap defaults 0 0
Save the changes and reboot the virtualized guest. The guest should now correctly have swap partitions.