1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# -*- mode: ruby -*-
# vi: set ft=ruby :
#
# devvm guest: linux-x64 — for cgroup v2 lanes, cross-arch-emulated (TCG) on an Apple
# Silicon host, natively virtualized (KVM/HVF) on an x86-64 host.
#
# Not meant to be run directly with `vagrant up` in this directory — use
# `scripts/devvm.py up linux-x64`, which sets VAGRANT_DOTFILE_PATH and DEVVM_STAGE_DIR so
# all state lands under .tmp/devvm/ in the worktree, never in the box's own directory.
#
# Box: generic/ubuntu2204, provider qemu, version pinned below. Built by roboxes/generic;
# Ubuntu 22.04's systemd (249) defaults to the unified cgroup v2 hierarchy.
= ENV.fetch()
Vagrant.configure() do
config.vm.box =
config.vm.box_version =
# Amd64-only box: without this, Vagrant's architecture auto-detection on an Apple Silicon
# host silently excludes it from "usable providers" and `up` fails with a misleading "box
# doesn't support requested provider" error, even though the box does publish a qemu
# provider — it's just for the wrong (host) architecture unless told otherwise. Harmless
# (a no-op match) on an actual x86-64 host.
config.vm.box_architecture =
config.vm.hostname =
config.vm.provider do
qe.arch =
qe.memory =
qe.smp =
# This host may already have unrelated VMs (this tool's or not) holding the default
# forwarded port; let Vagrant pick a free one instead of failing `up`.
qe.ssh_auto_correct = true
end
# Vagrant's own default /vagrant synced folder would otherwise fall back to SMB on macOS,
# which prompts for a one-time System Settings -> Sharing -> File Sharing toggle and a
# password on every mount. Not used here; disable it outright.
config.vm.synced_folder , , disabled: true
# A one-shot rsync push, not a live mount: the guest cannot write back into the host's
# source tree. Source is `devvm.py`'s staged, git-tracked-only copy (see stage_tree() in
# scripts/devvm.py) rather than REPO_ROOT directly, so untracked files never leak into the
# guest. Files land read-only (F444); directories stay writable (D755) so later
# `devvm.py sync` runs can still add/remove/replace files.
config.vm.synced_folder STAGE_DIR, ,
type: ,
rsync__args: [, , ]
config.vm.provision , path: , privileged: false
# Marks this machine as a devvm guest, which `.github/scripts/unattended-gui-elevation.py` requires before
# it weakens a machine's security. It lives here, in the guest's own provisioner, not in the reusable
# provisioning script, which could be run on a host.
config.vm.provision , privileged: true, inline:
end