docs: guides for backing up and restoring KubeVirt VirtualMachines - #101
Open
anisurrahman75 wants to merge 3 commits into
Open
anisurrahman75 wants to merge 3 commits into
anisurrahman75 wants to merge 3 commits into
Conversation
|
Visit the preview URL for this PR (updated for commit da13eb4): https://kubestash-qa--pr101-kubevirt-l3jzt8zp.web.app (expires Mon, 07 Sep 2026 09:15:43 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: 7765752f86b485f0f549c1d5d58c61af5e2ecd74 |
Add a guides/kubevirt section following the workloads layout: an overview of how the backup and restore work, and a step by step guide with runnable examples. The overview covers what a VirtualMachine backup captures -- the dependency graph plus every disk -- and how the stopped and running paths differ. The step by step guide walks a full cycle on a stopped VM and calls out the two things specific to VirtualMachines: a RestoreSession must not set spec.target, and the disks are restored before the manifests are applied so CDI adopts the populated PVCs. Signed-off-by: Anisur Rahman <anisur@appscode.com>
The other overview pages carry a flow diagram for each of the two processes; add the equivalent pair here. Authored as plain SVG with real text elements rather than exported outlines, so they stay a few KB and remain searchable and editable. Signed-off-by: Anisur Rahman <anisur@appscode.com>
The addon ships as kubevirt with combined Functions kubevirt-backup and kubevirt-restore; the task names are unchanged. Signed-off-by: Anisur Rahman <anisur@appscode.com>
anisurrahman75
force-pushed
the
kubevirt
branch
from
August 31, 2026 09:14
d46d38e to
da13eb4
Compare
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.
Adds a
guides/kubevirtsection documenting backup and restore of a KubeVirtVirtualMachine, following the layout and writing conventions ofguides/workloads.Pages
guides/kubevirt/overview/index.mdguides/kubevirt/virtualmachine/index.mdguides/kubevirtsits at weight 25, betweenWorkload's Volumes(20) andStand-alone Volumes(30). Identifiers arekubevirt,kubevirt-overviewandkubevirt-virtualmachine; none collide with existing docs.Seven runnable manifests under
virtualmachine/examples/: the VM and its dependencies, BackupStorage, RetentionPolicy, BackupConfiguration, RestoreSession, and a pair of Jobs that seed and verify sample data on the disks.What the overview covers
VirtualMachineis a graph, not one object: the VM, its DataVolumes and PVCs, cloud-init and access-credential Secrets, ConfigMaps, ServiceAccounts, instancetype/preference ControllerRevisions, TPM/EFI backend and memory-dump PVCs. Runtime objects (VMI,virt-launcher) are deliberately excluded, so a restored VM cold-boots.manifestcomponent plus onevolume-<pvc-name>per disk, which is what makes single-disk and manifest-only restores possible.VirtualMachineSnapshot, so KubeVirt owns the guest freeze; consistency depends onqemu-guest-agent, and crash-consistent still succeeds with a warning. The CSI snapshot / defaultVolumeSnapshotClass/Snapshotfeature gate prerequisites apply only to running VMs.<figure>markup the sibling overviews use.What the step-by-step guide covers
A full cycle on a stopped VM: create the VM and its dependencies, seed sample data and note its checksums, configure the backend, back up, verify the
Snapshotcomponents, delete the whole VM stack, restore, and confirm the checksums match.Two things specific to VirtualMachines are called out where a reader would otherwise get stuck:
RestoreSessionmust not setspec.target. The VM does not exist yet at restore time, so a target pointing at a missing object is never found.DataVolumes come back alreadySucceeded— CDI adopts the populated PVCs rather than re-importing them.The guide uses the single
logical-backup/logical-restoretasks, and notes that the granularmanifest-backup/volume-backuppair is available for anyone who wants the two halves as separate task containers.About the diagrams
The existing overview diagrams are 960x540 Google Slides exports with their text flattened to vector paths, which is why they weigh ~250 KB each. There is no source file in the repo to extend, so these two are authored directly as SVG at the same viewBox, using real
<text>elements: ~9 KB each, searchable, and editable in a text editor. Both were rendered and checked visually.Notes for review
Related: kubestash/kubevirt#1 (the addon), kubestash/kubestash#386 and kubestash/installer#365 (the operator and RBAC changes it needs).