Skip to content

feat: export, adopt, and forget Proxmox VM ownership - #168

Merged
astrojerms merged 2 commits into
mainfrom
feat/resource-migration
Oct 11, 2026
Merged

astrojerms merged 2 commits into
mainfrom
feat/resource-migration

Conversation

@astrojerms

Copy link
Copy Markdown
Owner

Behavior

  • Add administrator-only ctl export/adopt/forget commands and gRPC/HTTP APIs for standalone Proxmox VMs.
  • Transfer desired intent with a source-controller receipt, full manifest digest, and real node/VMID/SMBIOS UUID; configure credentials separately.
  • Adopt without applying, resizing, starting, deleting, or rerunning cloud-init. Preserve live drift and allow a later explicit Apply to converge it.
  • Release only source tracking and its disk projection. Durable release markers fence stale Apply/Delete/GitOps/action requests across restarts until explicit adoption.
  • Reject active operations, enabled GitOps watchers, composites, managed references, opaque state, ambiguous VM names, and invalid physical identities.
  • Support single YAML/CUE manifest adoption for existing unmanaged VMs; write bundles exclusively with mode 0600.
  • Document quiescing both controllers and completing the two-controller handoff without a SQLite backup.

Verification

  • Full root-module tests passed; race tests passed for migration-related CLI/controller/provider packages.
  • Separate Proxmox, k3s, and k8s module tests passed.
  • Actual signed CLI and two isolated controller processes exercised export/adopt/forget through gRPC and HTTPS against a local Proxmox simulator: identity mismatch rejection, context override, observed drift, busy-operation refusal, unrelated-VM retention, restart-persistent mutation fences, and retry behavior.
  • Migration issued zero provider writes. One explicit, held Apply served only as the busy-operation control scenario.
  • No real controllers, runner VMs, or dev VM were migrated or modified.

CI runner

Main already contains #167. Same-repository PRs and main pushes use the dedicated openctl-linux self-hosted runner; forks stay GitHub-hosted.

@astrojerms
astrojerms merged commit f94bcc9 into main Oct 11, 2026
6 checks passed
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.

1 participant