Skip to content

Conversation

danilrwx
Copy link
Contributor

@danilrwx danilrwx commented Aug 4, 2025

Description

This pull request implements a comprehensive VM restore operation feature. The changes include:

  • Added new Restore operation type to VirtualMachineOperationType.
  • Added maintenance condition support for VMs during restore operations
  • Implemented restore controller with comprehensive resource management
  • Added support for resource tracking during restore operations
  • Enhanced CRD definitions with restore operation specifications

The implementation provides three restore modes:

  • DryRun: Validates compatibility without making changes
  • Strict: Restores exactly as in the snapshot, failing if dependencies are missing
  • BestEffort: Restores while handling missing external dependencies gracefully

Why do we need it, and what problem does it solve?

Virtual machine snapshots are essential for backup and disaster recovery scenarios, but without a proper restore mechanism, snapshots are only half of the solution. The feature solves the problem of having snapshots without a standardized, reliable way to restore them, ensuring VMs can be recovered with proper dependency validation and conflict resolution.

What is the expected result?

  1. Create restore operations using the new VirtualMachineOperation with type: Restore
  2. Specify restore parameters including the source snapshot name and restore mode
  3. Monitor restore progress through the operation status and resource tracking
  4. Handle restore conflicts through different restore modes (Strict vs BestEffort)
  5. Validate restore compatibility using DryRun mode before actual restoration

Checklist

  • The code is covered by unit tests.
  • e2e tests passed.
  • Documentation updated according to the changes.
  • Changes were tested in the Kubernetes cluster manually.

Changelog entries

section: core
type: feature
summary: Add Restore VirtualMachineOperation

@danilrwx danilrwx force-pushed the feat/vmop/restore-operation branch 2 times, most recently from be78423 to 408f71b Compare August 12, 2025 15:32
@danilrwx danilrwx force-pushed the feat/vmop/restore-operation branch from 43985ff to 5f6c7cd Compare August 18, 2025 07:22
@danilrwx danilrwx added this to the v0.25.0 milestone Aug 18, 2025
@danilrwx danilrwx force-pushed the feat/vmop/restore-operation branch 9 times, most recently from e110f8d to 5dfea63 Compare August 25, 2025 12:03
@danilrwx danilrwx force-pushed the feat/vmop/restore-operation branch 2 times, most recently from 70bb897 to ef1b008 Compare August 26, 2025 12:58
@danilrwx danilrwx marked this pull request as ready for review August 26, 2025 13:02
@danilrwx danilrwx added the e2e/run Run e2e test on cluster of PR author label Aug 26, 2025
@deckhouse-BOaTswain
Copy link
Contributor

deckhouse-BOaTswain commented Aug 26, 2025

Workflow has started.
Follow the progress here: Workflow Run

The target step completed with status: cancelled.

@danilrwx danilrwx force-pushed the feat/vmop/restore-operation branch from 3229213 to bc6b4db Compare August 26, 2025 14:15
@deckhouse-BOaTswain deckhouse-BOaTswain removed the e2e/run Run e2e test on cluster of PR author label Aug 26, 2025
@danilrwx danilrwx force-pushed the feat/vmop/restore-operation branch 2 times, most recently from c057a46 to 3610ef2 Compare August 26, 2025 17:44
Signed-off-by: Daniil Antoshin <[email protected]>
Signed-off-by: Daniil Antoshin <[email protected]>
Signed-off-by: Daniil Antoshin <[email protected]>
Signed-off-by: Daniil Antoshin <[email protected]>
Signed-off-by: Daniil Antoshin <[email protected]>
Signed-off-by: Daniil Antoshin <[email protected]>
Signed-off-by: Daniil Antoshin <[email protected]>
Signed-off-by: Daniil Antoshin <[email protected]>
@danilrwx danilrwx force-pushed the feat/vmop/restore-operation branch from f4b68a1 to 65efdcb Compare August 29, 2025 08:58
Signed-off-by: Daniil Antoshin <[email protected]>
@danilrwx danilrwx added the e2e/run Run e2e test on cluster of PR author label Aug 29, 2025
@deckhouse-BOaTswain
Copy link
Contributor

deckhouse-BOaTswain commented Aug 29, 2025

Workflow has started.
Follow the progress here: Workflow Run

The target step completed with status: failure.

@deckhouse-BOaTswain deckhouse-BOaTswain removed the e2e/run Run e2e test on cluster of PR author label Aug 29, 2025
@danilrwx danilrwx added the e2e/run Run e2e test on cluster of PR author label Aug 29, 2025
@deckhouse-BOaTswain
Copy link
Contributor

deckhouse-BOaTswain commented Aug 29, 2025

Workflow has started.
Follow the progress here: Workflow Run

The target step completed with status: success.

@nevermarine nevermarine modified the milestones: v0.25.0, v0.26.0 Aug 29, 2025
@deckhouse-BOaTswain deckhouse-BOaTswain removed the e2e/run Run e2e test on cluster of PR author label Aug 29, 2025
Signed-off-by: Daniil Antoshin <[email protected]>
Signed-off-by: Daniil Antoshin <[email protected]>
Signed-off-by: Daniil Antoshin <[email protected]>
Signed-off-by: Daniil Antoshin <[email protected]>
Signed-off-by: Daniil Antoshin <[email protected]>
Signed-off-by: Daniil Antoshin <[email protected]>
@danilrwx danilrwx changed the title feat(vmop): add restore to crd feat(vmop): add restore operation Sep 1, 2025
Signed-off-by: Daniil Antoshin <[email protected]>
@danilrwx danilrwx changed the title feat(vmop): add restore operation feat(vmop): add Restore operation Sep 1, 2025
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.

4 participants