Conversation
Adds an alpha-stage `--overlayfs` boolean flag to `replicated vm create` that opts a VM into the new overlayfs-backed rootfs primitive. The flag is hidden from `--help` and gated server-side by the `cmx_overlayfs` feature flag (vandoor#9598); behavior is unchanged when the flag is omitted. Refs: sc-135055 Companions: replicatedhq/reliability-matrix#2064, replicatedhq/vandoor#9598
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.
Reviewed by Cursor Bugbot for commit 558f20a. Configure here.
testify's `require.NoError` calls t.FailNow(), which calls runtime.Goexit(). Per testing.T docs, FailNow is only safe from the test goroutine — calling it from the httptest server handler goroutine can hang or panic instead of failing cleanly. Capture errors into a variable inside the handler and assert from the test goroutine after the request completes.
mikhailswift
approved these changes
Apr 27, 2026
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
--overlayfsboolean flag toreplicated vm createthat opts a VM into the new overlayfs-backed rootfs primitive.runnerArgs→kotsclient.CreateVMOpts→ JSON"overlayfs"field onPOST /v3/vm.omitemptykeeps the existing wire format identical for users who don't pass the flag).cmx_overlayfsteam feature flag; the underlying provisioner work is in reliability-matrix#2064.Visibility
MarkHidden("overlayfs"), mirroring the precedent set by--rbac-policy-name.(alpha).cmd.Exampleblock.Refs: sc-135055
Test plan
go test ./cli/cmd/... ./pkg/kotsclient/... -count=1— all passgo vet ./...— cleanTestCreateVM_OverlayFSRequestBody) useshttptest.Serverto assert the wire format:"overlayfs": trueis sent when the field is set, and the field is absent when not (covers theomitemptyinvariant)vm create --help | grep overlayfsreturns empty (flag is hidden)vm create --overlayfs <...>is accepted by cobra (no "unknown flag" error)