Installation guide

Chapter 11. KVM Para-virtualized Drivers
80
Note
To use the network device driver only, load the virtio, virtio_net and virtio_pci
modules. To use the block device driver only, load the virtio, virtio_ring, virtio_blk
and virtio_pci modules.
Modified initrd files
The virtio package modifies the initrd RAM disk file in the /boot directory. The original initrd file
is saved to /boot/initrd- kernel-version .img.virtio.orig. The original initrd file is
replaced with a new initrd RAM disk containing the virtio 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 sysinit 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 sysinit script.
The drivers must be loaded in the following order:
1. virtio
2. virtio_ring
3. virtio_blk
4. virtio_net
5. virtio_pci
Only order of virtio_net and 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 /etc/rc.d/rc.sysinit file.
if [ -f /etc/rc.modules ]; then
/etc/rc.modules
fi
Append the following lines after that section:
if [ -f /etc/rc.modules ]; then
/etc/rc.modules
fi
modprobe virtio
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