Skip to content

Commit 592c098

Browse files
committed
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 <[email protected]> Run-TryBot: Alexander Rakoczy <[email protected]> TryBot-Result: Go Bot <[email protected]> Reviewed-by: Carlos Amedee <[email protected]>
1 parent 76eb641 commit 592c098

File tree

2 files changed

+73
-0
lines changed

2 files changed

+73
-0
lines changed
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
The Disk should be formatted with a case insensitive file system (default).
2+
3+
System Preferences > Software Update > off
4+
5+
System Preferences > Desktop & Screensaver > never screensaver
6+
7+
System Preferences > Energy Saver > never sleep
8+
9+
System Preferences > Energy Saver > start up automatically after power failure
10+
11+
System Preferences > Sharing > enable ssh (enable for administrators)
12+
13+
windows image:
14+
15+
gsutil cp gs://go-builder-data/windows-arm64.20210629.tar.xz ./windows-arm64.20210629.tar.xz
16+
scp windows-arm64.20210629.tar.xz your-macmini-instance:~/
17+
ssh your-macmini-instance
18+
# The following will create a directory called macmini-windows with image and qemu binaries inside:
19+
tar xf windows-arm64-20210629.tar.xz
20+
21+
Automator:
22+
23+
scp env/windows-arm64/macstadium/winloop.sh your-macmini-instance:~/macmini-windows/winloop.sh
24+
# On buildlet host:
25+
chmod u+x ~/macmini-windows/winloop.sh
26+
File > New > Application
27+
[+] Run shell script
28+
[ open -a Terminal.app $HOME/macmini-windows/winloop.sh ]
29+
Save to desktop as "run-builder"
30+
31+
System Preferences > Users & Groups > auto-login "gopher" user, run Desktop/run-builder (automator app)
32+
33+
passwordless sudo:
34+
35+
sudo visudo
36+
Change line from:
37+
%admin ALL=(ALL) ALL
38+
to:
39+
%admin ALL=(ALL) NOPASSWD: ALL
40+
41+
verbose boot: (text instead of apple image)
42+
43+
sudo nvram boot-args="-v"
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#!/bin/bash
2+
3+
while true; do
4+
DYLD_LIBRARY_PATH="$HOME/macmini-windows/sysroot-macos-arm64/lib" "$HOME/macmini-windows/sysroot-macos-arm64/bin/qemu-system-aarch64" \
5+
-L ./UTM.app/Contents/Resources/qemu \
6+
-device ramfb \
7+
-cpu max \
8+
-smp cpus=8,sockets=1,cores=8,threads=1 \
9+
-machine virt,highmem=off \
10+
-accel hvf \
11+
-accel tcg,tb-size=1536 \
12+
-boot menu=on \
13+
-m 8192 \
14+
-name "Virtual Machine" \
15+
-device qemu-xhci,id=usb-bus \
16+
-device usb-tablet,bus=usb-bus.0 \
17+
-device usb-mouse,bus=usb-bus.0 \
18+
-device usb-kbd,bus=usb-bus.0 \
19+
-bios "$HOME/macmini-windows/Images/QEMU_EFI.fd" \
20+
-device nvme,drive=drive0,serial=drive0,bootindex=0 \
21+
-drive "if=none,media=disk,id=drive0,file=$HOME/macmini-windows/Images/win10.qcow2,cache=writethrough" \
22+
-device usb-storage,drive=drive2,removable=true,bootindex=1 \
23+
-drive "if=none,media=cdrom,id=drive2,file=$HOME/macmini-windows/Images/virtio.iso,cache=writethrough" \
24+
-device virtio-net-pci,netdev=net0 \
25+
-netdev user,id=net0 \
26+
-uuid 41E1CBA2-8837-4224-801B-277336D58A3D \
27+
-snapshot \
28+
-vnc :3
29+
sleep 5
30+
done

0 commit comments

Comments
 (0)