Windows Server 2022 Install Into Qemu With Virtio Drivers

00:00:55 Checking the setup of the hugepages.
00:03:05 Downloading the virtio installer iso.
00:05:40 Running the virtual machine.
00:06:20 Adding the virtio storage driver to the installer.
00:10:15 Adding the rest of the virtio drivers the easy way.

In this video I am showing how to install Windows Server 2022 onto Qemu and I am also adding the virtio drivers, so that the Windows can run at the best performance possible. I have also updated the command line with as many of the enlightenments that my version of Qmu and kernel could support, but there are some others that were giving me an error, so I obviously could not include them. I was also able to show the installation in real time, because of how fast it was performing. I have included the commands and link to the virtio drivers below, but you can also get them from the article on my website, in case YouTube messes up the formatting of them.

qemu-system-x86_64 -m 32768 -M q35 -smp cores=4,threads=2,sockets=1 -enable-kvm -cpu host,hv_relaxed,hv_vpindex,hv_time,hv-vapic,hv_spinlocks=0x1fff,hv-runtime,hv-synic,hv-stimer,hv-frequencies,hv-reset,hv-tlbflush,+kvm_pv_unhalt,hv-reenlightenment,hv-evmcs,hv-stimer-direct -net nic,model=virtio-net-pci,macaddr=72:34:fa:2a:52:b5 -net bridge,br=br0 -readconfig /etc/ich9-ehci-uhci.config -device usb-tablet,bus=ehci.0,port=2 -drive file=server-2022_virtio.qcow2,if=virtio -vga qxl -global qxl-vga.vgamem_mb=32 -object rng-builtin,id=obj0 -device virtio-rng-pci,rng=obj0,id=rng0 -rtc base=localtime,driftfix=none -chardev socket,path=/tmp/qga.sock,server=on,wait=off,id=qga0 -device virtio-serial -device virtserialport,chardev=qga0,name=org.qemu.guest_agent.0 -device virtio-balloon-pci,id=balloon0 -mem-prealloc -mem-path /dev/hugepages -drive file=/big/qemu/virtio-win.iso,media=cdrom,index=3 -cdrom

qemu-img create -f qcow2 -o lazy_refcounts=on,cluster_size=256K,preallocation=metadata server-2022_virtio.qcow2 100G

https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/stable-virtio/

echo 24576 > /proc/sys/vm/nr_hugepages
cat /proc/sys/vm/nr_hugepages
cat /proc/meminfo | grep Huge