Amazon Cyber Monday deals See deals →ad

Mets Minor League Blog

Music theory, instruments and musicians

Mets Minor League Blog

Music theory, instruments and musicians

QEMU on Windows 11: Install and Run a VM

QEMU lets you run another operating system in a virtual machine (VM) on your Windows 11 PC. You can use it to try a Linux distribution, test software in a separate environment, or run a guest operating system without replacing Windows. This guide covers installing QEMU, creating a virtual disk, booting an ISO, and completing the first install. You will need an operating-system ISO and enough free disk space and memory for the guest.

What You’ll Need

  • A Windows 11 PC with administrator access to install software. Hardware virtualization support is useful for speed; QEMU can also use slower software emulation if acceleration is unavailable.
  • A QEMU build for Windows. You can install it with the Windows Package Manager (winget), or download a Windows build through the Windows download links on the QEMU download page.
  • An ISO image for the operating system you want to install. Download it from that operating system’s official site. Check its system requirements and, where available, verify its checksum.
  • Several gigabytes of free storage for the ISO and virtual disk. A Linux test VM can often use a 25–30 GB virtual disk; the guest’s own recommendations take priority.

Step-by-Step

  1. Choose and download the guest OS. Pick a system that suits your goal, such as a desktop Linux distribution for a first test. Download its installation ISO to a folder you can find again, for example C:\ISO. Do not rename the ISO to a different file type. If you plan to install Windows as the guest, use Microsoft’s official ISO and remember that QEMU does not provide a Windows license or bypass activation requirements.
  2. Install QEMU. Open Windows Terminal or PowerShell. If winget is available, run the following command; accept the installation prompt if Windows displays one.
winget install --id QEMU.QEMU -e

If winget cannot find the package, use the Windows build linked from QEMU’s download page. Choose a build that matches your PC, run its installer, and note the installation folder. The exact installer and folder can vary by build. Avoid downloading executables from unfamiliar download sites. If the installer offers to add QEMU to PATH, enable that option; otherwise, you can run its programs by using their full paths.

  1. Check that the commands are available. Close and reopen Terminal so it picks up any PATH changes, then check both the emulator and disk utility:
qemu-system-x86_64 --version
qemu-img --version

You should see version information for each. If PowerShell reports that a command is not recognized, QEMU may not be on PATH. Find the installation’s qemu-system-x86_64.exe and qemu-img.exe files, then either add their folder to your user PATH or use the full executable path in each command. Open a new terminal after changing PATH.

  1. Prepare folders and a virtual disk. Create a folder for this VM and another for ISO files if you have not already done so. In PowerShell, create a 30 GB disk in the VM folder:
New-Item -ItemType Directory -Force C:\VMs
qemu-img create -f qcow2 C:\VMs\linux.qcow2 30G

The qcow2 format grows as the guest writes data, so a 30 GB virtual disk does not immediately occupy 30 GB on the host. It can still grow toward that size, so keep enough free space on the Windows drive. The disk is a file containing the guest’s storage; deleting it deletes the VM’s data. Give each VM its own disk file and use a descriptive filename.

  1. Decide whether to enable hardware acceleration. QEMU can run with its software translator, TCG, without changing Windows features, but performance may be modest. For better speed, search the Start menu for Turn Windows features on or off, open it, select Windows Hypervisor Platform, and restart if Windows requests it. This feature is separate from simply installing QEMU. Not every QEMU build or PC setup supports the WHPX accelerator, so test it in the next step. You do not need to enable acceleration to try the VM.
  2. Boot the installer ISO. Replace the example ISO path below with the actual filename you downloaded. This example assigns 4 GB of RAM and two virtual CPU cores; adjust those values to suit your computer and the guest’s minimum requirements.
qemu-system-x86_64 -machine pc,accel=whpx -m 4096 -smp 2 -drive file=C:\VMs\linux.qcow2,format=qcow2,if=ide -cdrom C:\ISO\linux.iso -boot order=d

Press Enter. A QEMU window should open and boot the installer’s menu. The -m 4096 option assigns 4096 MB of memory, and -smp 2 assigns two virtual cores. The -cdrom option attaches the ISO, while -boot order=d asks the VM to boot from it first. The example uses a basic PC machine with an IDE disk for broad installer compatibility; you can explore faster or newer virtual hardware after you have a working guest.

If QEMU says that WHPX is unavailable or fails to initialize it, try software emulation by changing accel=whpx to accel=tcg. This is a useful compatibility test, though it may run much more slowly. You can also omit the accelerator setting and let QEMU use its default. Do not run two QEMU processes against the same disk file at the same time.

  1. Install the operating system inside the VM. Follow the installer’s on-screen instructions as you would on a separate computer. When asked where to install, select the VM’s virtual disk, not a physical Windows drive. Choose the guest’s usual defaults unless you have a reason to change them. Installation time depends on the guest, your PC, and whether QEMU is using hardware acceleration. The VM window captures keyboard and mouse input; clicking inside it directs input to the guest.
  2. Restart into the installed system. When installation finishes, use the guest operating system’s restart or shutdown option. Close the QEMU window only after the guest has shut down, because closing it abruptly is like cutting power to a computer. Then start the VM again without the installer ISO and boot from the virtual disk:
qemu-system-x86_64 -machine pc,accel=whpx -m 4096 -smp 2 -drive file=C:\VMs\linux.qcow2,format=qcow2,if=ide

If you used TCG for the first boot, use accel=tcg here too. If the VM returns to the installer, check that the ISO is no longer attached and that the virtual disk is the same file used during setup. After the guest starts, complete any first-run setup, such as creating a user account and installing updates.

  1. Learn the basic controls and preserve the VM. Shut down from inside the guest whenever possible. QEMU’s window menu or keyboard shortcuts can vary by build, so use the menus or documentation for your version if you need to release the mouse or send a special key combination. Keep the ISO until the guest is installed and has booted successfully. To make a backup, shut down the guest and copy its .qcow2 file to another location. A copy made while the VM is running may not be consistent.

Common Mistakes

Using the wrong ISO path: A path that contains spaces needs quotation marks in PowerShell, such as -cdrom "C:\ISO\My Linux.iso". Check the exact filename and extension in File Explorer. Also confirm that you downloaded an installer ISO for your PC’s architecture; a disk image for ARM hardware is not interchangeable with a typical x86-64 PC image.

Expecting a virtual disk to be a real partition: The .qcow2 file is stored on Windows and is the guest’s disk. Do not select a physical host disk in an installer, and do not delete the QCOW2 file unless you intend to remove the VM. Keep free space on the host because a growing disk can eventually fill it.

Giving the VM too many resources: RAM assigned to QEMU is not available to Windows while the VM is running, and virtual CPU cores still compete for the host’s processor time. Start with a modest allocation that meets the guest’s requirements. Leaving Windows short on memory can make both systems sluggish or cause the guest to fail to start.

Assuming Windows 11 as a guest is identical to installing Linux: A Windows 11 guest has additional requirements, including UEFI firmware and TPM 2.0 support, and setup varies with QEMU version and configuration. It may require separate firmware and a software TPM. Research those requirements before creating the VM; the simple example commands here are intended as a basic first VM and do not configure those features.

Forgetting to remove the installer: Leaving the ISO attached with CD/DVD boot first can send the VM back to setup after a restart. Once installation is complete, detach the ISO or use the normal-start command without -cdrom and -boot order=d.

Tips

Keep a small note with the VM’s disk path, ISO source, RAM, CPU count, and QEMU command. QEMU is command-line driven in this workflow, so saving a working command in a text file saves time and makes it easier to reproduce the setup. Keep the ISO and virtual disk in clearly named folders, and avoid moving the disk while the VM is running.

By default, QEMU commonly gives a guest user-mode network access for outbound connections. That is usually enough to download updates or browse the web from the guest. It does not automatically make a service running in the guest reachable from other computers. For incoming connections, configure port forwarding deliberately and consult the QEMU documentation for the syntax supported by your build.

For Windows guests, Linux guests, and other systems, device choices affect convenience and performance. Start with a configuration that the installer recognizes instead of adding unfamiliar options all at once. Once the VM boots reliably, you can investigate features such as shared folders, clipboard integration, display resizing, and VirtIO drivers. Those features may need guest-side drivers or extra setup, and a shared folder gives the guest access to files on the host, so share only what you need.

Virtualization is not a perfect security boundary. Keep both Windows and the guest updated, download images from trusted sources, and be cautious with unknown software inside a VM. A guest with network access or shared files can still create risks for the host. Back up valuable VM data separately; a virtual machine is not automatically a backup just because it runs in a separate window.

Troubleshooting

“Command not found” or “not recognized”: Reopen Terminal after installation. If the problem remains, locate the QEMU installation folder and run the executable by its full path, or add that folder to PATH. Check that you installed a Windows build and that the command is spelled qemu-system-x86_64. Run qemu-img --version separately to confirm the disk utility is present too.

WHPX or virtualization initialization error: Check that Windows Hypervisor Platform is enabled and restart Windows after changing the feature. Confirm that your QEMU build supports WHPX. If acceleration still fails, use accel=tcg to see whether the guest can start without it. TCG is slower, especially for modern desktop systems, but it can help identify an acceleration-specific issue.

The VM opens to a black screen or does not boot: Verify that the ISO exists, is a bootable image for the intended architecture, and is attached with the correct path. Try the ISO in another trusted virtual machine or verify its published checksum. If the installer starts but cannot find a disk, keep the simple IDE disk configuration rather than switching to VirtIO before installing the required guest drivers.

“No space left” or disk creation fails: Check free space on the Windows drive and make sure the destination folder exists and is writable. Remember that a QCOW2 disk can grow as the guest uses it. If Windows reports a file access or permission error, close other QEMU instances using the file and check that the VM folder is not being blocked by permissions or security software.

The guest is very slow: Confirm whether you are using TCG or WHPX, reduce unnecessary workloads, and check that Windows has enough free memory. Do not assign nearly all host RAM or every CPU core to the VM. Some guests are simply demanding, and software emulation can be especially slow. For display or network problems after installation, first try the guest’s basic supported drivers before adding optional QEMU devices.

Frequently Asked Questions

Is QEMU free on Windows 11?
QEMU is open-source software and can be used without buying a QEMU license. The guest operating system may have its own license, activation, or usage requirements, so check those separately.

Do I need Hyper-V to use QEMU?
No. QEMU can use TCG software emulation without enabling Windows Hypervisor Platform. WHPX is an optional acceleration route for supported QEMU builds and configurations; it is not required for a basic test VM.

Can QEMU run Windows 11 as a guest?
Yes, but it needs more setup than the basic Linux example. Plan for UEFI firmware, TPM 2.0, suitable virtual hardware, and a valid Windows installation source. Check documentation for your QEMU build and do not assume the example command meets Windows 11’s guest requirements.

Can I use a graphical interface instead of commands?
Some third-party tools provide a graphical front end for QEMU, but they are separate software and may bundle or configure QEMU differently. The commands in this guide use QEMU directly. Check a front end’s reputation, compatibility, and installation source before using it.

Will the VM have internet access?
QEMU’s usual user-mode networking provides outbound access for common tasks when the host is online. Incoming connections to a service inside the VM need additional port-forwarding configuration; they are not automatically enabled.

How do I remove a VM?
Shut it down, then delete its virtual disk file and any VM-specific files you no longer need. Deleting the QCOW2 file permanently removes the guest’s stored data. Keep a backup first if you might want the VM again.

QEMU on Windows 11: Install and Run a VM
Scroll to top