QEMU/Windows guest

This article describes the setup of a Windows guest using QEMU.

Host
To create a disk image for the virtual machine, run:

Download a Windows driver image from this location.

Since QEMU requires a lot of options, it would be a good idea to put them into a shell script, e.g.:

Change the path to the disk image in the script. Additional options can be used when calling the script. To boot the disk image, run:

Install the Windows guest. See the guest section for optimum support. After the installation start the script without the additional options.

Guest

 * During installation at the partition step Windows doesn't detect the VirtIO hard drive. You have to tell Windows to use the viostor driver from the driver image.


 * After installation the VirtIO ethernet adapter will appear without a driver. You have to tell Windows to use the netkvm driver from the driver image.


 * For 32 bit Windows 7 a sound driver for the Intel 82801AA AC97 exists.


 * For 64 bit Windows 7 Intel HDA is available as an option (QEMU option: )
 * Windows 10 guest audio emulation is tricky for ALSA users. Pass these options to QEMU:
 * This assumes that you are using the default ALSA device for playback.
 * we cannot use AC97 for Windows 10 because there is no driver for it.
 * is an odd option, but without it I got nothing but clicks and pops during playback.
 * there may be more options required for line-in and line-out or microphone and line-out.
 * For PulseAudio, see ArchWiki


 * USB 2.0 pass through can be configured from host to guest with variations of:


 * For Windows 8.1 USB tablet is available only with USB 2.0 pass through (QEMU option:
 * The USB tablet device helps the Windows guest to accurately track mouse movements. Without it mouse movements will be jerky.
 * Another device that can be presented to the Windows guest is the random number generator. Add QEMU option:   .  Now install the viorng driver from the driver image.
 * For Windows 10, to boot using UEFI you need to install  on your host then add QEMU option:    This option is essential for running Hyper-V guest images.

SPICE
QEMU with SPICE support enables (among other things) the more powerful QXL display device and makes clipboard sharing possible (copy/paste between clients and the virtual machine).

To use SPICE with QEMU enable the following USE flag in :

Build QEMU:

To connect spice server, you need a client like net-misc/spice-gtk.

Guest
On Windows guests you need to install Windows guest tools.

On Windows 8.1 guest if you want to set screen resolution more than 1024x768, you need to install drivers from https://fedoraproject.org/wiki/Windows_Virtio_Drivers#Direct_download and QXL WDDM DOD driver. If you try to install Windows guest tool, QXL WDDM DOD driver won't work well because of Windows SPICE agent.

If you want to try the new qlx-dod driver linked above, in order to use the driver you need to 'update' the basic windows display adapter driver and point it to the unzipped folder for the new driver. This can be found by: Right click the Start button -> Device Manager. Expand 'Display adapters' and right click on the sub entry and hit update driver.

Initialization script
To run QEMU from a script: (spicy (spice) viewer requires ):

Or remote-viewer :