Your cart is currently empty!
How to Create a Windows Virtual Machine in Linux With KVM
If you’re running Linux and need to use Windows, you don’t have to dual-boot or buy a second machine. KVM (Kernel-based Virtual Machine) lets you run Windows in a virtual machine right on your Linux desktop. Here’s how to get Windows running with KVM, step-by-step.
What You Need
- A Linux system with KVM support (most modern CPUs support virtualization)
- A Windows ISO file (Windows 10 or 11, for example)
- At least 4GB of RAM (more is better)
- About 40GB free disk space
1. Check for Virtualization Support
First, make sure your CPU supports virtualization. Open a terminal and run:
egrep -c '(vmx|svm)' /proc/cpuinfo
If the result is 1
or more, you’re good to go.
2. Install KVM and Virtual Machine Manager
Install KVM and the tools you’ll need:
On Ubuntu/Debian:
sudo apt update
sudo apt install qemu-kvm libvirt-daemon-system libvirt-clients bridge-utils virt-manager
On Fedora:
sudo dnf install @virtualization
sudo systemctl start libvirtd
sudo systemctl enable libvirtd
3. Add Yourself to the libvirt Group
This lets you manage VMs without being root:
sudo usermod -aG libvirt $(whoami)
Log out and back in for this to take effect.
4. Start Virtual Machine Manager
Open Virtual Machine Manager (virt-manager
) from your app menu or run:
virt-manager
5. Create a New Virtual Machine
- Click the “Create a new virtual machine” button.
- Choose “Local install media (ISO image).”
- Browse to your Windows ISO file.
- Pick the OS type (Windows 10, Windows 11, etc.).
- Allocate memory and CPU (at least 4096 MB RAM, 2 CPUs recommended).
- Create a new disk image (40 GB or more).
- Click “Finish” to create the VM.
6. Install Windows
The virtual machine will boot from your ISO. Follow the usual Windows installation process. You may need to load the “VirtIO” drivers for network and storage. You can attach the VirtIO driver ISO in virt-manager if needed.
7. Post-Install: Drivers & Tools
- After Windows installs, open “Device Manager.” If you see missing drivers, attach the VirtIO ISO and install the drivers from there.
- For better performance, install “Spice Guest Tools” and “QEMU Guest Agent.” This helps with clipboard sharing and improves display.
8. Enjoy Windows on Linux
Now you can run Windows right from your Linux desktop, copy files back and forth, and even run Windows-only apps without rebooting.
Troubleshooting Tips
- If you can’t start VMs, double-check virtualization is enabled in your BIOS.
- Slow performance? Give the VM more RAM or CPUs.
- Network not working? Make sure the “network” device is set to “virtio” and install the proper drivers.
Conclusion
With KVM and virt-manager, setting up a Windows virtual machine on Linux is fast and reliable. Whether you need it for work, testing, or the occasional Windows-only software, this setup keeps you in control without leaving your Linux comfort zone.
Need help or hit a snag? Drop your questions in the comments below!
Tech enthusiast and content creator passionate about making technology simple for everyone. I share practical tips, guides, and reviews on the latest in computers, software, and gadgets. Let’s explore the digital world together!