update setup & run scripts

master
michael 2023-10-27 10:22:20 -07:00
parent bae1555f87
commit a6aff1775d
5 changed files with 58 additions and 2 deletions

View File

@ -2,7 +2,6 @@
# Graphical runner for desktop # Graphical runner for desktop
ISO=nixos
DRIVENAME=nixhost DRIVENAME=nixhost
MEM_GB=1 MEM_GB=1

View File

@ -1,6 +1,5 @@
#!/bin/bash #!/bin/bash
ISO=nixos
DRIVENAME=nixhost DRIVENAME=nixhost
MEM_GB=1 MEM_GB=1
SSH_PORT=2022 SSH_PORT=2022

12
thonkpad/winhost/grun.sh Executable file
View File

@ -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

12
thonkpad/winhost/run.sh Executable file
View File

@ -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

34
thonkpad/winhost/setup.sh Executable file
View File

@ -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