Creating Windows virtual machines using virtIO drivers

This page has been converted from the Fedora Project Wiki and cleaned up for publishing here on the Fedora Docs Portal, but it has not yet been reviewed for technical accuracy. This means any information on this page may be outdated or inaccurate. Reviews for technical accuracy are greatly appreciated. If you want to help, see the README file in the source repository for instructions.

This document describes how to obtain virtIO drivers and additional software agents for Windows virtual machines running on kernel-based virtual machines (KVM). virtIO is a virtualization standard for network and disk device drivers.

Fedora cannot ship Windows virtIO drivers because they cannot be built automatically as part of Fedora’s build system: the only way to build Windows virtIO drivers is on a machine running Windows. In addition, shipping pre-compiled sources is generally against Fedora policies. Microsoft does not provide virtIO drivers, you must download them yourself in order to make virtIO drivers available for Windows VMs running on Fedora hosts.

The drivers in these repos are licensed under the GPLv2 license.

VirtIO-Win Repo Overview

There is a yum|dnf repo available via the RPM package manager (RPM) that ships virtio-win packages. You can use these RPMs to install driver binaries and agent installers into the /usr/share directory on your host machine. You can then share the bits with Windows VMs running on the host.

The .repo file provides two different repositories:

  • virtio-win-stable - This repository provides builds of virtio-win that roughly correlate to what was shipped with the most recent Red Hat Enterprise Linux release, meaning these builds have undergone testing and are considered stable. This repo is enabled by default.

  • virtio-win-latest - This repository provides the latest driver builds. The builds may be bug free, development quality, or completely broken. Caveat emptor. This repo is disabled by default.

Fedora VirtIO Drivers vs. RHEL VirtIO Drivers

The RPMs in the virtio-win-stable repository are the same driver builds as what is shipped with Red Hat Enterprise Linux. All the Windows binaries are from builds done on Red Hat’s internal build system, which are generated using publicly available code. For more details about how the RPM and repo are built, see the README for this repo.

The drivers are cryptographically signed with Red Hat’s vendor signature. However they are not signed with Microsoft’s WHQL signature.

Historically the .iso files shipped on alt.fedoraproject.org did not match the layout of the .iso shipped with Red Hat Enterprise Linux. This changed in April 2015.

The current Fedora RPM/ISO directory structure is laid out to mirror exactly the layout that is shipped with the latest release of Red Hat Enterprise Linux. This is so that users and developers don’t seen any differences between the two distros.

  • The .iso directories are named after the driver code directories from the upstream driver git tree.

  • Below the driver directories, the $winversion/$arch/ directory naming is a Windows convention.

  • The RPM layout is arbitrary in that it ships the .vfd content in the drivers/ dir, but not many of the other drivers from the .iso. This seems to be an historical oversight and should probably be fixed.

Installing the Windows VirtIO Repository

Install the repo file using the following command:

# wget https://fedorapeople.org/groups/virt/virtio-win/virtio-win.repo \
  -O /etc/yum.repos.d/virtio-win.repo

Then install the virtio-win package:

# dnf install virtio-win

Enabling the latest Windows VirtIO Repository

By default, the virtio-win-latest repository is disabled and virtio-win-stable repo is enabled.

To enable the virtio-win-latest repo with DNF:

# dnf --enablerepo=virtio-win-latest upgrade virtio-win

RPM contents

The virtio-win RPM package contains the following files:

  • /usr/share/virtio-win/*.iso - ISO CDROM containing all the drivers.

  • /usr/share/virtio-win/*.vfd - VFD floppy images for using during install of Windows XP

  • /usr/share/virtio-win/drivers - Copy of the extracted VFD driver contents

  • /usr/share/guest-agent/*.msi - QEMU Guest Agent 32bit and 64bit MSI installers

ISO contents

ISO is used to install paravirtual drivers in Windows guests. The virtio-win/*.iso included in the RPM contains the following bits:

  • NetKVM/ - Virtio network driver

  • viostor/ - Virtio block driver

  • vioscsi/ - Virtio Small Computer System Interface (SCSI) driver

  • viorng/ - Virtio RNG driver

  • vioser/ - Virtio serial driver

  • Balloon/ - Virtio memory balloon driver

  • qxl/ - QXL graphics driver for Windows 7 and earlier. (build virtio-win-0.1.103-1 and later)

  • qxldod/ - QXL graphics driver for Windows 8 and later. (build virtio-win-0.1.103-2 and later)

  • pvpanic/ - QEMU pvpanic device driver (build virtio-win-0.1.103-2 and later)

  • guest-agent/ - QEMU Guest Agent 32bit and 64bit MSI installers

  • qemupciserial/ - QEMU PCI serial device driver

  • *.vfd VFD floppy images for using during install of Windows XP

If you previously used isos from alt.fedoraproject.org, note that the current isos have a different file layout that matches the layout of the Red Hat Enterprise Linux isos. If you need old isos for backwards compatiblity you can find them on the deprecated isos page.

Direct downloads

Direct downloads are available for the .iso, .vfd, and qemu-ga installers.

Filing Windows VirtIO Bugs

When filing a bug, please provide the following information:

  • The virtio-win version

  • The host distro

  • The qemu version

    • If using libvirt: sudo virsh dumpxml $vmname

  • The qemu command log

    • If using libvirt this can be found at /var/log/libvirt/qemu/$vmname.log

Questions/Comments about the RPMs or the yum|dnf repos should be sent to the regular Fedora virt mailing list and IRC channels. Questions/Comments about the actual drivers are best send to the upstream qemu-devel or kvm mailing lists.

Additional resources