microsoft_windows:win11:virtual
Table of Contents
Install Windows 11 Virtual
This entire article is a summation of https://manuelcortez.net/2023/12/creating-vm-windows11-libvirt/ which you should read for instructions on installing a Windows 11 virtual under libvirt. This summary is simply a set of instructions, a summary of that article.
Initial
Install tpm software module
apt install ovmf swptm swtpm-tools # fix a permissions issue on Debian 12 chown -R tss /var/lib/swtpm-localca
Create the installer command (modify for your configuration)
virt-install \ --name windows11-vm \ --cdrom /var/lib/libvirt/iso/win11-22h2.iso \ --os-variant=win11 \ --network network=bridged-network,model=virtio \ --disk size=50,cache=none,bus=virtio \ --disk path=/var/lib/libvirt/iso/virtio-win.iso,device=cdrom \ --memory 4096 \ --sound default \ --graphics spice,listen=0.0.0.0 \ --vcpu 4 --video qxl \ --noautoconsole \ --features kvm_hidden=on,smm=on \ --tpm backend.type=emulator,backend.version=2.0,model=tpm-tis \ --boot loader=/usr/share/OVMF/OVMF_CODE.secboot.fd,loader_ro=yes,loader_type=pflash,nvram_template=/usr/share/OVMF/OVMF_VARS.ms.fd
Install
Run the above command. It may stop, in which case, you need to edit the config file
virsh edit domainname
- Look in <os> for <loader>. Add secure='yes'
- Find and delete the <boot> element
- Find hard drive, add <boot order='2'/>
- Find CDROM for Windows 11, add <boot order='1'>
- save and exit, then start the virtual
During installation
- Use “load drive” when it can not find the hard disk, locate virtio-win cd, go into AMD64/W11 and select. Wait for drivers to be loaded
- Windows will ask to restart. Kill with destroy command and again edit domain config
- change boot order of disk to 1, and cdrom to 2
- start domain and finish install (no network)
- When done, install the rest of the virtio drivers to get network access
microsoft_windows/win11/virtual.txt · Last modified: 2025/01/18 15:30 by rodolico