Monday, November 20, 2023

Install Windows 11 on Virt-Manager

 Virt-Manager will have been installed in base install.  But to enable it (make sure SVM, or whatever virtualization is called in your BIOS is enabled).

From https://computingforgeeks.com/install-kvm-qemu-virt-manager-arch-manjar/

sudo pacman -S qemu-full virt-manager virt-viewer dnsmasq vde2 bridge-utils openbsd-netcat dmidecode iptables libguestfs edk2-ovmf swtpm

Then enable and start libritd.service

sudo systemctl enable libvirtd.service
sudo systemctl start libvirtd.service

sudo micro /etc/libvirt/libvirtd.conf

Set the UNIX domain socket group ownership to libvirt, (around line 85)

unix_sock_group = "libvirt"

Set the UNIX socket permissions for the R/W socket (around line 102)

unix_sock_rw_perms = "0770"

Add your user account to libvirt group. 

sudo usermod -a -G libvirt $(whoami)

newgrp libvirt

Restart libvirt daemon.

sudo systemctl restart libvirtd.service

Section below is quoted directly from https://linustechtips.com/topic/1379063-windows-11-in-virt-manager/

Prerequisites:

Before starting, you need the following:

  • Windows 11 .iso from Microsoft [link]
  • OVMF - you need this for UEFI/secureboot. I used edk2-ovmf from the arch official repos.
  • SWTPM - you need this for TPM emulation. Again, i used swtpm from the arch repos.
  • qemu & virt-manager - if you don't already have these installed, they'll be in your distro's repo, more than likely.
  • virtio - once you have your VM set up, mount the latest image from here to install virtio drivers for things like networking [link]

Getting started:

In Virtual Machine Manager, create a new VM from the top-left corner.

For step 1, choose local install media.

For step 2, pick your Windows 11 iso. if it's not in the drop-down, choose it by clicking "Browse... > Browse local". It'll auto-detect the OS as Windows 10, this is fine.

For step 3, set your memory and CPU cores. the default (4gb & 2 cores) are the minimum for W11, so I set my RAM to 8gb, but you can always change these values later.

For step 4, make a virtual disk image. The minimum drive size for Windows 11 is 64gb, so it needs to be at least that big.

For step 5, choose your VM name, and then tick off Customize configuration before install.

Final setup:

RECENTLY I HAVEN'T DONE THIS (JUST LEAVE UEFI): In the overview section, set Firmware to UEFI x86_64: /....../OVMF_CODE.secboot.fd. It has to be secure boot, otherwise Windows 11 won't install. While I was looking into this, I saw some things saying OVMF_CODE.ms.fd instead, if your list has that, that should work as well.

image.png.b7594cea636a33080822ac120445ebfe.png

In boot options, tick off your virtual CD-ROM drive, and then set that as the highest boot priority:

image.png.bffb43d1cbd3d08b155e11186de4fe3d.png -> image.png.b170a4e96c4aba2b62d414defe07627d.png

 

Change video to Virtio

Finally, add a virtual TPM module. the defaults (CRB, Emulated, 2.0) should be fine. 

 

You shouldn't have to manually start the virtual network service, but if you do it's  sudo virsh net-autostart default


if no internet:

sudo systemctl start iptables.service
sudo systemctl enable iptables.service
sudo systemctl restart libvirtd.service

sudo nano /etc/libvirt/network.conf

write the following:
firewall_backend = "iptables"

https://bbs.archlinux.org/viewtopic.php?id=296590

No comments:

Post a Comment

RTL-SDR On Opensuse Tumbleweed

Notes on setting up RTL-SDR V4 in Opensuse Tumbleweed: opi sdrpp sudo zypper in rtl-sdr sudo usermod -a -G rtlsdr $(whoami)  #then logout an...