A complete guide to install Windows as a guest operating system in Ubuntu, Linux Mint host using the open-source virt-manager (KVM/Qemu/libvirt).
If you are planning to get rid of Windows completely but want to access Windows-specific applications while being in Ubuntu, then it’s easier to try it out in a virtual machine. Although there are many virtualization applications, we will use the powerful virt-manager application for this guide.
Virtualization is the process of creating and managing virtual machines, which are isolated environments that mimic the behaviour of physical computers. Virt-manager leverages KVM, a virtualization technology built into the Linux kernel, and Qemu, a hardware emulator that enables the execution of guest operating systems.
Additionally, virt-manager utilizes libvirt, a library for managing virtualization technologies, to provide a seamless and feature-rich virtualization experience.
Before starting the Windows 11 installation, you need to prepare your system and get the Windows 11 ISO file from the official download page.
Table of Contents
Download Windows ISO file
Visit the official download page below. Choose Windows 11 64-bit and language. And download the ISO file. The ISO size of Windows 11 is around ~6GB.
Install and Set up virt-manager in Ubuntu, Linux Mint
Open a terminal and run the following command to install virt-manager.
sudo apt install virt-manager
After installation is complete, add the current user to the libvirt group. For the below example, replace “debugpoint” with your user name of the Ubuntu/Linux Mint system.
sudo adduser debugpoint libvirt
Then, start the libvirt daemon using:
sudo systemctl start libvirtd
And finally, start the virtual network.
sudo virsh net-start default
This should complete the installation of the virt-manager. For a detailed installation guide, visit this tutorial.
Set up TPM 2.0 in Ubuntu for virt-manager
One of the requirements of Windows 11 is TPM 2.0 (Trusted Platform Module 2.0). TPM is a hardware-based security mechanism enabling Windows 11 to perform secure facial-based authentication, BitLocker, etc.
However, if you install it in a virtual machine, you have to tweak certain settings in virt-manager and need specific packages.
Open a terminal and install the following packages.
sudo apt install ovmf swtpm swtpm-tools
Install Windows 11 in virt-manager on Ubuntu, Linux Mint
Before you proceed, make sure to reboot your Ubuntu or Linux Mint system after installing the above packages.
Create virtual machine
Open “Virtual machine manager” from the application menu. Click on New.
In the “New VM” window, choose “Local install media..”. Click Forward.
Choose the downloaded Windows 11 ISO file by clicking Browse > Browse Local button. Click forward.
Enter memory as 8 GB or 8192 and CPU as 4. This is the minimum value. You can enter more if your hardware is capable of this setup. Click forward.
Enter storage as 40 GB (minimum) on the next screen. Make sure to check the “Enable storage for this virtual machine”. And click forward.
In the final screen, give a name to your virtual machine. For example, I gave “win11”. Make sure to check the option “Customize configuration before install”. Click finish.
Configure TPM and other parameters
In the configuration window, go to the “Overview” page. Select the following values. Keep the rest unchanged.
Note: You may choose UEFI modules, but the Windows 11 ISO will not boot and may get stuck in the TIANOCORE Plymouth screen.
Go to the CPU page and make sure the vCPU allocation = 4.
Click on the “Add Hardware” button at the bottom left.
Select TPM from the left pane. Then select the following and hit Finish once done.
- Type: Emulated
- Model: TIS
- Version: 2.0
You should see the TPM 2.0 on the left side of the window. Now all the configuration is complete.
Hit the “Begin installation” button at the top.
Installing Windows 11
If all goes well, you should see the Windows logo and followed by the below screen. Choose Language, Keyboard and hit Next.
Click Install Now on the next screen. Wait for a few moments.
On the active Windows page, click on “I don’t have a product key”.
Select Windows 11 Home in the version selection screen.
Note: If you received the following error after clicking Next in the above screen – “This PC can’t run Windows 11”, then do the following to bypass all the checks.
If you don’t find this error, skip this section.
SHIFT+F10 to bring up the command prompt.
regedit and hit enter.
Right-click and select
New > Key. Add the key name as
LabConfig is selected, add
New > DWORD (32 bit) Value. Add the name as BypassTPMCheck. Then right-click on the name and select Modify. Give the value as 1.
Repeat the above steps to add
Set the value to 1 for both.
Finally, the LabConfig key set up should look like the below:
Close the registry editor and command prompt. Click on the back arrow to start the installation process.
Select “Custom: Install Windows only (advanced)” in the Windows set up screen. Select the virt-manager driver and hit next.
The installation will start. Wait for a few minutes for it to complete.
If all goes well, you should see the first set-up screen for Windows 11 inside virt-manager. It will be a series of screens where you need to provide various settings.
Follow the on-screen instructions in the next few screens. Remember that Windows 11 requires an online Microsoft account to log in, such as Hotmail, Office 365 or Outlook. And you need to be connected to the internet.
If all goes well, you should see Windows 11 running inside virt-manager in Ubuntu or Linux Mint.
I hope by following the step-by-step process outlined in this article, you can set up a virtual machine using virt-manager and install Windows 11 as a guest in Ubuntu or Linux Mint host.
If you run into errors, do let me know in the comment box.