KVM : Enable TPM 2.02021/11/10 |
Create a Virtual Machine with enabling TPM 2.0.
This example shows to install Windows 11. |
|
[1] | Install required packages. |
[root@dlp ~]# dnf -y install edk2-ovmf swtpm swtpm-tools
|
[2] | Create a Windows 11 Virtual Machine. Enable TPM 2.0 and ScureBoot for installing Windows 11. |
[root@dlp ~]# virt-install \
--name Windows_11 \
--ram 6144 \
--disk path=/var/kvm/images/Windows_11.img,size=80 \
--cpu host-passthrough \
--vcpus=4 \
--os-variant=win10 \
--network bridge=br0 \
--graphics vnc,listen=0.0.0.0,password=password \
--video virtio \
--cdrom /home/Win11_English_x64.iso \
--features kvm_hidden=on,smm=on \
--tpm backend.type=emulator,backend.version=2.0,model=tpm-tis \
--boot loader=/usr/share/edk2/ovmf/OVMF_CODE.secboot.fd,loader_ro=yes,loader_type=pflash,nvram_template=/usr/share/edk2/ovmf/OVMF_VARS.secboot.fd
|
[3] | After starting VM, if following screen is shown, select [Boot Manager]. |
[4] | Select [UEFI QEMU DVD-ROM]. |
[5] | Windows 11 installer starts. |
[6] | Installation finished and Windows 11 is running. |
Sponsored Link |