To install Windows 11 on KVM you want to make sure that you have swtmp install and in your KVM environment. Like its name suggest is a software that emulates TPM 2.0 in your virtual environment.
You can do a quick check by running the following command.
You should see the following output. with the version of the swtpm.
TPM emulator version 0.6.3, Copyright (c) 2014-2021 IBM Corp.
You can install Windows 11 using the virt-install command line or use the virt-manager GUI which I will show in this tutorial.
- Open virt-manager and click on “Create a new virtual machine”.
- Select “Local install media (ISO image or CDROM)” and click “Forward”.
- Browse to the location of the Windows 11 ISO file and select it, then click “Forward”.
- Choose “Microsoft Windows 10” as the operating system type and “Windows 11” as the version, then click “Forward”. There is no option to select Windows 11 as of this tutorial.
- Give the virtual machine a name and specify the amount of memory and number of CPUs, then click “Forward”. Recommended to have at least 2GB RAM and 1 CPU (Slow) or 4GB RAM and 2 CPU for normal performance.
- Create a new virtual disk with the desired size and storage type, then click “Forward”. I would recommend 65GB.
- Give it a name and check the “Customized configuration before install” option before clicking “Finish”
- Click on “Add Hardware”, select “TPM” and choose 2.0 for the version you can leave the rest as default and click “Finish” on the Add New Virtual Hardware screen.
- On the “Overview” tab, for the BIOS Firmware choose the “UEFI x86” firmware and click “Apply”
- If you have the issue of keyboard not working with Spice Display change it to VNC.
- A new CD-ROM drive and add the virtio driver iso. You might need this to update the Network Driver later. Click Finish and Apply the changes.
- Once all that is done you can start Installation.
- You should be able to go through the Windows 11 installation wizard.
If you have not enable the TPM chip and UEFI BIOS you may not be able to install Windows 11.