Setting Up a Windows 11 VM with virt-manager (Without Losing Your Mind)
Introduction
So you want to run Windows 11 in a virtual machine on Linux? Excellent choice! Whether you need it for testing, running that one annoying Windows-only app, or just want to see what Microsoft is up to these days, this guide will walk you through creating a properly optimized Windows 11 VM using virt-manager.
The beauty of what we are doing today is that we’re going to use VirtIO drivers (which are way faster than the default emulated hardware) and add some Hyper-V enlightenments to make Windows think it’s running on native Microsoft hypervisor technology. This makes everything smoother and faster.
Required Downloads and Setup
1. Virtual Machine Manager (virt-manager)
This is what we’ll use to create and manage our virtual machines. It sits on top of QEMU/KVM, which does the actual virtualization magic, and provides a nice UI so you don’t have to memorize terminal incantations. To starts the virtualization daemon that virt-manager uses behind the scenes to control VMs. Add user to that group. One of the most important part is gives your VMs internet access — basically a mini router inside your system.
sudo pacman -S virt-manager qemu-desktop dnsmasq vde2 bridge-utils openbsd-netcat
sudo systemctl enable --now libvirtd.service
sudo usermod -aG libvirt $USER
sudo virsh net-start default
sudo virsh net-autostart default
2. Windows 11 ISO
Head over to the official Microsoft download page and grab the Windows 11 ISO. Yes, it’s free to download — the activation popup comes later to remind you of capitalism. This ISO is what you’ll “insert” into your virtual DVD drive to install Windows inside the VM.
3. VirtIO Drivers ISO
Download this from the Fedora Project VirtIO Drivers page These are not optional — they’re the drivers that make Windows actually usable inside KVM. Without them, you’ll experience prehistoric speeds and missing devices. Yes it will take 1000 years.
4. Spice Guest Tools (for post-install)
Download from spice-space.org. This gives you proper display drivers, clipboard sharing, and other quality-of-life features
5. Setting up TPM 2.0 (for Windows 11)
Windows 11 demands TPM 2.0 and Secure Boot — which are security features for encryption, BitLocker, and secure authentication. In the VM world, TPM is emulated — meaning we fake it (and Windows is fine with that).
sudo pacman -S swtpm edk2-ovmf
- swtpm → Software TPM emulator; this tricks Windows into thinking your VM has a real TPM chip.
- edk2-ovmf → Provides UEFI firmware (needed for Secure Boot & modern installations). Once installed, you can enable TPM 2.0 and UEFI from the “Overview” tab in virt-manager when editing your VM settings.
System Preparation
Before we dive in, make sure virtualization is actually enabled: BIOS Settings: Boot into your BIOS/UEFI and enable virtualization Look for Intel VT-x or AMD-V (different names, same idea) Sometimes it’s hiding under “SVM Mode” or “Virtualization Technology” Why? Because your CPU has special hardware acceleration for VMs, and you definitely want to use it
Creating the VM: The Fun Setup Part
Initial Setup (Pre installations)
Open virt-manager and create a new VM, but here’s the trick: don’t click “Finish” yet!. Check the box that says “Customize configuration before install”. This is crucial because we need to tweak a bunch of settings before Windows even boots
Enable XML editing (you’ll need this later):
Go to Edit → Preferences → Enable XML editing. Don’t worry, you won’t need to write XML from scratch. We’re just copying and pasting some magic incantations.
Overview
- Ensure Chipset: Q35 and Firmwre: UEFI: Q35 is the modern chipset emulation that supports PCIe properly, and UEFI is what Windows 11 expects (it won’t even install with legacy BIOS).
- If you have an AMD CPU, remove the
<evmcs state="on"/>line. That’s an Intel-only feature. - Find the
section and add this <timer name="hypervclock" present="yes"/>, This gives Windows access to a Hyper-V synthetic timer.
CPU
- Enable host-passthrough : Instead of emulating a generic CPU, this passes through your actual CPU model to the VM. Windows gets to see and use all your CPU’s fancy features, which means better performance and compatibility.
Storage Setup
- Disk bus: VirtIO: Way faster than emulated SATA (we’re talking 5-10x faster I/O).
- Cache mode: none: Ensures data integrity by bypassing the host’s page cache.
- Discard mode : Allows TRIM commands to work, so deleted files actually free up space on your host drive.
Mount the VirtIO Driver ISO
- Add Hardware Browse to your virtio-win.iso and Device type: CDROM device : Windows has no idea what VirtIO devices are, so we need to load drivers during installation. This ISO contains all those drivers.
Network Configuration
- Device model: virtio : Same reason as the disk—VirtIO network is dramatically faster than emulated Intel or Realtek cards.
Other Configuration
- Add Guest Agent Channel: Add Hardware -> Channel -> Name:
org.qemu.guest_agent.0This lets your host and guest communicate for things like graceful shutdowns and status reporting. - Remove the Tablet device : It’s redundant and we don’t need it.
- Enable TPM : Type: Emulated, Version 2.0. Windows 11 literally refuses to install without a TPM. This emulates one so Microsoft’s installer stops complaining.
Windows Installation: The Obstacle Course
Disk Partitioning
When you get to the disk selection screen, Windows will act confused and claim it can’t find any disks. Don’t panic!
- Click “Load driver”
- Browse to E:\viostor\w11\amd64 (or whatever drive letter the VirtIO ISO got)
- Click OK Your disk should magically appear now!
Optional but recommended
Also load the network driver the same way from E:\NetKVM\w11\amd64. You can do this now or after installation. Bypassing Microsoft Account Requirement Microsoft really wants you to use a Microsoft account. We’re going to politely decline:
- When installation becomes graphical and asks for your region, press Shift+F10
- Type: OOBE\BYPASSNRO
- Wait for the automatic restart This command tells Windows to run the Out-of-Box Experience with Network Requirement Overrides disabled. Fancy name, simple result: you get a “I don’t have internet” option.
Post-Installation: Making It Actually Good
Once Windows is up and running, it’s time to make it fast and fully functional.
Open File Explorer → navigate to the VirtIO CD (usually E:) Double-click virtio-win-gt-x64.msi Follow the prompts and install everything
💡 What this does: This package installs all the essential VirtIO drivers — storage, network, and balloon (for dynamic memory), plus the QEMU guest agent. Together, they make your VM feel like real hardware instead of an emulation museum exhibit.
Once done, eject the VirtIO CD from your VM settings — you won’t need it again.
Sure — here’s a cleaner, more engaging rewrite with a short explanation of why Spice matters:
Install Spice Guest Tools
The secret sauce that makes your Windows VM actually pleasant to use.
- Run the Spice Guest Tools installer you downloaded earlier from spice-space.org
- Follow the on-screen setup — quick and painless
💡 Why Spice is important: Without Spice, your VM feels like remote-controlling a computer over a bad Wi-Fi connection. With it, everything becomes seamless — smooth graphics, fast mouse movement, and proper host–guest integration.
After installation, you’ll get:
- Auto-adjusting display resolution (resize the VM window, and Windows adapts instantly)
- Bidirectional clipboard (copy/paste between host and VM)
- Better mouse integration (no more cursor lag or capture issues)
- Drag-and-drop file transfer between host and guest
Basically, Spice turns your VM from “usable” to “actually enjoyable.”
Sure! Here’s a smoother, more natural paragraph-style version:
Optional: Enable 3D Acceleration
If you want your Windows VM to feel a bit more alive — with smoother animations and faster window rendering — enabling 3D acceleration is worth it. First, shut down your VM completely. Then, open its settings in virt-manager and under the Display section, select Spice, set the Listen Type to None, and enable OpenGL. Next, go to the Video section, switch the model to Virtio, and check the box for 3D acceleration.
💡 This allows Windows to tap into your host’s GPU for OpenGL rendering. You won’t get gaming-level performance, but the desktop experience becomes noticeably more fluid and responsive — perfect for daily use.
Optimizing Windows 11: Because It Needs Help
Fresh Windows 11 installs come loaded with background services, telemetry, and unwanted features. Here’s how to make it lean and VM-friendly.
Disable Copilot
Via Settings:
Settings → Personalization → Copilot → Disable
Via Group Policy (full removal):
Win + R → gpedit.msc
User Configuration → Administrative Templates → Windows Components → Windows Copilot
Double-click “Turn off Windows Copilot”, select Enabled, hit Apply.
Disable SuperFetch (SysMain)
Preloads apps into RAM — wastes resources in VMs.
Via Services:
Win + R → services.msc
Find SysMain → Properties → Startup type: Disabled → Stop.
Via Command Line:
sc stop "SysMain" & sc config "SysMain" start=disabled
Disable Visual Effects
Search → "Adjust the appearance and performance of Windows"
Select → "Adjust for best performance"
Clean Up Startup Programs
Via Task Manager:
Ctrl + Shift + Esc → Startup tab → Disable unnecessary items
Reduce Tracking & Telemetry
Disable Activity History:
Settings → Privacy & Security → Activity History → Uncheck "Store my activity history"
Disable Speech & Diagnostics:
Settings → Privacy & Security → Speech → Turn off
Settings → Privacy & Security → Diagnostics & Feedback → Disable optional data
Clean Start Menu:
Settings → Personalization → Start → Turn off recommendations
You’re Done
Congratulations! You now have a properly configured, optimized Windows 11 VM that should run significantly better than a default installation. It won’t match bare metal performance, but it’ll be respectable enough for most tasks. A few final tips:
- Snapshots are your friend: Take one now before you install anything else
- Allocate RAM wisely: Windows 11 wants at least 4GB, but 8GB is comfortable
- CPU cores: Give it at least 2 cores, 4 is better if you can spare them
- Dynamic memory: If using the balloon driver, you can configure memory to expand/contract based on need
Now go forth and use Windows when you absolutely have to, but from the comfort of your Linux system!
💡 Remember: If anything breaks, you have snapshots. Right? …Right?