tailscale/gokrazy/Makefile
Brad Fitzpatrick ef69d2041b tstest/natlab/vmtest: add macOS VM support and TestMacOSAndLinuxCanPing
Add macOS VM support to the vmtest integration test framework using
tailmac (Apple Virtualization.framework). The new TestMacOSAndLinuxCanPing
creates a LAN with a Gokrazy arm64 Linux VM (QEMU/HVF) and a macOS VM
(tailmac) and verifies they can ping each other over vnet.

Key changes:

vmtest framework (tstest/natlab/vmtest/):
- Add MacOS OSImage type with IsMacOS field
- Add NoAgent node option for VMs without TTA
- Add LANPing method using TTA's /ping endpoint with retries
- Add --macos-vm-id flag for specifying the base macOS VM
- Set up Unix datagram socket for macOS VMs (ProtocolUnixDGRAM)
- Add tailmac.go for macOS VM clone/configure/launch lifecycle
- Support arm64 QEMU with HVF on macOS hosts (virt machine type)
- Use /tmp for socket paths to avoid 104-byte sun_path limit

tailmac (tstest/tailmac/):
- Add --headless flag to Host.app for GUI-less VM operation
- Use RunLoop.main.run() instead of dispatchMain() (VZ framework
  requires the RunLoop for start/restore callbacks)
- Single-NIC mode in headless (matches llmacstation VM config)
- Add socketpair relay between VZ and the vnet dgram socket
- Fix dispatchMain() bug in tailmac CLI's create command too

gokrazy arm64:
- Add natlab-arm64 Makefile target
- Add gokrazydeps.go for github.com/gokrazy/kernel.arm64
- Add kernel.arm64 dependency to go.mod

The test requires: macOS arm64 host, qemu-system-aarch64, a pre-built
macOS VM (--macos-vm-id flag), and tailmac Host.app built.
2026-04-10 06:43:21 -07:00

19 lines
547 B
Makefile

help:
echo "See Makefile"
image:
go run build.go --build
qemu: image
qemu-system-x86_64 -m 1G -drive file=tsapp.img,format=raw -boot d -netdev user,id=user.0 -device virtio-net-pci,netdev=user.0 -serial mon:stdio -audio none
# For natlab integration tests:
natlab:
go run build.go --build --app=natlabapp
qemu-img convert -O qcow2 natlabapp.img natlabapp.qcow2
# For natlab integration tests on macOS arm64:
natlab-arm64:
go run build.go --build --app=natlabapp.arm64
qemu-img convert -O qcow2 natlabapp.arm64.img natlabapp.arm64.qcow2