Qemu on its own can be a bit scary but don’t worry this is super easy. If you already have Qemu/KVM setup go to Windows Installation Media. Lets jump straight into it:

Qemu/KVM

Just making sure your system can use the software, then installing it :)

Make sure you update your system first!

KVM

https://wiki.archlinux.org/title/KVM

Kernel-based Virtual Machine (KVM) makes hosting virtual machines super easy.

  1. Check for processor support: LC_ALL=C.UTF-8 lscpu | grep Virtualization
    • Should return ADM-V or VT-x
    • If nothing returns, you can’t use KVM.
  2. Check for necessary kernel modules: zgrep CONFIG_KVM= /proc/config.gz
    • Should return either y or m
  3. Make sure the modules are loaded:
$ lsmod | grep kvm

kvm_intel             245760  0
kvmgt                  28672  0
mdev                   20480  2 kvmgt,vfio_mdev
vfio                   32768  3 kvmgt,vfio_mdev,vfio_iommu_type1
kvm                   737280  2 kvmgt,kvm_intel
irqbypass              16384  1 kvm

libvirt

https://wiki.archlinux.org/title/Libvirt#Client

Just install sudo pacman -S libvirt dnsmasq

  • dnsmasq will handle the default NAT/DHCP networking

Qemu

https://wiki.archlinux.org/title/QEMU

I just install qemu-full because I have the disk space for some qemu fluff.

  • sudo pacman -S qemu-full

If you want a more minimal installation you may want to opt forqemu-desktop instead. Do not use qemu-base, it is headless and will not work with Windows 11.

virt-manager

https://wiki.archlinux.org/title/Virt-manager

Provides a GUI for libvirt

  1. Install: sudo pacman -S virt-manager
  2. Start and enable libvirt QEMU connection:
    • sudo systemctl enable libvirtd
    • sudo systemctl start libvirtd
  3. Set the default network to start when libvirtd starts
    • sudo virsh net-autostart default
  4. Add yourself to the libvirt user group
    • sudo usermod -aG libvirt YOUR_USERNAME

Windows Installation Media

We need to emulate a TPM2 chip for Windows 11. Just install these:

  • sudo pacman -S swtpm swtpm-tools
    • If you don’t have these virt-manager will tell you TMP2.0 is not available.

Create VM

  1. Open Virtual Machine manager
  2. Click the create new virtual machine button
    • Top left most icon that looks like a monitor
  3. Use default “Local install media (ISO image or CDROM)”
  4. Click forward then Browse… > Browse Local for the win11.iso file you downloaded.
    • If not automatically detected search for windows 11 in search box at the bottom of that window and continue.
  5. This next part depends on the resources you system has available. I just used 8192 MiB and 4 CPUs
  6. On the next page you create a storage volume for the OS. Make sure to Enable storage for this virtual machine and create a disk image for the virtual machine. I made mine 100 GiB
    • Minimum defined by Microsoft is 64 GiB
  7. On the next page check configure settings before creating
    • This will open the settings page. If you already moved on you can select you VM from the list and click Edit > Virtual Machine Details > Light Bulb Icon
  8. Click Add Hardware and select TPM and within that the Type: Emulated
  9. Again, click Add Hardware. This time add a storage device (at the top of the list).
    1. Select the radio button for Select or create custom storage and add the virtio-win.iso file you downloaded earlier.
    2. Set Device type to CDROM device
    3. Keep Bus type as SATA.

I know that was a bit wordy but that’s it! Just power on the virtual machine and press a key to boot from a drive. You will see this window: win11_virt_install.png

Breakdown of top boot options:

  1. This is the 100 GiB .qcow storage we allocated earlier. We didn’t install windows yet so it is empty.
  2. This is the EFI Firmware Setup tool
  3. This CD-ROM should be our win11.iso and is what we want to boot to
  4. The 2nd CD-ROM should be the virtio-win.iso you added in the previous step.

Select the first CD-ROM option. It will prompt for you to hit enter again - do that quickly or it will bring you back to the boot device selection.

From here it is a typical Windows installation process!

Bonus: Use a local account

We can bypass the Microsoft sign in ‘feature’. The methods I have used before seem to be patched. So lets just unplug the Network Interface Card. It is virtual just go to the little light bulb icon and turn it off. This works without fail: disable-NIC.png