How to install Windows 10 in QEMU

From Computernewb Wiki
Jump to navigation Jump to search

< Windows 8.1 | Windows 11 >

The Windows 10 desktop in build 19042.962.

This guide details how to install Windows 10 in QEMU. Windows 10 is an operating system created by Microsoft, released in 2015. It is the second latest Windows version, behind Windows 11.

Prerequisites

QEMU

You will need QEMU installed.

Windows 10 ISO

You'll need a Windows 10 ISO for this guide. You can:

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 win10.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 6G -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=win10.qcow2 -device usb-tablet -device VGA,vgamem_mb=256 -nic user,model=e1000 -monitor stdio -cdrom en-us_windows_10_iot_enterprise_ltsc_2021_x64_dvd_257ad90f.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.

Activation

Windows 10 can be activated using Massgrave's Microsoft Activation Scripts:

  1. Download the latest MAS_AIO.cmd and run it
  2. Select 3 for TSForge Activation, followed by 1 to activate Windows.
  3. You should now have an activated copy of Windows 10.

< Windows 8.1 | Windows 11 >