diff options
author | Raghuram Subramani <raghus2247@gmail.com> | 2025-03-13 08:12:02 +0530 |
---|---|---|
committer | Raghuram Subramani <raghus2247@gmail.com> | 2025-03-13 08:12:02 +0530 |
commit | 706f41967e2671341b77a237acb5d2127d389c07 (patch) | |
tree | bd0f51f8d07900240dfe160b9c8d0e0fd3f67bee | |
parent | 3057d7e26d7e93d164e4ee8d52348cfb2ae35017 (diff) |
add build-windows.sh
-rwxr-xr-x | build-windows.sh | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/build-windows.sh b/build-windows.sh new file mode 100755 index 0000000..ed8bc74 --- /dev/null +++ b/build-windows.sh @@ -0,0 +1,31 @@ +#!/usr/bin/env bash + +if [ "$#" -ne 1 ]; then + echo "Usage: $0 [vm_name]" + exit +fi + +VM_NAME="$1" + +VIRTIO_WIN="isos/virtio-win*.iso" +WINDOWS="isos/Win11_24H2_English_x64.iso" + +if [ ! -f $VIRTIO_WIN ]; then + pushd imgs + aria2c https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/stable-virtio/virtio-win.iso + popd +fi + +sudo virt-install --import \ + --os-variant win11 \ + --name $VM_NAME \ + --ram 32768 \ + --cpu host-passthrough,cache.mode=passthrough \ + --vcpus 12,sockets=1,cores=6,threads=2 \ + --cdrom $WINDOWS \ + --disk path=imgs/$VM_NAME.img,format=raw,bus=virtio,size="256" \ + --video virtio \ + --graphics spice \ + --noautoconsole \ + --noreboot \ + --shmem name="looking-glass",model.type="ivshmem-plain",size=32,size.unit="M" |