feat: enable virtio-mem for firecracker - #216
Draft
RuoqingHe wants to merge 6 commits into
Draft
Conversation
Add firecracker virtio-mem geometry and resize policy. Alignment, ranges, and Firecracker integer boundaries validated. Signed-off-by: Ruoqing He <ruoqing.he@moonshot.ai>
Add virtio-mem device geometry and requested size to Firecracker state. The device should be applied before fresh boot and validate it during restore. Signed-off-by: Ruoqing He <ruoqing.he@moonshot.ai>
Add validated PUT, PATCH, and GET operations for virtio-mem. Expose requested and plugged status for convergence polling. Signed-off-by: Ruoqing He <ruoqing.he@moonshot.ai>
Add sandbox resize operations with convergence and deadlines. Serialized resizing with snapshot capture and retain rollback evidence. Exposed backend resize results to lifecycle callers. Signed-off-by: Ruoqing He <ruoqing.he@moonshot.ai>
Define memory resize and status endpoints in the OpenAPI schema. Describe target, observed, convergence, timeout, and unsupported states. Signed-off-by: Ruoqing He <ruoqing.he@moonshot.ai>
Generate request, response, client, and server bindings for memory resize with command `cargo adev generate server`. Keep generated API types aligned with the OpenAPI contract. Signed-off-by: Ruoqing He <ruoqing.he@moonshot.ai>
RuoqingHe
force-pushed
the
enable-virtio-mem-for-fc
branch
from
August 26, 2026 12:01
d648124 to
8fa8e89
Compare
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.
What
Add hard virtio-mem memory resize support to Firecracker-backed AgentENV
sandboxes.
Why
AgentENV currently treats sandbox memory as fixed after boot. Firecracker
supports virtio-mem, but AgentENV does not expose a validated or
lifecycle-aware way to grow and shrink guest memory.
Related issue
Scope and non-goals
Included:
Design and behavior changes
Public API
The PR adds:
GET /sandboxes/{sandboxId}/memoryPATCH /sandboxes/{sandboxId}/memoryResponses distinguish:
Compatibility and operations
Validation
make fmtmake clippymake test-unitmake -C services test(required whenservices/changes)maketargetCommands and results:
Skipped checks and reasons:
Risks and reviewer notes
Checklist