Member-only story

Windows as QEMU guest

Matteo Croce
5 min readOct 29, 2020

--

UPDATE: you can read the full article for free here:

https://matteocroce.it/blog/windows_qemu/

Windows can run fine under QEMU and KVM, but since installing it with QEMU or libvirt directly is not very straightforward, most people prefer using other hypervisors which have a fancy GUI.

KVM is known to have the best performance as Linux host, and require no external drivers, and with virt-manager it’s not more difficult to setup than other solutions.

A proper Windows installation, with VirtIO drivers and guest tools, will run stable and perform almost as a physical machine.
This is how the system appears:

Get the software

Assuming that your Linux distribution has qemu, libvirt and virt-manager already installed, to proceed download the following:

Put both the ISO in a libvirt pool directory, like /var/lib/libvirt/images/

Prepare the VM

Create a new VM via the virt-manager wizard. Select the Windows ISO as install media and select the “Customize configuration before install” option. Be generous with the disk size, we’ll find out how to avoid space waste later.

At this point, we’ll change the VM definition so to use the VirtIO drivers.

First, go to the disk drive, and set the bus to VirtIO. In the advanced options, set “discard mode” to unmap, to get rid of the virtualized TRIM command and discard the free space in the guest filesystem from the host.

--

--

Matteo Croce
Matteo Croce

Written by Matteo Croce

proud free software supporter, working @Facebook

No responses yet

Write a response