Repository navigation
Clone a VM from a template with per-clone cloud-init - #14
Merged
Merged
Conversation
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.
Templates increment B: create a VM by cloning a declared template, applying
per-clone cloud-init. A single golden template now produces many VMs.
Manifest
fromTemplateon VirtualMachine, a scalar name (full clone) or an object withlinked: true. Mutually exclusive withimage; cloud-init is allowed and is thepoint of cloning.
Behaviour
Templatemanifests;an undeclared name is a clear error.
(no racing the build).
Clone(full/linked) then finish the VM (cloud-init drive,cores/memory/cpu overrides, resize, start).
built (VMID owned by a declared Template is skipped).
Verification
half-built-template protection, linked clone, undeclared error, no re-clone.
then app-clone cloned from it with cloud-init (user/ip/nameserver), resized, and
started. The two ordering/ownership bugs above were found and fixed during this
live run.
golangci-lint (v2), gofmt, Go + vitest suites all green.
Next
Container (LXC) apply; guest disk/NIC drift.