feat: export and push cloud images to OCI - #198
Conversation
Change-Id: I5af4c00ff44126853cb4d67c71fe0ce6b904ab24
Change-Id: Ie4aa820df2f1ab1d6d760bff423a038d77e10e62
Change-Id: Icc50f1e7a30f312c9034d78c9dcf382a3b9ac203
57af539 to
4acc734
Compare
Change-Id: I8b2b168cb6a4f072e54bb3d36e1136f926adcf86
Change-Id: I574397ec1ff22efe2966fa1c8d146c6db29b4e0b
|
thanks for the work here, but we're not taking this direction. two reasons. layer boundaries: registry push is the orchestrator's job in our stack. whoever consumes a snapshot pushes it, cocoon stays digest self contained and only pulls. pulling belongs here because clone has to materialize images on the node, pushing doesn't serve any cocoon operation. don't duplicate existing mechanisms: vm export is a strict subset of what snapshot save/export/import/clone already covers (no memory state, no data disks, cloudimg only), and building goldens goes through snapshots too. images export has no consumer, images enter the store via pull or import so the source always exists on the producing side already. if you hit a concrete workflow the snapshot family doesn't cover, please open an issue describing it first so we can discuss where the mechanism belongs. |
|
btw for the transfer use case you don't need new code at all. cocoon snapshot export gives you a portable archive, and oras can push that to any registry as an artifact (oras push reg/repo:tag snap.tar), crane does the same for plain qcow2 blobs and images. that plus snapshot import / images import on the other side covers host to host today, and keeps the registry side in standard tools instead of cocoon. |
Summary
VM export behavior
A running VM is stopped under its lifecycle lock, its root qcow2 backing chain is flattened, and the VM is restarted before the registry upload begins. A VM that was already stopped remains stopped. Direct-boot filesystems and additional data disks are intentionally outside this export format.
Local file export uses a synchronized temporary file and atomic rename, so a failed copy does not truncate an existing image. If OCI publication succeeds but optional local retention fails, the command reports the published manifest digest instead of presenting the operation as a total failure.
Artifact semantics
Snapshot push preserves memory, device, disk, CPU, and guest topology state for compatible clone/restore consumers. VM export produces a portable system-disk artifact for a fresh
vm run; it does not carry runtime memory state.Validation
make lintgo test ./cmd/vm ./cmd/images ./cmd/snapshot ./images/cloudimg ./hypervisor/cloudhypervisorgo test ./...