Add standby / restore + fork support for Mac vz hypervisor#115
Merged
sjmiller609 merged 13 commits intomainfrom Mar 3, 2026
Merged
Add standby / restore + fork support for Mac vz hypervisor#115sjmiller609 merged 13 commits intomainfrom
sjmiller609 merged 13 commits intomainfrom
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Collaborator
Author
|
i'll try to implement fork in here too |
Two fixes for macOS development: 1. Wire cfg.Build.DockerSocket into builds.Config so the config file value (e.g. Colima socket path) is actually used instead of always falling back to /var/run/docker.sock. 2. Restore pre-PR#99 behavior of keeping the VM alive after the entrypoint exits by waiting on the guest-agent. PR#99 changed init to immediately power off the VM when the entrypoint exits, which breaks images like alpine:latest whose CMD is /bin/sh — the shell gets no stdin and exits instantly, killing the VM before anyone can `hm exec` into it. The guest-agent keeps the VM alive and accessible until an explicit stop/delete.
…int exits" This reverts commit 37272ca.
cfg.Build.DockerSocket was parsed from config.yaml but never passed to builds.Config, so the docker_socket setting was silently ignored and the build manager always fell back to /var/run/docker.sock.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Testing
Note
Medium Risk
Adds VZ snapshot save/restore and manifest-based restore/fork flows, touching VM lifecycle control paths and hypervisor abstractions. Main risk is snapshot/restore compatibility and path/identity rewrites causing restore failures, though changes are largely gated to
darwin/arm64and covered by new integration tests.Overview
Enables standby/restore on macOS VZ by teaching
vz-shimto save/restore VM machine state and persist a snapshot manifest (config.json+machine-state.vzm), including a stable platform machine identifier for restore compatibility.Extends the VZ hypervisor implementation to expose
Snapshot()andRestoreVM()(arm64-only capability), adds a shim/api/v1/vm.snapshotendpoint, updates VM state mapping for saving/restoring transitions, and introduces VZ snapshot-manifest rewriting so forking from standby/running works (with vsock socket naming registered viahypervisor.VsockSocketNameForType).Updates docs and CI/test harness: clarifies standby/restore semantics/requirements, adds macOS 14+/arm64 integration tests for VZ standby/restore and running-source fork, and makes Go test timeouts configurable via
GO_TEST_TIMEOUT.Written by Cursor Bugbot for commit d481c16. This will update automatically on new commits. Configure here.