Windows 11 has more security requirements than previous versions of Windows. The main requirements are the use of a TPM 2.0 chip (TPM 2.0 can be enabled in your BIOS if you have current hardware) and Secure Boot. If you want to try Windows 11, you can install it as a virtual machine using virtualization software like QEMU in Linux and Mac. This article assumes you’ve installed QEMU and know how to setup a virtual machine with it.
QEMU Requirements
You’ll need to have QEMU 4.0 or higher installed to get TPM 2.0 emulation. The other hardware minimum requirements for Windows 11 include 4GB RAM and a 64GB hard drive.
You’ll need to download the Windows 11 ISO and mount it and go through the setup process.
Create your Windows 11 Virtual Machine Image
Since QEMU is command-based, the steps for this virtualization software are different than the others.
First you’ll need to create your virtual machine image and we’ll use a 64GB disk size since that’s the minimum requirement for Windows 11:
qemu-img create -f qcow2 win11.img 64G
Now you’ll need to attach the installation media ISO to the VM and we’ll use 4GB RAM since that’s the minimum for Windows 11:
qemu-system-x86_64 -hda ~/qemu-images/win11.img -boot d -cdrom ~/Downloads/win11.iso -m 4096 -enable-kvm
Enable TPM and Secure Boot in QEMU
Now you need to create a temp directory for the SWTPM simulator and create the socket in TPM2 mode to use with these commands:
mkdir /tmp/emulated_tpm swtpm socket --tpmstate dir=/tmp/emulated_tpm --ctrl type=unixio,path=/tmp/emulated_tpm/swtpm-sock --log level=20 --tpm2
Next, you’ll need to start your guest VM with the TPM options:
qemu-system-x86_64 -hda ~/qemu-images/win11.img -boot d -m 4096 -enable-kvm \ -chardev socket,id=chrtpm,path=/tmp/emulated_tpm/swtpm-sock \ -tpmdev emulator,id=tpm0,chardev=chrtpm -device tpm-tis,tpmdev=tpm0
This should complete the steps needed to add the hardware requirements for Windows 11 to be able to install it as a virtual machine in QEMU.
Microsoft now offers a way to Bypass TPM 2.0 and CPU Requirements to Install Windows 11 if you currently have Windows 10 in your virtual machine and want to upgrade it to Windows 11.
And libvirt, TPM emulated:
You might need to iinstall the packages swtpm (the emulator) and swtpm-tool (set of tools that allow libvirt to interact witht the emulator
I got it working using Virt Machine Manager, but needed a few extra steps.
– swtpm is not available in the repos yet, so get the source and build the .deb packages here: https://github.com/stefanberger/swtpm Follow the instructions in the wiki.
– Win 11 also requires UEFI, which this guide doesn’t seem to configure. In Virt Machine Manager, select UEFI x86_64 as the Firmware in the machine overview before you try to install Win11.
I also found that Virt Machine Manager handles the TPM creation process for you now, so you don’t need to run swtpm socket yourself anymore. Just add the TPM as an emulated device in the VM configuration interface before starting the Win 11 VM.
Hmm and how make same thing on Windows host?
How to make same thing on Windows host..?