Skip to content

Commit f56b05d

Browse files
ibigbugCopilot
andcommitted
fix: complete Lima networks.yaml with all required paths
The socketVMNet ownership check now passes (/opt/socket_vmnet works). New failure: varRun resolved to '.' because Lima doesn't merge user networks.yaml with system defaults — unspecified fields go to Go zero values (''), which resolve to the current directory. Include all three paths fields explicitly: socketVMNet: /opt/socket_vmnet/bin/socket_vmnet varRun: /private/var/run/lima sudoers: /private/etc/sudoers.d/lima Also install the sudoers file to /private/etc/sudoers.d/lima to match. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 64d6595 commit f56b05d

1 file changed

Lines changed: 11 additions & 4 deletions

File tree

.github/workflows/coverage.yml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,20 @@ jobs:
5858
/opt/socket_vmnet/bin/socket_vmnet
5959
6060
# Override Lima's networks.yaml to point at the root-owned copy.
61+
# Must include ALL paths fields — Lima doesn't merge with system defaults,
62+
# unspecified fields become zero values (varRun="" → resolved to ".").
6163
mkdir -p ~/.lima/_config
62-
printf 'paths:\n socketVMNet: /opt/socket_vmnet/bin/socket_vmnet\n' \
63-
> ~/.lima/_config/networks.yaml
64+
cat > ~/.lima/_config/networks.yaml << 'EOF'
65+
paths:
66+
socketVMNet: /opt/socket_vmnet/bin/socket_vmnet
67+
varRun: /private/var/run/lima
68+
sudoers: /private/etc/sudoers.d/lima
69+
EOF
6470

6571
# Generate a sudoers snippet so Lima can run socket_vmnet as root
66-
# without a password prompt.
67-
limactl sudoers | sudo tee /etc/sudoers.d/lima > /dev/null
72+
# without a password prompt. Install to the path declared in networks.yaml.
73+
sudo mkdir -p /private/etc/sudoers.d
74+
limactl sudoers | sudo tee /private/etc/sudoers.d/lima > /dev/null
6875

6976
# --network-address assigns a vmnet-host IP (e.g. 192.168.105.x) that is
7077
# routable from macOS for both TCP *and* UDP — unlike SLIRP which only

0 commit comments

Comments
 (0)