DEV Community

Cover image for How to Install Windows 10/11 on Ubuntu Using KVM/QEMU
Muhammad S.A. Iqbal for T Insights

Posted on

How to Install Windows 10/11 on Ubuntu Using KVM/QEMU

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

  1. What We Are Building
  2. KVM vs QEMU vs libvirt vs virt-manager
  3. Windows 10 vs Windows 11
  4. Requirements
  5. Check Hardware Virtualization
  6. Install KVM/QEMU and Virtualization Packages
  7. Configure User Permissions
  8. Configure the libvirt Network
  9. Verify the KVM Installation
  10. Install and Open virt-manager
  11. Download Windows ISO
  12. Download VirtIO Drivers
  13. Create the Virtual Machine
  14. Configure UEFI (Especially for Windows 11)
  15. Configure CPU and RAM
  16. Configure the Virtual Disk
  17. Configure the Network
  18. Configure SPICE
  19. Attach the VirtIO ISO
  20. Start Windows Installation
  21. Load the VirtIO Storage Driver
  22. Install Windows
  23. Install VirtIO Guest Drivers
  24. Install SPICE Guest Agent
  25. Test Internet Connectivity
  26. Run and Manage Windows OS
  27. 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)              β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

Windows 11

UEFI
Secure Boot
TPM 2.0
VirtIO
SPICE
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

These values are starting points, not strict requirements.

5. Check Hardware Virtualization

Open Terminal.

Run:

lscpu | grep -E 'Virtualization|Model name'
Enter fullscreen mode Exit fullscreen mode

On an Intel system, you should see something similar to:

Model name: Intel(R) Core(TM) i5-1135G7
Virtualization: VT-x
Enter fullscreen mode Exit fullscreen mode

For AMD:

Virtualization: AMD-V
Enter fullscreen mode Exit fullscreen mode

Check whether /dev/kvm exists

Run:

ls -l /dev/kvm
Enter fullscreen mode Exit fullscreen mode

You should see something similar to:

crw-rw----+ 1 root kvm ... /dev/kvm
Enter fullscreen mode Exit fullscreen mode

Install the KVM checker

sudo apt update
sudo apt install -y cpu-checker
Enter fullscreen mode Exit fullscreen mode

Then:

kvm-ok
Enter fullscreen mode Exit fullscreen mode

Expected result:

INFO: /dev/kvm exists
KVM acceleration can be used
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

For AMD systems:

SVM
AMD-V
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode
sudo apt install -y \
qemu-system-x86 \
qemu-utils \
libvirt-daemon-system \
libvirt-clients \
virt-manager \
ovmf \
bridge-utils \
dnsmasq-base \
cpu-checker
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

that isn't necessarily an error.

For this setup, installing:

qemu-system-x86
Enter fullscreen mode Exit fullscreen mode

is sufficient.

7. Configure User Permissions

Add your user to the KVM and libvirt groups:

sudo usermod -aG kvm,libvirt $USER
Enter fullscreen mode Exit fullscreen mode

Check:

groups
Enter fullscreen mode Exit fullscreen mode

You should eventually see:

kvm
libvirt
Enter fullscreen mode Exit fullscreen mode

Important

Log out and log back in.

A reboot is also fine:

sudo reboot
Enter fullscreen mode Exit fullscreen mode

After logging back in:

groups
Enter fullscreen mode Exit fullscreen mode

8. Configure the libvirt Network

libvirt normally provides a default NAT network.

Check it:

virsh net-list --all
Enter fullscreen mode Exit fullscreen mode

You should see something like:

 Name      State    Autostart
-------------------------------
 default   active   yes
Enter fullscreen mode Exit fullscreen mode

If default exists but is inactive:

sudo virsh net-start default
Enter fullscreen mode Exit fullscreen mode

Enable automatic startup:

sudo virsh net-autostart default
Enter fullscreen mode Exit fullscreen mode

Check again:

 virsh net-list --all
Enter fullscreen mode Exit fullscreen mode

How the default network works

The typical architecture is:

Windows VM
    β”‚
    β–Ό
VirtIO Network Adapter
    β”‚
    β–Ό
libvirt default network
    β”‚
    β–Ό
NAT
    β”‚
    β–Ό
Ubuntu
    β”‚
    β–Ό
Internet
Enter fullscreen mode Exit fullscreen mode

The Windows VM does not need a physical network adapter.

9. Verify the KVM Installation

Run:

kvm-ok
Enter fullscreen mode Exit fullscreen mode

Then:

lsmod | grep kvm
Enter fullscreen mode Exit fullscreen mode

On Intel:

kvm_intel
kvm
Enter fullscreen mode Exit fullscreen mode

Check libvirt:

virsh list --all
Enter fullscreen mode Exit fullscreen mode

No VMs should exist yet.

That's fine.

Check the network:

virsh net-list --all
Enter fullscreen mode Exit fullscreen mode

You want the default network active.

10. Install and Open virt-manager

The package was already installed in step 5.

Launch it:

virt-manager
Enter fullscreen mode Exit fullscreen mode

Or open:

Applications
β†’ Virtual Machine Manager
Enter fullscreen mode Exit fullscreen mode

You should see:

QEMU/KVM
Enter fullscreen mode Exit fullscreen mode

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/
Enter fullscreen mode Exit fullscreen mode

For example:

~/Downloads/Win10_22H2.iso
Enter fullscreen mode Exit fullscreen mode

For Windows 11:

~/Downloads/Win11.iso
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

You should now have:

~/Downloads/
β”œβ”€β”€ Win10_22H2.iso
└── virtio-win.iso
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

Select:

QEMU/KVM
Enter fullscreen mode Exit fullscreen mode

Then:

File
β†’ New Virtual Machine
Enter fullscreen mode Exit fullscreen mode

Step 1 β€” Installation media

The configuration method is shown in the image below:

How to Install Windows 10/11 on Ubuntu Using KVM/QEMU

  • 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:

https://res.cloudinary.com/du7tjwbyi/image/upload/v1789884067/Screenshot_From_2026-09-19_09-54-54_scadbd.png

  • 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
Enter fullscreen mode Exit fullscreen mode

For an 8 GB host:

RAM: 4096 MB
CPU: 2–4 vCPU
Enter fullscreen mode Exit fullscreen mode

For a 32 GB host:

RAM: 8192 MB or more
Enter fullscreen mode Exit fullscreen mode

The configuration method is shown in the image below:

https://res.cloudinary.com/du7tjwbyi/image/upload/v1789885219/3_Create_new_virtual_machine_f0ruqz.png

  • Set RAM as 4096 MB (4GB) (NB: Its depends on your host computer)
  • Set CPU cores as 4 (NB: Its depends on your host computer)
  • Then Click Forward.

https://res.cloudinary.com/du7tjwbyi/image/upload/v1789885405/4_Create_new_virtual_machine_zum7sh.png

  • 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
Enter fullscreen mode Exit fullscreen mode

Select:

UEFI
Enter fullscreen mode Exit fullscreen mode

This normally uses OVMF/EDK2 firmware.

For Windows 10:

UEFI
Enter fullscreen mode Exit fullscreen mode

is sufficient.

For Windows 11, configure:

UEFI
+ Secure Boot capability
+ TPM 2.0
Enter fullscreen mode Exit fullscreen mode

Microsoft requires TPM 2.0 and UEFI/Secure Boot capability for Windows 11.

The configuration method is shown in the image below:

https://res.cloudinary.com/du7tjwbyi/image/upload/v1789885739/5_Create_new_virtual_machine_hjqipv.png

15. Configure the CPU

Use:

CPU model:
host-passthrough
Enter fullscreen mode Exit fullscreen mode

This exposes appropriate host CPU features to the guest.

Important CPU topology correction

Do not use:

Sockets: 1
Cores: 1
Threads: 2
Enter fullscreen mode Exit fullscreen mode

and then call the VM a 4-vCPU VM.

That configuration represents:

1 Γ— 1 Γ— 2 = 2 vCPU
Enter fullscreen mode Exit fullscreen mode

For 4 vCPU, if manually specifying topology, for example:

Sockets: 1
Cores: 2
Threads: 2
Enter fullscreen mode Exit fullscreen mode

gives:

1 Γ— 2 Γ— 2 = 4 vCPU
Enter fullscreen mode Exit fullscreen mode

However, for a normal desktop Windows VM, simply allocating 4 virtual CPUs is usually easier.

The configuration method is shown in the image below:

https://res.cloudinary.com/du7tjwbyi/image/upload/v1789891839/11_Configure_the_Virtual_Machine_fvnhcf.png

  • Select CPUs
  • Select Configuration as Copy host CPU configuration (host-passthrough)
  • Select Manually set CPU topology and set as Sockets: 1, Cores: 2, Threads: 2
  • Click Apply

16. Configure the Virtual Disk

Create a virtual disk:

80–100 GB
Enter fullscreen mode Exit fullscreen mode

For a general-purpose Windows VM:

100 GB
Enter fullscreen mode Exit fullscreen mode

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/
Enter fullscreen mode Exit fullscreen mode

For example:

/var/lib/libvirt/images/Windows-10.qcow2
Enter fullscreen mode Exit fullscreen mode

The configuration method is shown in the image below:

https://res.cloudinary.com/du7tjwbyi/image/upload/v1790076272/63_Configure_the_Virtual_Disk_gdynmc.png

  • Click Add Hardware
  • Select Storage
  • Select as Create a disk image for the virtual machine and set your prefer storage.
  • Then click Finish option

Configure VirtIO Storage

The configuration method is shown in the image below:

https://res.cloudinary.com/du7tjwbyi/image/upload/v1789885993/6_Configure_the_Virtual_Machine_eh1mnj.png

  • 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:

https://res.cloudinary.com/du7tjwbyi/image/upload/v1789886336/8_Configure_the_Virtual_Machine_pnw4bn.png

  • Select the network interface as NIC :9d:f3:8f
  • Set Network source as Virtual network 'default': NAT
  • Set Device model as virtio
  • Then click Apply

The final network architecture is:

Internet
   |
Ubuntu
   |
libvirt_NAT
   |
VirtIO_NIC
   |
Windows
Enter fullscreen mode Exit fullscreen mode

18. Configure SPICE Display

The configuration method is shown in the image below:

https://res.cloudinary.com/du7tjwbyi/image/upload/v1790075428/62_Configure_SPICE_Display_be7ss0.png

  • 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:

https://res.cloudinary.com/du7tjwbyi/image/upload/v1789886621/9_Configure_the_Virtual_Machine_iaivq9.png

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:

https://res.cloudinary.com/du7tjwbyi/image/upload/v1789887060/10_Configure_the_Virtual_Machine_elbeku.png

  • 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:

https://res.cloudinary.com/du7tjwbyi/image/upload/v1789892322/12_Configure_the_Virtual_Machine_kb6fn9.png

  • Select Boot Options
  • Select as Enable boot menu and organize boot sequences as -
    • SATA CDROM 1
    • VirtIO Disk 1
  • Click Apply

20. Start Windows Installation

The configuration method is shown in the image below:

https://res.cloudinary.com/du7tjwbyi/image/upload/v1789892522/13_Configure_the_Virtual_Machine_ynuklg.png

Click Begin Installation

https://res.cloudinary.com/du7tjwbyi/image/upload/v1789892842/14_Windows_OS_Installation_on_Virtual_Machine_uhku9t.png

When Allow inhibiting shortcut diaglog box shown then click Allow button.

  • Select Language
  • Select Time and currency Keyboard

https://res.cloudinary.com/du7tjwbyi/image/upload/v1789893008/15_Windows_OS_Installation_on_Virtual_Machine_n89efn.png

Then, click Install now

https://res.cloudinary.com/du7tjwbyi/image/upload/v1789893232/16_Windows_OS_Installation_on_Virtual_Machine_qif4j4.png

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.

https://res.cloudinary.com/du7tjwbyi/image/upload/v1789893234/17_Windows_OS_Installation_on_Virtual_Machine_ac6pwi.png

Select the Windows edition you are licensed to use. For example, Windows 10 Pro

https://res.cloudinary.com/du7tjwbyi/image/upload/v1789893237/18_Windows_OS_Installation_on_Virtual_Machine_rxmvj8.png

Accept I accept the license terms

https://res.cloudinary.com/du7tjwbyi/image/upload/v1789893238/19_Windows_OS_Installation_on_Virtual_Machine_bvh1mj.png

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.

https://res.cloudinary.com/du7tjwbyi/image/upload/v1789893241/20_Windows_OS_Installation_on_Virtual_Machine_qrdkdg.png

Click Load driver

Then:

Browse
Enter fullscreen mode Exit fullscreen mode

Open the VirtIO CD-ROM.

Depending on the VirtIO release and storage controller, look for directories such as:

viostor
vioscsi
Enter fullscreen mode Exit fullscreen mode

Then select the appropriate Windows 10 64-bit driver directory.

For example:

amd64
Enter fullscreen mode Exit fullscreen mode

The exact directory structure can change between VirtIO releases, so don't hard-code a specific path such as:

E:\amd64\w10\viostor.inf
Enter fullscreen mode Exit fullscreen mode

unless that exact path exists on the ISO you're using.

Select the appropriate .inf driver.

Windows Setup should then detect the virtual disk.

https://res.cloudinary.com/du7tjwbyi/image/upload/v1789893243/21_Windows_OS_Installation_on_Virtual_Machine_kurqpu.png

Then, click OK

https://res.cloudinary.com/du7tjwbyi/image/upload/v1789893246/22_Windows_OS_Installation_on_Virtual_Machine_hawe5x.png

Select as Red Hat VirtIO SCSI controller (E:\amd64\w10\viostor.inf)

22. Install Windows

The configuration method is shown in the image below:

https://res.cloudinary.com/du7tjwbyi/image/upload/v1789893253/23_Windows_OS_Installation_on_Virtual_Machine_tu2fau.png

  • 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

https://res.cloudinary.com/du7tjwbyi/image/upload/v1789893247/24_Windows_OS_Installation_on_Virtual_Machine_kuactk.png

https://res.cloudinary.com/du7tjwbyi/image/upload/v1789893256/25_Windows_OS_Installation_on_Virtual_Machine_ufndyt.png

https://res.cloudinary.com/du7tjwbyi/image/upload/v1789893259/26_Windows_OS_Installation_on_Virtual_Machine_pk1lgf.png

https://res.cloudinary.com/du7tjwbyi/image/upload/v1789893259/26_Windows_OS_Installation_on_Virtual_Machine_pk1lgf.png

https://res.cloudinary.com/du7tjwbyi/image/upload/v1789893251/27_Windows_OS_Installation_on_Virtual_Machine_qkv5fa.png

https://res.cloudinary.com/du7tjwbyi/image/upload/v1789893265/28_Windows_OS_Installation_on_Virtual_Machine_uw5uaz.png

https://res.cloudinary.com/du7tjwbyi/image/upload/v1789893265/28_Windows_OS_Installation_on_Virtual_Machine_uw5uaz.png

https://res.cloudinary.com/du7tjwbyi/image/upload/v1789893262/29_Windows_OS_Installation_on_Virtual_Machine_mevspw.png

https://res.cloudinary.com/du7tjwbyi/image/upload/v1789893268/30_Windows_OS_Installation_on_Virtual_Machine_etxwgp.png

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
Enter fullscreen mode Exit fullscreen mode

Open the VirtIO CD-ROM.

Depending on the VirtIO ISO, you may find:

virtio-win-gt-x64.msi
Enter fullscreen mode Exit fullscreen mode

or other guest-tool installers.

Install the appropriate package.

Restart Windows.

Verify VirtIO Devices

Open Device Manager

https://res.cloudinary.com/du7tjwbyi/image/upload/v1789897672/31_Windows_OS_Driver_Installation_on_Virtual_Machine_t66mm7.png

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
Enter fullscreen mode Exit fullscreen mode

https://res.cloudinary.com/du7tjwbyi/image/upload/v1789897674/32_Windows_OS_Driver_Installation_on_Virtual_Machine_lqyapq.png

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:

https://res.cloudinary.com/du7tjwbyi/image/upload/v1789903949/46_Install_spice-guest-tools_on_Windows_10_VM_OS_w1lbof.png

https://res.cloudinary.com/du7tjwbyi/image/upload/v1789903953/47_Install_spice-guest-tools_on_Windows_10_VM_OS_egkkfd.png

Restart Windows after installation.

25. Test Internet Connectivity

Open Command Prompt:

ipconfig
Enter fullscreen mode Exit fullscreen mode

The VM will commonly receive an address in:

192.168.122.x
Enter fullscreen mode Exit fullscreen mode

when using the standard libvirt NAT network.

Test the network:

ping 8.8.8.8
Enter fullscreen mode Exit fullscreen mode

Then test DNS:

ping google.com
Enter fullscreen mode Exit fullscreen mode

If both work:

Network      βœ“
DNS          βœ“
VirtIO NIC   βœ“
Internet     βœ“
Enter fullscreen mode Exit fullscreen mode

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:

https://res.cloudinary.com/du7tjwbyi/image/upload/v1789903957/49_Install_virt-viewer_on_Ubuntu_bq4zri.png

Open the Ubuntu terminal and type:

virt-viewer
Enter fullscreen mode Exit fullscreen mode

If virt-viewer is not installed, install it using:

sudo apt install virt-viewer
Enter fullscreen mode Exit fullscreen mode

❏❏❏ Run Windows 10/11 OS with KVM/QEMU

Suppose you are using Windows 10 as the guest OS.

https://res.cloudinary.com/du7tjwbyi/image/upload/v1789904613/53._Run_Windows_10_OS_with_KVM-QEMU_guk5ak.png

Open a terminal on Ubuntu and type:

virt-manager
Enter fullscreen mode Exit fullscreen mode

When the Virtual Machine Manager window opens, select Win10 and click the Play button.

This will be shown as follows:

https://res.cloudinary.com/du7tjwbyi/image/upload/v1789904616/54._Run_Windows_10_OS_with_KVM-QEMU_zkuyev.png

Now, open another terminal.

https://res.cloudinary.com/du7tjwbyi/image/upload/v1789904619/55._Run_Windows_10_OS_with_KVM-QEMU_isypll.png

Type:

virt-viewer
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

Name it:

Clean-Windows-10-Installation
Enter fullscreen mode Exit fullscreen mode

You can create another snapshot after installing your normal applications:

Windows-10-Base-Apps
Enter fullscreen mode Exit fullscreen mode

Snapshots are useful recovery points, but they should not replace proper VM backups.




πŸ—ΊοΈ Start and Stop the VM

Start

virsh start Windows-10
Enter fullscreen mode Exit fullscreen mode

Check status

virsh list --all
Enter fullscreen mode Exit fullscreen mode

Graceful shutdown

virsh shutdown Windows-10
Enter fullscreen mode Exit fullscreen mode

Force power off

virsh destroy Windows-10
Enter fullscreen mode Exit fullscreen mode

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:

https://res.cloudinary.com/du7tjwbyi/image/upload/v1789905739/57_USB_Device_Allow-Disallow_pacerc.png

In virt-manager:

  • Select Virtual Machine
  • Select Redirect USB device

https://res.cloudinary.com/du7tjwbyi/image/upload/v1789905743/58_USB_Device_Allow-Disallow_fuuf1a.png

Select the desired USB device and click.

https://res.cloudinary.com/du7tjwbyi/image/upload/v1789905747/59_USB_Device_Allow-Disallow_qohbq5.png

When you want to disconnect or eject USB devices

https://res.cloudinary.com/du7tjwbyi/image/upload/v1789905753/61_USB_Device_Allow-Disallow_pr2etl.png

Uncheck your USB-Device and close the windows.

You can also inspect USB devices from Ubuntu

lsusb
Enter fullscreen mode Exit fullscreen mode

Example:

Bus 001 Device 003: ID 046d:c077 Logitech Mouse
Enter fullscreen mode Exit fullscreen mode

πŸ—ΊοΈ 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
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

From Ubuntu, you can access:

smb://192.168.122.x/
Enter fullscreen mode Exit fullscreen mode

where 192.168.122.x is the Windows VM's address.

In Windows OS

The configuration method is shown in the image below:

https://res.cloudinary.com/du7tjwbyi/image/upload/v1789898832/35_Share_specific_folder_publicly_mvlx86.png

  • Create a folder and right-click it. When a new window opens, go to the Sharing tab.
  • Select Advanced Sharing and click it.
    • Select Share this folder and click the Permissions button.
    • Select Everyone and check the required permission options.
    • Click Apply and then click OK.

https://res.cloudinary.com/du7tjwbyi/image/upload/v1789898834/36_Share_specific_folder_publicly_v1uavs.png

  • Select the folder and right-click it. When a new window opens, go to the Security tab.
  • Select the Everyone option.
    • Check the required permission options.
    • Click Apply and then click OK.

https://res.cloudinary.com/du7tjwbyi/image/upload/v1789898837/37_Share_specific_folder_publicly_husdzd.png

Go to the search box and type Manage advanced sharing settings.

https://res.cloudinary.com/du7tjwbyi/image/upload/v1789898843/38_Share_specific_folder_publicly_jm46z4.png

Expand Private (current profile).

  • Enable Turn on network discovery.
  • Enable Turn on file and printer sharing.

https://res.cloudinary.com/du7tjwbyi/image/upload/v1789898844/39_Share_specific_folder_publicly_qjb4eo.png

Expand Guest or Public.

  • Enable Turn on network discovery.
  • Enable Turn on file and printer sharing.

https://res.cloudinary.com/du7tjwbyi/image/upload/v1789898859/40_Share_specific_folder_publicly_dxgmb1.png

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.

https://res.cloudinary.com/du7tjwbyi/image/upload/v1789898846/41_Share_specific_folder_publicly_zm3c9o.png

Go to the search box, type cmd, and select Command Prompt.

https://res.cloudinary.com/du7tjwbyi/image/upload/v1789898861/42_Share_specific_folder_publicly_ks6khp.png

Type the following command in the terminal:

ipconfig
Enter fullscreen mode Exit fullscreen mode

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.

https://res.cloudinary.com/du7tjwbyi/image/upload/v1789898866/43_Share_specific_folder_publicly_j2d7wq.png

Open Files on Ubuntu and go to the Network section. Enter:

smb://192.168.122.128
Enter fullscreen mode Exit fullscreen mode

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.

https://res.cloudinary.com/du7tjwbyi/image/upload/v1789898851/44_Share_specific_folder_publicly_m09wqu.png

Select your shared folder. For example, suppose the shared folder is named Drivers. Open the folder.

https://res.cloudinary.com/du7tjwbyi/image/upload/v1789898855/45_Share_specific_folder_publicly_qlthea.png

Copy or place the file you want to share into this folder. For example:

spice-guest-tools-latest.exe
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

and:

Windows
  ↓
Copy
  ↓
Ubuntu
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

Storage

VirtIO
Enter fullscreen mode Exit fullscreen mode

Network

VirtIO
Enter fullscreen mode Exit fullscreen mode

Firmware

UEFI
Enter fullscreen mode Exit fullscreen mode

Display

SPICE
Enter fullscreen mode Exit fullscreen mode

Disk

qcow2
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

Don't give Windows:

14 GB
Enter fullscreen mode Exit fullscreen mode

and leave Ubuntu with only 2 GB.

A more reasonable starting point is:

Ubuntu β†’ 8–10 GB
Windows β†’ 6–8 GB
Enter fullscreen mode Exit fullscreen mode

Adjust according to your workload.

If you're running:

VS Code
Docker
Chrome
Firefox
Kubernetes
Enter fullscreen mode Exit fullscreen mode

on Ubuntu simultaneously, leave more RAM for the host.

❏❏❏ Don't Overallocate CPU

If your processor has:

8 logical CPUs
Enter fullscreen mode Exit fullscreen mode

start with:

Windows β†’ 4 vCPU
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

You can see:

State
CPU(s)
Max memory
Used memory
Autostart
Enter fullscreen mode Exit fullscreen mode

❏❏❏ Check the QEMU Process

Run:

ps aux | grep '[q]emu'
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

On modular libvirt installations, you may also need:

sudo journalctl -u virtqemud --since today
Enter fullscreen mode Exit fullscreen mode

❏❏❏ VM Storage Location

The default libvirt storage location is commonly:

/var/lib/libvirt/images/
Enter fullscreen mode Exit fullscreen mode

Check:

sudo ls -lh /var/lib/libvirt/images/
Enter fullscreen mode Exit fullscreen mode

You may see:

Windows-10.qcow2
Enter fullscreen mode Exit fullscreen mode

πŸ—ΊοΈ Back Up the VM

First shut down Windows:

virsh shutdown Windows-10
Enter fullscreen mode Exit fullscreen mode

Check:

virsh list --all
Enter fullscreen mode Exit fullscreen mode

Export the VM configuration:

virsh dumpxml Windows-10 > ~/Windows-10.xml
Enter fullscreen mode Exit fullscreen mode

Back up the disk:

sudo rsync -avh --progress \
/var/lib/libvirt/images/Windows-10.qcow2 \
~/Windows-10-backup.qcow2
Enter fullscreen mode Exit fullscreen mode

Your backup set should contain:

Windows-10.xml
Windows-10.qcow2
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

Check:

virsh dominfo Windows-10
Enter fullscreen mode Exit fullscreen mode

To disable

virsh autostart --disable Windows-10
Enter fullscreen mode Exit fullscreen mode

For laptops and workstations, manual startup is often more convenient.

πŸ—ΊοΈ Useful virsh Commands

List VMs

virsh list --all
Enter fullscreen mode Exit fullscreen mode

Start VM

virsh start Windows-10
Enter fullscreen mode Exit fullscreen mode

Shut down VM

virsh shutdown Windows-10
Enter fullscreen mode Exit fullscreen mode

Force stop

virsh destroy Windows-10
Enter fullscreen mode Exit fullscreen mode

VM information

virsh dominfo Windows-10
Enter fullscreen mode Exit fullscreen mode

Export VM configuration

virsh dumpxml Windows-10
Enter fullscreen mode Exit fullscreen mode

List networks

virsh net-list --all
Enter fullscreen mode Exit fullscreen mode

Start default network

virsh net-start default
Enter fullscreen mode Exit fullscreen mode

Enable network autostart

virsh net-autostart default
Enter fullscreen mode Exit fullscreen mode

Enable VM autostart

virsh autostart Windows-10
Enter fullscreen mode Exit fullscreen mode

Disable VM autostart

virsh autostart --disable Windows-10
Enter fullscreen mode Exit fullscreen mode

πŸ—ΊοΈ Common Problem

❏❏❏ Common Problem: /dev/kvm Doesn't Exist

Check:

ls -l /dev/kvm
Enter fullscreen mode Exit fullscreen mode

Then:

lsmod | grep kvm
Enter fullscreen mode Exit fullscreen mode

For Intel:

sudo modprobe kvm_intel
Enter fullscreen mode Exit fullscreen mode

For AMD:

sudo modprobe kvm_amd
Enter fullscreen mode Exit fullscreen mode

Then:

ls -l /dev/kvm
Enter fullscreen mode Exit fullscreen mode

If it still doesn't exist, verify that virtualization is enabled in BIOS/UEFI.

❏❏❏ Common Problem: KVM Acceleration Is Unavailable

Run:

kvm-ok
Enter fullscreen mode Exit fullscreen mode

If KVM cannot be used:

  1. Reboot.
  2. Enter BIOS/UEFI.
  3. Enable Intel VT-x or AMD-V/SVM.
  4. Boot Ubuntu.
  5. Run:
kvm-ok
Enter fullscreen mode Exit fullscreen mode

again.

❏❏❏ Common Problem: default Network Is Inactive

Check:

virsh net-list --all
Enter fullscreen mode Exit fullscreen mode

If inactive:

sudo virsh net-start default
Enter fullscreen mode Exit fullscreen mode

Then:

sudo virsh net-autostart default
Enter fullscreen mode Exit fullscreen mode

❏❏❏ 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
Enter fullscreen mode Exit fullscreen mode

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'
Enter fullscreen mode Exit fullscreen mode

and:

Device model:
VirtIO
Enter fullscreen mode Exit fullscreen mode

Then verify the VirtIO network driver inside Windows.

Run:

ipconfig
Enter fullscreen mode Exit fullscreen mode

If no adapter appears, open:

Device Manager
β†’ Network adapters
Enter fullscreen mode Exit fullscreen mode

and install the appropriate VirtIO driver.

❏❏❏ Common Problem: Common Problem: Display Is Slow

Verify:

Display:
SPICE
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

and you later change the disk to:

VirtIO
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

Then check host resources:

free -h
Enter fullscreen mode Exit fullscreen mode

and:

top
Enter fullscreen mode Exit fullscreen mode

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               β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
Enter fullscreen mode Exit fullscreen mode

For Windows 11, additionally configure:

TPM            2.0
Secure Boot    Enabled/Supported
Enter fullscreen mode Exit fullscreen mode

❏❏❏ Complete Ubuntu Installation Commands

For a standard Ubuntu 26.04 setup:

sudo apt update
Enter fullscreen mode Exit fullscreen mode
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
Enter fullscreen mode Exit fullscreen mode

Add your user:

sudo usermod -aG kvm,libvirt $USER
Enter fullscreen mode Exit fullscreen mode

Configure libvirt:

sudo systemctl enable --now libvirtd
Enter fullscreen mode Exit fullscreen mode

Configure the default network:

sudo virsh net-start default
Enter fullscreen mode Exit fullscreen mode

If it is already running, that's fine.

Enable autostart:

sudo virsh net-autostart default
Enter fullscreen mode Exit fullscreen mode

Check KVM:

kvm-ok
Enter fullscreen mode Exit fullscreen mode

Reboot:

sudo reboot
Enter fullscreen mode Exit fullscreen mode

After reboot:

groups
Enter fullscreen mode Exit fullscreen mode

Then:

virt-manager
Enter fullscreen mode Exit fullscreen mode

❏❏❏ 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
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

Choose:

TPM Type:
Emulated
Enter fullscreen mode Exit fullscreen mode

and:

Version:
2.0
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

πŸ—ΊοΈ Conclusion

KVM/QEMU is a powerful way to run Windows inside Ubuntu without dual-booting.

Top comments (0)