From a6aff1775d0041bef072ab63ac878e5d83a60b2a Mon Sep 17 00:00:00 2001 From: turtlebasket Date: Fri, 27 Oct 2023 10:22:20 -0700 Subject: [PATCH] update setup & run scripts --- thonkpad/nixhost/grun.sh | 1 - thonkpad/nixhost/run.sh | 1 - thonkpad/winhost/grun.sh | 12 ++++++++++++ thonkpad/winhost/run.sh | 12 ++++++++++++ thonkpad/winhost/setup.sh | 34 ++++++++++++++++++++++++++++++++++ 5 files changed, 58 insertions(+), 2 deletions(-) create mode 100755 thonkpad/winhost/grun.sh create mode 100755 thonkpad/winhost/run.sh create mode 100755 thonkpad/winhost/setup.sh diff --git a/thonkpad/nixhost/grun.sh b/thonkpad/nixhost/grun.sh index 7e8bd69..24fa0dc 100755 --- a/thonkpad/nixhost/grun.sh +++ b/thonkpad/nixhost/grun.sh @@ -2,7 +2,6 @@ # Graphical runner for desktop -ISO=nixos DRIVENAME=nixhost MEM_GB=1 diff --git a/thonkpad/nixhost/run.sh b/thonkpad/nixhost/run.sh index 7e321a3..4aa416c 100755 --- a/thonkpad/nixhost/run.sh +++ b/thonkpad/nixhost/run.sh @@ -1,6 +1,5 @@ #!/bin/bash -ISO=nixos DRIVENAME=nixhost MEM_GB=1 SSH_PORT=2022 diff --git a/thonkpad/winhost/grun.sh b/thonkpad/winhost/grun.sh new file mode 100755 index 0000000..6985ceb --- /dev/null +++ b/thonkpad/winhost/grun.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +# Graphical runner for desktop + +ISO=windows +DRIVENAME=winhost +MEM_GB=8 + +qemu-system-x86_64 -enable-kvm \ + -m $(expr 1024 \* $MEM_GB) -drive file=./$DRIVENAME.qcow2,format=qcow2 \ + -smp cores=2,threads=4 -vga virtio + diff --git a/thonkpad/winhost/run.sh b/thonkpad/winhost/run.sh new file mode 100755 index 0000000..907f718 --- /dev/null +++ b/thonkpad/winhost/run.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +# Headless runner + +ISO=windows +DRIVENAME=winhost +MEM_GB=8 + +qemu-system-x86_64 -enable-kvm \ + -m $(expr 1024 \* $MEM_GB) -drive file=./$DRIVENAME.qcow2,format=qcow2 \ + -smp cores=2,threads=4 -nographic + diff --git a/thonkpad/winhost/setup.sh b/thonkpad/winhost/setup.sh new file mode 100755 index 0000000..f0b4b75 --- /dev/null +++ b/thonkpad/winhost/setup.sh @@ -0,0 +1,34 @@ +#!/bin/bash + +# Boots into windows setup + +ISO=windows +DRIVENAME=winhost +DRIVE_GB=80 +MEM_GB=4 + +if [ -f $ISO.iso ]; then + echo "Found $ISO.iso" +else + echo "Access Windows download at" + echo "https://www.microsoft.com/en-us/software-download/windows10ISO?4cd9df4f-deef-4431-9497-a04303f34986=True" + echo "" + echo "Paste authorized download URL: " + + read DL_LINK + wget -O $ISO.iso $DL_LINK +fi + +if [ -f $DRIVENAME.qcow2 ]; then + echo "Found $DRIVENAME.qcow2." +else + qemu-img create -f qcow2 $DRIVENAME.qcow2 ${DRIVE_GB}G +fi + +# qemu-system-x86_64 -enable-kvm -display curses -nographic -cdrom $ISO.iso \ +# -m $(expr 1024 \* $MEM_GB) -drive file=./$DRIVENAME.qcow2,format=qcow2 + +qemu-system-x86_64 -enable-kvm -cdrom $ISO.iso -drive file=./$DRIVENAME.qcow2,format=qcow2 \ + -m $(expr 1024 \* $MEM_GB) -smp cores=2,threads=4 \ + -boot order=dc -vga virtio +