Microsoft announced Windows 11 recently, and it is the cleanest and more polished version of windows out there. And those who cannot wait and try it out can register themselves for the windows insider program and upgrade themselves to the new windows 11.
However, I may not choose my main laptop to replace my windows 10 with windows 11 beta software yet because you never know what software bugs you will hit while working on something. So the workaround would be, if you want to get your hands on windows 11, is virtualizing them in your hypervisor environment. You could try to install windows 11 on Virtualbox, Vmware workstation, and my favorite open-source hypervisor – KVM.
In this blog, we will look at installing Windows 11 on the Linux KVM hypervisor step by step.
- Before you proceed, you need to have the windows 11 iso image downloaded. Follow the article here on how to download the windows 11 iso image officially from Microsoft.
- Windows 11 virtio drivers – click here to download.
- Follow the steps below to install the KVM on your Linux machine.
I am using Ubuntu; however, the steps mentioned here are identical for other Linux distributions as well.
sudo apt install qemu-kvm bridge-utils virt-manager libosinfo-bin -y
yum install qemu-kvm libvirt virt-install virt-manager virt-install -y
sudo dnf -y install bridge-utils libvirt virt-install qemu-kvm
sudo apt install qemu-kvm libvirt-clients libvirt-daemon-system bridge-utils
sudo apt install qemu-kvm bridge-utils virt-manager libosinfo-bin -y
Steps to install Windows 11 on KVM.
- Create the Windows 11 VM in the KVM.
- Configure the virtual hardware for windows 11 in KVM.
- Add the windows 11 virtio driver.
- Change the boot order.
- Configure the CPU for windows 11.
- Begin the Windows 11 installation in KVM.
- Complete the initial setup wizard.
- Install QEMU virtio drivers for windows 11.
- Update the Display adapter.
- Remove the CDROM from the KVM.
1. Create the Windows 11 VM in the KVM.
Open terminal in your Linux host (CTRL + ALT + T) and on the command line type virt-manager, this will open up the virtualization manager GUI on your machine.
On the GUI type, click on the icon on the top left that says create a new virtual machine. This will open up the KVM virtual machine creation wizard.
Choose the Windows 11 image for the installation.
We will install windows 11 with an ISO image, so choose the option that says Local install media and click on forward.
Attach the windows 11 iso.
Click on Browse to attach the windows 11 iso file, the KVM will automatically detect the operating system like Windows 10, at the time of this writing the windows11 is not in the KVM supported operating system, so you won’t be able to find the windows11 by manually choosing the option either. Windows 10 should work fine, so click on forward.
Configure the Memory and CPU for windows 11.
By default, Qemu KVM will choose the Memory as 4GB and 2 CPUs, which is more than enough for daily operations. If you wanted to make changes here, you may increase it as per your requirement. We will be further changing the CPU configuration later on, Click on Forward.
Create windows 11 virtual hard disk.
You can leave the default virtual hard disk storage as 40GB, but for my requirement, I would require 60GB, so choose the storage based on your requirement.
40GB will be more than enough for most of the installations. If you would like to extend the storage later on in the KVM, you can follow the article here to extend it.
After defining the storage, Click on Forward.
Specify the VM properties.
- Define the Name.
Here you need to specify the VM name because the VM was picked up as windows 10 initially, the name also shows win10, and I am going to change it to Windows 11.
- Choose the Customize configuration before install.
- Choose the network.
Here I am choosing the default NAT interface, so the virtual machine can go out to the internet, which is the safe and best option. If you wanted this VM to be part of the same network as your host machine, you could choose the bridge interface known as the host device. But I am not going to do that here.
After the changes, click on Finish, a VM customization window will now pop up.
2. Configure the virtual hardware for windows 11 in KVM.
For the windows11 VM to work perfectly on the KVM, we need to make some changes on the virtual hardware, lets go ahead and do that now.
Choose the Virtual hard disk as qemu VirtIO.
We need to tell the KVM to use virtio as the hard disk bus type in the customization window.
- Click on SATA Disk 1.
- Under details click on Advanced options.
- Choose the disk bus as VirtIO, and leave the hard disk type as qcow2.
If you want to get good performance, you can make the storage format raw, but that will have limitations on taking snapshots, expanding the storage, and so on. So I am okay with qcow2, in case if you would like to have a good performance, you may change it to raw.
After the selection click on Apply.
Configure the graphics.
We have to add a VNC viewer as the graphics, click on add hardware option on the bottom,
In the Add new virtual hardware window, click on Graphics, and choose Graphics type as VNC Server, and click on Finish.
Change the network interface as Qemu KVM compatible.
Click on the Network interface, in the device model you can see the interface as e1000e, change the interface to virtio.
Click on Apply.
3. Add the windows 11 virtio driver.
Remember we have downloaded virtio driver, you need to attach that ISO as CD driver here, so that the windows 11 operating system can choose the KVM virtio virtual drivers during the installation.
- Click on Add hardware.
- Select storage, click on Manage to attach the virtio driver that you have downloaded.
- Choose the Device type as CDROM Device.
- Click on Finish.
4. Change the boot order.
At this point, you will have two virtual CD-ROMs attached to the VM, the first one has the windows 11 iso, and the second one has virtio drivers.
You need to make sure the CDROM1 gets selected during the boot. Click on Boot options. Under boot device order, check the SATA CDROM1 and click on the up arrow on the right to move it up.
You now will have CDROM1 as the primary and virtual hard drive, and then CDROM2. After the selection, click on Apply
5. Configure the CPU for windows 11.
I have enough CPU cores on my machine, and I will give 4 CPUs for the windows 11 guest machine.
Click on CPU, Choose the current allocations to 4.
- Under topology, Select manually set CPU topology.
- Select socket as 1.
- Core as 2.
- Thread as 2.
Note: If you would like to change the CPU to just two, you may change the allocation to 2, and the core as 1, and the thread as 1. If the CPU doesn’t support threading, you can choose the core as 2 and click on Apply.
6. Begin the Windows 11 installation in KVM.
You may now click on Begin installation in the top left corner
The windows 11 installation will begin, choose the language and keyboard layout of your choice and click on Next and choose to Install now.
Since I don’t have the product key, check the option that says, I don’t have a product key.
Choose the version of your choice.
I am choosing Windows 11 pro, and click on next.
Accept the license agreement and click on Next.
Choose the type of installation as custom.
You won’t be able to find the hard disk that you have added,
Click on Load driver. In the prompt, click on OK.
Because we have attached the virtio IO driver iso file while customizing the VM, you will see the list virto drivers listed for each windows operating system. Currently, the virto IO driver isn’t available for windows11 yet, we have to choose windows 10 instead, and click on Next
You should now see your virtual hard disk listed in the windows 11 setup wizard.
Choose the hard disk, and click on Next.
The installation will now begin, and this process will take time depends on your hardware.
7. Complete the initial setup wizard.
After the installation, you will be presented with the initial setup wizard.
Choose the country of your choice and click on Next.
On the screen where it says, let’s connect to the network, choose I don’t have a network.
Even if you try to connect to the network, it won’t let you connect because you don’t have windows 11 qemu drivers installed yet, which we will do later.
On the next screen, choose to continue with a Limited setup.
You will have to create a local account to begin with, enter the username and password, and you also need to setup 3 security questions as well. After that privacy settings, accept the privacy setting based on your requirement.
Wait for a couple of minutes and you will boot into the windows successfully.
8. Install QEMU virtio drivers for windows 11.
Click on the search button and search for Device Manager, just open it.
Here you will see the list of drivers that you have on your machine. If you notice under ‘other drivers‘, you should see some drivers are not installed.
- Right-click on the Ethernet adapter and click on update driver.
- In the update windows driver wizard click on Browse my computer for drivers.
Click on browse and choose the virtio iso file that we have attached earlier as CDROM.
And click on Next.
You should see the ethernet adapter driver installed successfully.
You can also notice that your computer is now connected to the internet.
Follow the same steps for all other drives, except ‘unknown device’, which you cannot install with the virtio driver and it is okay to leave it as it is.
9. Update the Display adapter.
After completing the installation of other devices, you may now go ahead and install the Display adapters.
If you look under Display adapter, you should see Microsoft Basic Display Adapter by default installed, right-click on the driver and click on update driver.
Follow the same steps that you followed for other device drivers and you should see the display driver got updated with Redhat QXL Controller.
10. Remove the CDROM from the KVM.
After the driver installation, let’s go ahead and remove both the windows 11 iso and virtio driver from the cd rom.
- Select the CDROM1, click on the x icon to remove the file, and click on Apply.
- Follow the same steps for the CDROM2 as well.
How to enable the audio for windows11 in kvm?
That’s it, you have successfully installed the windows 11 operating system on a KVM environment.
How to start using windows 11 in KVM ?
To start the windows 11. Open terminal and type virt-viewer and choose windows 11 from the list and click on connect.
Note: the windows 11 machine should be powered on, for you to connect to the machine.
If you are unable to find the windows11 to connect,
- you may type
virsh list --all
- Check the status of windows11 machine.
- If it is in shut off state, you may power them on with the below command.
virsh start windows-11
You can learn more about useful KVM commands here.
The windows11 works perfectly fine with windows10 virtio drivers, and I have been using it for quite some time now, haven’t really had any issues with it. Since Windows 11 is not officially available for you to download, it will take some time for the qemu virtio driver to be made available for windows11. Anyways you should be good to go with the windows 10 virtio drivers.