How to Install Windows 10/11 on Ubuntu Using KVM/QEMU
Running Windows inside Ubuntu is one of the most useful applications of Linux virtualization. Instead of dual-booting or relying on traditional desktop virtualization software, you can run Windows as a virtual machine using KVM, QEMU, libvirt, and Virtual Machine Manager (virt-manager).
This setup provides hardware-assisted virtualization, VirtIO-based storage and networking, UEFI firmware, USB passthrough, snapshots, and convenient VM management.
Practical Environment: This guide uses Windows 10 as the primary hands-on example. The same general architecture can be used for Windows 11, but Windows 11 requires additional virtual hardware such as TPM 2.0 and Secure Boot-capable UEFI.
Important: Windows 10 reached end of support on October 14, 2025. Windows 10 can still run, but standard security and feature updates are no longer provided. For a new VM in 2026, Windows 11 is generally the current supported Windows target; Windows 10 remains useful for legacy applications and compatibility testing.
Table of Contents
- What We Are Building
- KVM vs QEMU vs libvirt vs virt-manager
- Windows 10 vs Windows 11
- Requirements
- Check Hardware Virtualization
- Install KVM/QEMU and Virtualization Packages
- Configure User Permissions
- Configure the libvirt Network
- Verify the KVM Installation
- Install and Open virt-manager
- Download Windows ISO
- Download VirtIO Drivers
- Create the Virtual Machine
- Configure UEFI (Especially for Windows 11)
- Configure CPU and RAM
- Configure the Virtual Disk
- Configure the Network
- Configure SPICE
- Attach the VirtIO ISO
- Start Windows Installation
- Load the VirtIO Storage Driver
- Install Windows
- Install VirtIO Guest Drivers
- Install SPICE Guest Agent
- Test Internet Connectivity
- Run and Manage Windows OS
- Create the First Snapshot
- πΊοΈ Start and Stop the VM
- πΊοΈ USB Passthrough
- πΊοΈ File Sharing Between Ubuntu and Windows
- πΊοΈ Clipboard Sharing
- πΊοΈ Performance Optimization
- πΊοΈ Back Up the VM
- πΊοΈ VM Autostart
- πΊοΈ Useful virsh Commands
- πΊοΈ Common Problems
- πΊοΈ Recommended Configuration
- πΊοΈ Final Architecture
- πΊοΈ Conclusion
1. What We Are Building
The final environment will look like this:
ββββββββββββββββββββββββββββββββββββββββββββββββββββ
β (Ubuntu 26.04 Host) β
β β
β ββββββββββββββββββββββββββββββββββββββββββββββ β
β β (Virtual Machine Manager) β β
β β β β
β β virt-manager β β
β β β β β
β β libvirt β β
β β β β β
β β QEMU β β
β β β β β
β β KVM β β
β β β β β
β β ββββββββββββββββββββββββββββββ β β
β β β Windows 10/11 β β β
β β β β β β
β β β 4 vCPU β β β
β β β 6 GB RAM β β β
β β β VirtIO Disk β β β
β β β VirtIO Network β β β
β β β SPICE Display β β β
β β β UEFI β β β
β β ββββββββββββββββββββββββββββββ β β
β ββββββββββββββββββββββββββββββββββββββββββββββ β
β β
β (Intel VT-x / AMD-V) β
ββββββββββββββββββββββββββββββββββββββββββββββββββββ
The technologies have different responsibilities.
- KVM β KVM (Kernel-based Virtual Machine) is the Linux kernel's hardware virtualization mechanism.
- QEMU β Its provides the virtual machine process and virtual hardware.
- libvirt β Its provides a management layer for QEMU/KVM virtual machines.
-
virt-manager β Virtual Machine Manager (
virt-manager) provides a graphical interface for managing libvirt VMs.
This combination is widely used for Linux virtualization and is an excellent foundation for learning virtualization and DevOps.
Other essentials are β
- OVMF β Its provides UEFI firmware for the virtual machine.
-
VirtIO β Its provides high-performance paravirtualized devices such as
Virtual disks,Network adapters,SCSI controllers - SPICE β Its provides the graphical console and guest integration features.
2. KVM vs QEMU vs libvirt vs virt-manager
A common source of confusion is thinking these are competing virtualization technologies.
They are actually different layers:
virt-manager
β
βΌ
libvirt
β
βΌ
QEMU
β
βΌ
KVM
β
βΌ
Physical CPU virtualization
In simple terms:
- KVM β Hardware acceleration
- QEMU β Virtual machine + virtual hardware
- libvirt β VM management
- virt-manager β GUI
This separation makes the platform flexible. You can manage the same VM using either a graphical interface or command-line tools such as virsh.
3. Windows 10 vs Windows 11
The basic KVM architecture works for both Windows 10 and Windows 11.
However, Windows 11 requires additional virtual hardware.
Microsoft lists requirements including:
- UEFI firmware
- Secure Boot capability
- TPM 2.0
- At least 4 GB RAM
- At least 64 GB storage
- At least two virtual processors
Therefore:
Windows 10
UEFI
VirtIO
SPICE
No vTPM required
Windows 11
UEFI
Secure Boot
TPM 2.0
VirtIO
SPICE
For this practical guide, Windows 10 is used because it makes the VirtIO installation process particularly easy to demonstrate.
4. Requirements
Hardware
Recommended:
- 64-bit Intel or AMD processor
- Intel VT-x or AMD-V
- At least 8 GB RAM
- 80β100 GB free storage
- SSD recommended
- Ubuntu 26.04 LTS
For comfortable Windows virtualization:
16 GB RAM or more
is preferable.
Recommended VM configuration
For a host with 16 GB RAM:
CPU: 4 vCPU
RAM: 6 GB
Disk: 80β100 GB
Storage: VirtIO
Network: VirtIO
Display: SPICE
Firmware: UEFI
These values are starting points, not strict requirements.
5. Check Hardware Virtualization
Open Terminal.
Run:
lscpu | grep -E 'Virtualization|Model name'
On an Intel system, you should see something similar to:
Model name: Intel(R) Core(TM) i5-1135G7
Virtualization: VT-x
For AMD:
Virtualization: AMD-V
Check whether /dev/kvm exists
Run:
ls -l /dev/kvm
You should see something similar to:
crw-rw----+ 1 root kvm ... /dev/kvm
Install the KVM checker
sudo apt update
sudo apt install -y cpu-checker
Then:
kvm-ok
Expected result:
INFO: /dev/kvm exists
KVM acceleration can be used
If KVM acceleration is unavailable, enter your computer's BIOS/UEFI and enable hardware virtualization.
For Intel systems, the option may be called:
Intel Virtualization Technology
VT-x
Intel VT
For AMD systems:
SVM
AMD-V
6. Install KVM/QEMU and Virtualization Packages
Ubuntu 26.04 uses newer HWE virtualization packages, so older tutorials may show slightly different package names.
Install the main components:
sudo apt update
sudo apt install -y \
qemu-system-x86 \
qemu-utils \
libvirt-daemon-system \
libvirt-clients \
virt-manager \
ovmf \
bridge-utils \
dnsmasq-base \
cpu-checker
What these packages provide
| Package | Purpose |
|---|---|
qemu-system-x86 |
QEMU x86 virtual machines |
qemu-utils |
QEMU disk utilities |
libvirt-daemon-system |
libvirt virtualization service |
libvirt-clients |
virsh command-line tools |
virt-manager |
GUI virtualization manager |
ovmf |
UEFI firmware |
bridge-utils |
Network bridge utilities |
dnsmasq-base |
Virtual network DHCP/DNS support |
cpu-checker |
KVM capability checking |
What about qemu-kvm? (Optional)
On some Ubuntu versions, tutorials tell you to run:
sudo apt install qemu-kvm
On newer Ubuntu releases, qemu-kvm may be a virtual package provided by another QEMU package.
If Ubuntu tells you:
Package qemu-kvm is a virtual package
that isn't necessarily an error.
For this setup, installing:
qemu-system-x86
is sufficient.
7. Configure User Permissions
Add your user to the KVM and libvirt groups:
sudo usermod -aG kvm,libvirt $USER
Check:
groups
You should eventually see:
kvm
libvirt
Important
Log out and log back in.
A reboot is also fine:
sudo reboot
After logging back in:
groups
8. Configure the libvirt Network
libvirt normally provides a default NAT network.
Check it:
virsh net-list --all
You should see something like:
Name State Autostart
-------------------------------
default active yes
If default exists but is inactive:
sudo virsh net-start default
Enable automatic startup:
sudo virsh net-autostart default
Check again:
virsh net-list --all
How the default network works
The typical architecture is:
Windows VM
β
βΌ
VirtIO Network Adapter
β
βΌ
libvirt default network
β
βΌ
NAT
β
βΌ
Ubuntu
β
βΌ
Internet
The Windows VM does not need a physical network adapter.
9. Verify the KVM Installation
Run:
kvm-ok
Then:
lsmod | grep kvm
On Intel:
kvm_intel
kvm
Check libvirt:
virsh list --all
No VMs should exist yet.
That's fine.
Check the network:
virsh net-list --all
You want the default network active.
10. Install and Open virt-manager
The package was already installed in step 5.
Launch it:
virt-manager
Or open:
Applications
β Virtual Machine Manager
You should see:
QEMU/KVM
Double-click the connection.
If it connects successfully, your virtualization environment is ready.
11. Download the Windows ISO
For Windows 10, download the ISO from Microsoft's official Windows 10 download page
For Windows 11, use Microsoft's official Windows 11 download page
Store the ISO somewhere such as:
~/Downloads/
For example:
~/Downloads/Win10_22H2.iso
For Windows 11:
~/Downloads/Win11.iso
Use a legitimate Windows license/product key for activation.
12. Download VirtIO Drivers
Windows does not necessarily contain the VirtIO drivers required for your virtual storage and network devices.
The virtio-win project provides Windows drivers and guest tools for QEMU/KVM. The project maintains stable and latest ISO builds.
Download the VirtIO Windows ISO from the official VirtIO project
Save it as:
~/Downloads/virtio-win.iso
You should now have:
~/Downloads/
βββ Win10_22H2.iso
βββ virtio-win.iso
VirtIO provides optimized virtual storage and networking drivers for Windows guests running on QEMU/KVM.
13. Create the Windows 10 Virtual Machine
Open Terminal and type:
virt-manager
Select:
QEMU/KVM
Then:
File
β New Virtual Machine
Step 1 β Installation media
The configuration method is shown in the image below:
- Select Local install media (ISO image or CDROM)
- Then click Forward
Step 2 β Select the Windows ISO
The configuration method is shown in the image below:
- Click Browse
- Select from
~/Downloads/Win10_22H2.iso - virt-manager may automatically detect:
Microsoft Windows 10. (If it doesn't, select the appropriate Windows version manually.) - Click Forward
Step 3 β Allocate RAM and CPU
For a 16 GB host, a reasonable starting point is:
RAM: 6144 MB
CPU: 4 vCPU
For an 8 GB host:
RAM: 4096 MB
CPU: 2β4 vCPU
For a 32 GB host:
RAM: 8192 MB or more
The configuration method is shown in the image below:
- Set RAM as
4096MB (4GB) (NB: Its depends on your host computer) - Set CPU cores as
4(NB: Its depends on your host computer) - Then Click Forward.
- Set name of VM OS
- Select Network
Avoid giving the VM almost all of the host's RAM.
Ubuntu still needs memory for:
- GNOME
- Browser
- VS Code
- Docker
- Background services
- QEMU
- Other applications
14. Configure UEFI (Especially for Windows 11)
Before starting installation, enable UEFI.
In virt-manager:
Overview
β Firmware
Select:
UEFI
This normally uses OVMF/EDK2 firmware.
For Windows 10:
UEFI
is sufficient.
For Windows 11, configure:
UEFI
+ Secure Boot capability
+ TPM 2.0
Microsoft requires TPM 2.0 and UEFI/Secure Boot capability for Windows 11.
The configuration method is shown in the image below:
15. Configure the CPU
Use:
CPU model:
host-passthrough
This exposes appropriate host CPU features to the guest.
Important CPU topology correction
Do not use:
Sockets: 1
Cores: 1
Threads: 2
and then call the VM a 4-vCPU VM.
That configuration represents:
1 Γ 1 Γ 2 = 2 vCPU
For 4 vCPU, if manually specifying topology, for example:
Sockets: 1
Cores: 2
Threads: 2
gives:
1 Γ 2 Γ 2 = 4 vCPU
However, for a normal desktop Windows VM, simply allocating 4 virtual CPUs is usually easier.
The configuration method is shown in the image below:
- Select CPUs
- Select
ConfigurationasCopy host CPU configuration (host-passthrough) - Select
Manually set CPU topologyand set as Sockets:1, Cores:2, Threads:2 - Click Apply
16. Configure the Virtual Disk
Create a virtual disk:
80β100 GB
For a general-purpose Windows VM:
100 GB
is a comfortable starting point if sufficient host storage is available.
The virtual disk format as qcow2
The default libvirt location is commonly:
/var/lib/libvirt/images/
For example:
/var/lib/libvirt/images/Windows-10.qcow2
The configuration method is shown in the image below:
- Click Add Hardware
- Select Storage
- Select as
Create a disk image for the virtual machineand set your prefer storage. - Then click Finish option
Configure VirtIO Storage
The configuration method is shown in the image below:
- Select SATA Disk 1
- Set Disk bus as
VirtIO - Click Apply
This gives Windows high-performance paravirtualized storage.
However, Windows Setup may not initially recognize the disk. That is why the VirtIO ISO must also be attached.
17. Configure the Network
The configuration method is shown in the image below:
- Select the network interface as NIC :9d:f3:8f
- Set
Network sourceasVirtual network 'default': NAT - Set
Device modelasvirtio - Then click Apply
The final network architecture is:
Internet
|
Ubuntu
|
libvirt_NAT
|
VirtIO_NIC
|
Windows
18. Configure SPICE Display
The configuration method is shown in the image below:
- Click Add Hardware
- Select Graphics
- Set type as
Spice server - Then click Finish
For the video device, use a model supported by your current virt-manager/QEMU/Windows combination. QXL remains a common SPICE configuration; VirtIO-GPU may also be available depending on the stack and Windows driver support.
Note: If any problem faced for selecting as Spice server, then switched as VNC server
19. Attach the VirtIO ISO
The configuration method is shown in the image below:
In virt-manager:
- Click Add Hardware
- Select Storage
- Select as
Select or create custom storage - Click Manage and select from
~/Downloads/virtio-win-0.1.302.iso - Then click Choose Volume
Now, Which setting you have to configure that shown in the image below:
- Set Device Type as
CDROM device - Set Bus type as
SATA - Then click Finish
Finally, Which setting you have to configure that shown in the image below:
- Select Boot Options
- Select as
Enable boot menuand organize boot sequences as -SATA CDROM 1VirtIO Disk 1
- Click Apply
20. Start Windows Installation
The configuration method is shown in the image below:
Click Begin Installation
When Allow inhibiting shortcut diaglog box shown then click Allow button.
- Select Language
- Select Time and currency Keyboard
Then, click Install now
When prompted for a product key, you can select as I don't have a product key, if you plan to activate Windows later with a valid license.
Select the Windows edition you are licensed to use. For example, Windows 10 Pro
Accept I accept the license terms
Select as Custom: Install Windows only (advanced)
21. Load the VirtIO Storage Driver
When you may reach as Where do you want to install Windows? and No drives were found.
This happens because Windows Setup does not have the required VirtIO storage driver loaded.
Click Load driver
Then:
Browse
Open the VirtIO CD-ROM.
Depending on the VirtIO release and storage controller, look for directories such as:
viostor
vioscsi
Then select the appropriate Windows 10 64-bit driver directory.
For example:
amd64
The exact directory structure can change between VirtIO releases, so don't hard-code a specific path such as:
E:\amd64\w10\viostor.inf
unless that exact path exists on the ISO you're using.
Select the appropriate .inf driver.
Windows Setup should then detect the virtual disk.
Then, click OK
Select as Red Hat VirtIO SCSI controller (E:\amd64\w10\viostor.inf)
22. Install Windows
The configuration method is shown in the image below:
- Select as Drive 0 Unallocated Space
- Click Next option.
Windows will create the necessary partitions automatically.
The installation will proceed and the VM will restart several times.
Once Windows starts booting from the virtual disk, you may remove the Windows installation ISO.
Keep the VirtIO ISO attached until the required drivers have been installed.
Complete Windows Initial Setup
Complete the normal Windows setup:
- Keyboard layout
- Network
- User account
- Password/PIN
- Privacy settings
If you temporarily install without Internet access, you can connect the VirtIO network after installing the network driver.
23. Install VirtIO Guest Drivers
After reaching the Windows desktop, open:
This PC
Open the VirtIO CD-ROM.
Depending on the VirtIO ISO, you may find:
virtio-win-gt-x64.msi
or other guest-tool installers.
Install the appropriate package.
Restart Windows.
Verify VirtIO Devices
Open Device Manager
Check:
- Disk drives
- Storage controllers
- Network adapters
- Display adapters
- System devices
There should be no unexplained yellow warning icons (β οΈ).
If you see one, right-click it:
Update driver β Browse my computer for drivers
24. Install SPICE Guest Agent
SPICE guest components are separate from the general VirtIO driver package.
The SPICE project provides Windows guest tools including SPICE-related guest components.
Download the appropriate SPICE guest tools from the official SPICE download area and install them inside Windows.
This can provide features such as:
- Better mouse integration
- Clipboard integration
- Guest-agent communication
- Improved desktop integration
The configuration method is shown in the image below:
Restart Windows after installation.
25. Test Internet Connectivity
Open Command Prompt:
ipconfig
The VM will commonly receive an address in:
192.168.122.x
when using the standard libvirt NAT network.
Test the network:
ping 8.8.8.8
Then test DNS:
ping google.com
If both work:
Network β
DNS β
VirtIO NIC β
Internet β
26. Run and Manage Windows-OS
βββ Install virt-viewer on Ubuntu
virt-viewer can connect to a virtual machine and display its graphical console in full-screen mode. Therefore, you can use it to view your Windows VM. This step is optional.
First, check whether virt-viewer is already installed.
The configuration method is shown in the image below:
Open the Ubuntu terminal and type:
virt-viewer
If virt-viewer is not installed, install it using:
sudo apt install virt-viewer
βββ Run Windows 10/11 OS with KVM/QEMU
Suppose you are using Windows 10 as the guest OS.
Open a terminal on Ubuntu and type:
virt-manager
When the Virtual Machine Manager window opens, select Win10 and click the Play button.
This will be shown as follows:
Now, open another terminal.
Type:
virt-viewer
When the Choose a virtual machine window opens, select Win10 and click the Connect button.
When the Allow inhibiting shortcuts dialog box appears, click the Allow button.
Now, enjoy!
27. Create the First Snapshot
Once Windows is completely configured, shut it down.
In virt-manager:
Windows-10
β Snapshots
β Create
Name it:
Clean-Windows-10-Installation
You can create another snapshot after installing your normal applications:
Windows-10-Base-Apps
Snapshots are useful recovery points, but they should not replace proper VM backups.
πΊοΈ Start and Stop the VM
Start
virsh start Windows-10
Check status
virsh list --all
Graceful shutdown
virsh shutdown Windows-10
Force power off
virsh destroy Windows-10
destroy does not delete the VM. It immediately stops the guest, similar to physically powering off a computer.
Use graceful shutdown whenever possible.
πΊοΈ USB Passthrough
USB devices can be passed from Ubuntu to Windows.
Examples include:
- USB flash drives
- Android phones
- USB printers
- USB adapters
- USB license dongles
The configuration method is shown in the image below:
In virt-manager:
- Select Virtual Machine
- Select Redirect USB device
Select the desired USB device and click.
When you want to disconnect or eject USB devices
Uncheck your USB-Device and close the windows.
You can also inspect USB devices from Ubuntu
lsusb
Example:
Bus 001 Device 003: ID 046d:c077 Logitech Mouse
πΊοΈ File Sharing Between Ubuntu and Windows
Your original article's file-sharing section needs the most cleanup.
There are two different directions.
Ubuntu β Windows
If Ubuntu contains the files you want Windows to access, use Samba or another network-sharing mechanism on Ubuntu.
Windows can then access:
\\192.168.122.1\share
depending on the host-side network configuration.
Windows β Ubuntu
If Windows contains the files you want Ubuntu to access, share the folder from Windows using SMB.
For example:
Windows shared folder
β
βΌ
SMB
β
βΌ
Ubuntu Files
From Ubuntu, you can access:
smb://192.168.122.x/
where 192.168.122.x is the Windows VM's address.
In Windows OS
The configuration method is shown in the image below:
- Create a folder and right-click it. When a new window opens, go to the
Sharingtab. - Select
Advanced Sharingand click it.- Select
Share this folderand click thePermissionsbutton. - Select
Everyoneand check the required permission options. - Click
Applyand then clickOK.
- Select
- Select the folder and right-click it. When a new window opens, go to the
Securitytab. - Select the
Everyoneoption.- Check the required permission options.
- Click
Applyand then clickOK.
Go to the search box and type Manage advanced sharing settings.
Expand Private (current profile).
- Enable
Turn on network discovery. - Enable
Turn on file and printer sharing.
Expand Guest or Public.
- Enable
Turn on network discovery. - Enable
Turn on file and printer sharing.
Expand All Networks.
- Enable
Turn on sharing so anyone with network access can read and write files in the Public folders. - Enable
Use 128-bit encryption to help protect file sharing connections (recommended).
For normal use, do not disable password-protected sharing. Using authenticated SMB access is preferable.
Go to the search box, type cmd, and select Command Prompt.
Type the following command in the terminal:
ipconfig
Then look for the IPv4 Address. This is the IP address of the Windows 10 VM. For example, suppose the IP address is 192.168.122.128.
Open Files on Ubuntu and go to the Network section. Enter:
smb://192.168.122.128
Then press Enter.
- After pressing Enter, a new Authentication Required window will appear.
- Select the password field and enter your Windows login password.
- Click the Connect button.
Select your shared folder. For example, suppose the shared folder is named Drivers. Open the folder.
Copy or place the file you want to share into this folder. For example:
spice-guest-tools-latest.exe
You can then access this file from Ubuntu through the Windows SMB share.
πΊοΈ Clipboard Sharing
With SPICE guest components installed and the VM configured for SPICE, clipboard integration may allow:
Ubuntu
β
Copy
β
Windows
and:
Windows
β
Copy
β
Ubuntu
Test both directions.
For large files, use SMB or another file-transfer mechanism rather than clipboard or drag-and-drop.
πΊοΈ Performance Optimization
Once the VM is working, verify the following.
CPU
host-passthrough
Storage
VirtIO
Network
VirtIO
Firmware
UEFI
Display
SPICE
Disk
qcow2
Ubuntu 26.04's current QEMU/libvirt stack includes modern VirtIO and virtualization improvements, so current Ubuntu packages are preferable to manually installing old QEMU/libvirt versions from third-party guides. (Ubuntu Documentation)
βββ Don't Overallocate RAM
Suppose the host has:
16 GB RAM
Don't give Windows:
14 GB
and leave Ubuntu with only 2 GB.
A more reasonable starting point is:
Ubuntu β 8β10 GB
Windows β 6β8 GB
Adjust according to your workload.
If you're running:
VS Code
Docker
Chrome
Firefox
Kubernetes
on Ubuntu simultaneously, leave more RAM for the host.
βββ Don't Overallocate CPU
If your processor has:
8 logical CPUs
start with:
Windows β 4 vCPU
and allow Ubuntu to use the remaining CPU capacity.
More vCPUs do not automatically mean better VM performance.
βββ Check VM Information
Run:
virsh dominfo Windows-10
You can see:
State
CPU(s)
Max memory
Used memory
Autostart
βββ Check the QEMU Process
Run:
ps aux | grep '[q]emu'
This allows you to inspect the QEMU process associated with the running VM.
βββ Check libvirt Logs
If a VM refuses to start, check:
sudo journalctl -u libvirtd --since today
On modular libvirt installations, you may also need:
sudo journalctl -u virtqemud --since today
βββ VM Storage Location
The default libvirt storage location is commonly:
/var/lib/libvirt/images/
Check:
sudo ls -lh /var/lib/libvirt/images/
You may see:
Windows-10.qcow2
πΊοΈ Back Up the VM
First shut down Windows:
virsh shutdown Windows-10
Check:
virsh list --all
Export the VM configuration:
virsh dumpxml Windows-10 > ~/Windows-10.xml
Back up the disk:
sudo rsync -avh --progress \
/var/lib/libvirt/images/Windows-10.qcow2 \
~/Windows-10-backup.qcow2
Your backup set should contain:
Windows-10.xml
Windows-10.qcow2
For a serious backup strategy, store the backup on a different physical disk from the original VM.
πΊοΈ VM Autostart
Enable VM Autostart
If you want Windows to start automatically with Ubuntu:
virsh autostart Windows-10
Check:
virsh dominfo Windows-10
To disable
virsh autostart --disable Windows-10
For laptops and workstations, manual startup is often more convenient.
πΊοΈ Useful virsh Commands
List VMs
virsh list --all
Start VM
virsh start Windows-10
Shut down VM
virsh shutdown Windows-10
Force stop
virsh destroy Windows-10
VM information
virsh dominfo Windows-10
Export VM configuration
virsh dumpxml Windows-10
List networks
virsh net-list --all
Start default network
virsh net-start default
Enable network autostart
virsh net-autostart default
Enable VM autostart
virsh autostart Windows-10
Disable VM autostart
virsh autostart --disable Windows-10
πΊοΈ Common Problem
βββ Common Problem: /dev/kvm Doesn't Exist
Check:
ls -l /dev/kvm
Then:
lsmod | grep kvm
For Intel:
sudo modprobe kvm_intel
For AMD:
sudo modprobe kvm_amd
Then:
ls -l /dev/kvm
If it still doesn't exist, verify that virtualization is enabled in BIOS/UEFI.
βββ Common Problem: KVM Acceleration Is Unavailable
Run:
kvm-ok
If KVM cannot be used:
- Reboot.
- Enter BIOS/UEFI.
- Enable Intel VT-x or AMD-V/SVM.
- Boot Ubuntu.
- Run:
kvm-ok
again.
βββ Common Problem: default Network Is Inactive
Check:
virsh net-list --all
If inactive:
sudo virsh net-start default
Then:
sudo virsh net-autostart default
βββ Common Problem: Windows Says "No Drives Found"
This normally means that the VirtIO storage driver has not been loaded.
Go to:
Load driver
β Browse
β VirtIO CD
β viostor / vioscsi
β Windows version
β amd64
Select the appropriate .inf file.
The virtual disk should then appear.
βββ Common Problem: Windows Has No Internet
In virt-manager, check:
Network source:
Virtual network 'default'
and:
Device model:
VirtIO
Then verify the VirtIO network driver inside Windows.
Run:
ipconfig
If no adapter appears, open:
Device Manager
β Network adapters
and install the appropriate VirtIO driver.
βββ Common Problem: Common Problem: Display Is Slow
Verify:
Display:
SPICE
and make sure the appropriate Windows display/guest components are installed.
Also verify that the video device configured in virt-manager has a compatible Windows driver.
βββ Common Problem: Common Problem: Windows Won't Boot After Changing Disk Bus
Suppose Windows was installed using:
SATA
and you later change the disk to:
VirtIO
Windows may fail to boot if the VirtIO storage driver wasn't installed beforehand.
The correct sequence is:
Install VirtIO driver
β
Verify driver
β
Shut down Windows
β
Change disk to VirtIO
β
Boot Windows
Don't change storage controllers randomly after installation.
βββ Common Problem: Common Problem: VM Is Extremely Slow
Check:
CPU:
host-passthrough
Disk:
VirtIO
Network:
VirtIO
Firmware:
UEFI
Display:
SPICE
Then check host resources:
free -h
and:
top
If Ubuntu is running out of RAM or CPU, reduce the VM's allocation.
πΊοΈ Recommended Configuration
For a host with 16 GB RAM:
ββββββββββββββββββββββββββββββββββββ
β Windows VM β
ββββββββββββββββββββββββββββββββββββ€
β RAM 6 GB β
β CPU 4 vCPU β
β CPU Model host-passthrough β
β Disk 80β100 GB β
β Disk Format qcow2 β
β Disk Bus VirtIO β
β Network VirtIO β
β Network libvirt NAT β
β Firmware UEFI β
β Display SPICE β
ββββββββββββββββββββββββββββββββββββ
For Windows 11, additionally configure:
TPM 2.0
Secure Boot Enabled/Supported
βββ Complete Ubuntu Installation Commands
For a standard Ubuntu 26.04 setup:
sudo apt update
sudo apt install -y \
qemu-kvm \
qemu-system-x86 \
qemu-utils \
libvirt-daemon-system \
libvirt-clients \
virt-manager \
ovmf \
bridge-utils \
dnsmasq-base \
cpu-checker
Add your user:
sudo usermod -aG kvm,libvirt $USER
Configure libvirt:
sudo systemctl enable --now libvirtd
Configure the default network:
sudo virsh net-start default
If it is already running, that's fine.
Enable autostart:
sudo virsh net-autostart default
Check KVM:
kvm-ok
Reboot:
sudo reboot
After reboot:
groups
Then:
virt-manager
βββ Windows 11 Additional Configuration
If you want to use Windows 11 instead of Windows 10, create the VM using:
UEFI
TPM 2.0
Secure Boot
4+ GB RAM
2+ vCPU
64+ GB storage
Microsoft specifically lists TPM 2.0, UEFI/Secure Boot capability, storage, memory, and processor requirements for Windows 11. (Microsoft Support)
In virt-manager, you can add a virtual TPM through:
Add Hardware
β TPM
Choose:
TPM Type:
Emulated
and:
Version:
2.0
The exact virt-manager UI may differ slightly between Ubuntu releases.
πΊοΈ Final Architecture
After configuration:
INTERNET
β
βΌ
Ubuntu 26.04 Host
β
ββββββββββββ΄βββββββββββ
β β
libvirt KVM
β β
ββββββββββββ¬βββββββββββ
β
QEMU
β
ββββββββββ΄βββββββββ
β β
VirtIO SPICE
β β
βΌ βΌ
Windows 10/11 VM Console
β
ββββββββββββΌββββββββββββ
β β β
Disk Network USB
VirtIO VirtIO Passthrough
πΊοΈ Conclusion
KVM/QEMU is a powerful way to run Windows inside Ubuntu without dual-booting.






















































Top comments (0)