Create Windows Image¶
This section explains the procedure to create a new Windows VM image.
Download Windows and Install Media and Drivers¶
Download the following assets before proceeding:
Intel® Windows 10 graphics DCH driver igfx_win10_100.9316.exe
VirtIO driver for
virtio
SCSI and network stable version
Install Windows 10 on VM¶
The following section is applicable to:

To install Windows 10 on VM:
Create Raw Image File¶
Create an empty raw image named win10.img
of size 60G. For example:
$ qemu-img create -f raw win10.img 60G
Install Windows into Image¶
Run the following command:
$ sudo -E qemu-system-x86_64 --enable-kvm -bios OVMF.fd \ -smp cores=2 -m 4G \ -rtc base=localtime,clock=host -usb -device usb-tablet \ -cdrom ${WIN_ISO} \ -drive driver=raw,file=win10.img,if=virtio \ -drive file=${VIRT_IMG},index=3,media=cdrom \ -net nic,model=virtio -net user,smb=${graphics_driver_path} \ -netdev user,id=net0,hostfwd=tcp::8082-:8082 -device virtio-net-pci,netdev=net0
Where,
${WIN_ISO}
is the path of the pre-downloaded Win10 LTSC ISO image.${VIRT_IMG}
is the path of the pre-downloaded VirtIO driver ISO.${directory_of_graphics_driver}
is the absolute path of the directory which contains pre-downloaded Intel graphics driver.
Use
samba
to share the driver with the Windows VM. Make sure thatsamba
is installed in the host OS. For example, usesudo apt install samba
in Debian.In the QEMU window that appears, click Next to install Windows.
When prompted to select the type of installation, choose Custom: Install Windowns only (advanced).
Click Load driver.
Browse and select the
virtio
SCSI driver to detect the rawwin10.img
. For example, the driver (virtio-win.iso
) may locates inE:\viostor\w10\amd64\viostor.inf
of the CD-ROM.Select the loaded driver. Click Next.
Once the driver is loaded, a disk will be discovered for the Windows installation. Click Next to continue.
Open the Windows Device Manager, and install the
virtio-net
driver from the CDROM (virtio-win.iso).
Install Media and Drivers¶
This section explains the procedure to:
Copy IGD Driver¶
In previous QEMU commands, the pre-downloaded graphics driver is shared by samba
.
In the Windows Explorer, follow the menu path File > This PC > Add Network Location to add the shared folder.
The path is \\10.0.2.4\qemu
.
Copy the graphics driver (for example, igfx_win10_100.9316.exe
) to a local folder for later use.
Enable Remote Desktop¶
Search for Remote Desktop in the Windows Settings. Turn ON Enable Remote Desktop. Note down This PC name under How to connect to this PC for later use.
Now, shutdown the Windows VM.
Install IGD Driver¶
To install the graphics driver, a GPU needs to be passed through.
Follow Set up QEMU Command to Boot Windows VM to passthrough a graphics device and a NIC device to the Windows VM. Boot the Windows VM.
There will not be any display on the monitor yet, as the GPU driver is not yet installed.
Connect the NIC device, which was passed through to the Windows VM, directly to the second Windows machine. Run a Remote Desktop Conncetion on the second machine and connect to the computer with the PC name from the previous step.
After logging in remotely, run the graphics driver installation program, which you copied to the local folder.
After installing the graphics driver, the local display from the Windows VM will appear on the monitor.