FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

feat: support resizable macOS system disks by czmDeRepository · Pull Request #33 · cocoonstack/cocoon-macos · GitHub

feat: support resizable macOS system disks - #33

Merged
CMGS merged 2 commits into
cocoonstack:masterfrom
czmDeRepository:codex/macos-resizable-system-disk
Aug 30, 2026
Merged

feat: support resizable macOS system disks#33
CMGS merged 2 commits into
cocoonstack:masterfrom
czmDeRepository:codex/macos-resizable-system-disk

Conversation

Copy link
Copy Markdown
Contributor

What changed

  • add --storage to macOS VM create/run/clone
  • grow a newly created qcow2 overlay before boot and reject unsafe shrinking
  • persist the resulting virtual disk size in the VM record
  • install an idempotent first-boot LaunchDaemon that expands the root APFS container into newly available space

Why

Cloud images currently impose their original virtual disk size on every VM. Supporting safe growth makes one image reusable across multiple storage specifications without rebuilding the image.

Semantics

  • omitted storage keeps the image virtual size
  • clone inherits the source size unless explicitly overridden
  • requested size may grow but never shrink the image

Validation

  • GOWORK=off go test ./...
  • make fmt-check vet lint
  • bash -n scripts/provision-macos.sh

CMGS left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

useful feature and the core is right — resizeSystemDisk reuses cocoon's ReadQcow2Header + RunQemuImg, grow-only with a clear reject, and the record carries the size for clone inheritance. gates green incl asl (both GOOS), tests, gofmt.

two cleanups + one nit inline. also, non-blocking: the APFS grow daemon runs diskutil repairDisk on the whole disk (with a piped y) every boot that has free space — a heavy hammer to refresh the GPT; fine functionally, just flagging it since it's the one destructive-looking op on the boot path.

Comment thread cmd/vm/utils.go
Comment thread cmd/vm/utils.go Outdated
Comment thread cmd/vm/handler.go Outdated

CMGS left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

one parseSize for storage + data disks (Gi normalized to GiB — cleaner than the strip), omitempty in, label renamed to com.cocoon.*, comment one-lined. gates green on 5da3de4 (lint 0/0, asl clean, tests). lgtm. same merge-log note as #32: the APFS grow daemon needs one rebuilt-image boot check with --storage before tag promotion.

czmDeRepository changed the title [codex] feat: support resizable macOS system disks feat: support resizable macOS system disks Aug 30, 2026
CMGS force-pushed the codex/macos-resizable-system-disk branch from 5da3de4 to 7617dd3 Compare August 30, 2026 08:27
CMGS marked this pull request as ready for review August 30, 2026 08:27
CMGS force-pushed the codex/macos-resizable-system-disk branch from 7617dd3 to 69dabda Compare August 30, 2026 08:30
CMGS merged commit ad8eabf into cocoonstack:master Aug 30, 2026
3 checks passed
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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL