-
Notifications
You must be signed in to change notification settings - Fork 155
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
env/windows-arm64/macstadium: add image notes and qemu script
Add barebones instructions for creating a macmini instance that runs a Windows ARM64 buildlet in a loop. The instruction templates are from our other macstadium builders. See golang/go#47018 for improvements. Updates golang/go#47018 Fixes golang/go#42604 Change-Id: I0bb092aaf99afb12a0e563a69bcb711333dda743 Reviewed-on: https://go-review.googlesource.com/c/build/+/332492 Trust: Alexander Rakoczy <alex@golang.org> Run-TryBot: Alexander Rakoczy <alex@golang.org> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Carlos Amedee <carlos@golang.org>
- Loading branch information
Showing
2 changed files
with
73 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
The Disk should be formatted with a case insensitive file system (default). | ||
|
||
System Preferences > Software Update > off | ||
|
||
System Preferences > Desktop & Screensaver > never screensaver | ||
|
||
System Preferences > Energy Saver > never sleep | ||
|
||
System Preferences > Energy Saver > start up automatically after power failure | ||
|
||
System Preferences > Sharing > enable ssh (enable for administrators) | ||
|
||
windows image: | ||
|
||
gsutil cp gs://go-builder-data/windows-arm64.20210629.tar.xz ./windows-arm64.20210629.tar.xz | ||
scp windows-arm64.20210629.tar.xz your-macmini-instance:~/ | ||
ssh your-macmini-instance | ||
# The following will create a directory called macmini-windows with image and qemu binaries inside: | ||
tar xf windows-arm64-20210629.tar.xz | ||
|
||
Automator: | ||
|
||
scp env/windows-arm64/macstadium/winloop.sh your-macmini-instance:~/macmini-windows/winloop.sh | ||
# On buildlet host: | ||
chmod u+x ~/macmini-windows/winloop.sh | ||
File > New > Application | ||
[+] Run shell script | ||
[ open -a Terminal.app $HOME/macmini-windows/winloop.sh ] | ||
Save to desktop as "run-builder" | ||
|
||
System Preferences > Users & Groups > auto-login "gopher" user, run Desktop/run-builder (automator app) | ||
|
||
passwordless sudo: | ||
|
||
sudo visudo | ||
Change line from: | ||
%admin ALL=(ALL) ALL | ||
to: | ||
%admin ALL=(ALL) NOPASSWD: ALL | ||
|
||
verbose boot: (text instead of apple image) | ||
|
||
sudo nvram boot-args="-v" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/bin/bash | ||
|
||
while true; do | ||
DYLD_LIBRARY_PATH="$HOME/macmini-windows/sysroot-macos-arm64/lib" "$HOME/macmini-windows/sysroot-macos-arm64/bin/qemu-system-aarch64" \ | ||
-L ./UTM.app/Contents/Resources/qemu \ | ||
-device ramfb \ | ||
-cpu max \ | ||
-smp cpus=8,sockets=1,cores=8,threads=1 \ | ||
-machine virt,highmem=off \ | ||
-accel hvf \ | ||
-accel tcg,tb-size=1536 \ | ||
-boot menu=on \ | ||
-m 8192 \ | ||
-name "Virtual Machine" \ | ||
-device qemu-xhci,id=usb-bus \ | ||
-device usb-tablet,bus=usb-bus.0 \ | ||
-device usb-mouse,bus=usb-bus.0 \ | ||
-device usb-kbd,bus=usb-bus.0 \ | ||
-bios "$HOME/macmini-windows/Images/QEMU_EFI.fd" \ | ||
-device nvme,drive=drive0,serial=drive0,bootindex=0 \ | ||
-drive "if=none,media=disk,id=drive0,file=$HOME/macmini-windows/Images/win10.qcow2,cache=writethrough" \ | ||
-device usb-storage,drive=drive2,removable=true,bootindex=1 \ | ||
-drive "if=none,media=cdrom,id=drive2,file=$HOME/macmini-windows/Images/virtio.iso,cache=writethrough" \ | ||
-device virtio-net-pci,netdev=net0 \ | ||
-netdev user,id=net0 \ | ||
-uuid 41E1CBA2-8837-4224-801B-277336D58A3D \ | ||
-snapshot \ | ||
-vnc :3 | ||
sleep 5 | ||
done |