How to install Windows 8.1 in QEMU

This page details how to install Windows 8.1 in QEMU. Windows 8.1 was released in 2012 by Microsoft as the successor to Windows 7. Support ended on January 9th, 2023.
Prerequisites
QEMU
You will need QEMU installed.
Windows 8.1 ISO
You'll need a Windows 8.1 ISO for this guide. You can:
- You can use a physical disc
- Download the Windows 8.1 ISO from Computernewb:
- Windows Embedded 8.1 Industry Enterprise, which is slimmed down compared to the stock ISO (recommended).
- Stock Windows 8.1
- Source an ISO from elsewhere
Installation
Creating the Disk Image
First, open a command window and create a disk image for the VM using a command like the following.
qemu-img create -f qcow2 win8.qcow2 40G
40G can be replaced with however big you want the hard drive to be (with G standing for Gigabytes).
Starting QEMU
You can now start up QEMU with a command like the following:
qemu-system-x86_64 -M q35,usb=on,acpi=on,hpet=off -m 4G -cpu host,hv_relaxed,hv_frequencies,hv_vpindex,hv_ipi,hv_tlbflush,hv_spinlocks=0x1fff,hv_synic,hv_runtime,hv_time,hv_stimer,hv_vapic -smp cores=4 -accel kvm -drive file=win8.qcow2 -device usb-tablet -device VGA,vgamem_mb=256 -nic user,model=e1000 -monitor stdio -cdrom en_windows_embedded_8_1_industry_enterprise_x64_dvd_2710518.iso
Installing Windows
From here, the installation is pretty straightforward. Agree to the license, select a custom install to the unallocated space, and wait for it to install. The OS should install pretty quick on newer systems.
Post-install
Invoking QEMU
After installing, you should remove the same QEMU command as before, except the -cdrom ... argument should be removed.
Browsers
Despite both Firefox and Chromium dropping support for Windows 8.1 a few years ago, there are maintained forks of modern versions of both of these browsers that work on Windows 8.1.
Supermium
Supermium is a Chromium fork that works in Windows 8.1. It needs around 2 GB of RAM to function.

- Open Internet Explorer (or whatever browser you have installed)
- Navigate to
http://win32subsystem.live/supermium/legacy/ - Download the Setup executable for your VM's bit width and run it
- You will get a few options in the setup. All of them are optional but I recommend installing the Noto Emoji font and creating shortcuts for Supermium. Hit OK
- If all went well, Supermium should be working!
r3dfox
r3dfox is a Firefox fork that works in Windows 8.1.

- Install the following updates on your VM, in this order:
- Reboot your VM
- Open the following links on your host and copy the links for the installer files (the GitHub releases page does not work in IE)
- VCRedist AIO for Windows 8.1
- The latest r3dfox installer for your bit width
- Open Internet Explorer
- Type in both links from above and save the .exe files
- Run the VCRedist AIO installer
- Run the r3dfox installer and install it.
- If all went well, r3dfox should be running!
Open Shell

If you don't like the Windows 8.1 Start Screen (does anyone?) you can download and install the latest release of Open Shell to get a customizable start menu that by default looks similar to Windows 7
Activation
Windows 8.1 can be activated using Massgrave's Microsoft Activation Scripts:
- Download the latest MAS_AIO.cmd and run it
- Select 3 for TSForge Activation, followed by 1 to activate Windows.
- You should now have an activated copy of Windows 8.1.