Skip to content

Commit bf73c87

Browse files
committed
add docs
Signed-off-by: Daniil Antoshin <[email protected]>
1 parent 757168b commit bf73c87

File tree

1 file changed

+60
-3
lines changed

1 file changed

+60
-3
lines changed

docs/USER_GUIDE.md

Lines changed: 60 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1389,6 +1389,63 @@ How to perform the operation in the web interface:
13891389
- Select the desired virtual machine from the list and click the ellipsis button.
13901390
- In the pop-up menu, you can select possible operations for the VM.
13911391

1392+
### VMOP Restore Operations
1393+
1394+
The `VirtualMachineOperation` with `type: Restore` provides advanced restore capabilities beyond the basic `VirtualMachineRestore` resource, offering real-time monitoring and enhanced control during restore operations.
1395+
1396+
#### Basic Restore Operation
1397+
1398+
```yaml
1399+
apiVersion: virtualization.deckhouse.io/v1alpha2
1400+
kind: VirtualMachineOperation
1401+
metadata:
1402+
generateName: restore-linux-vm-
1403+
spec:
1404+
virtualMachineName: linux-vm
1405+
type: Restore
1406+
restoreSpec:
1407+
virtualMachineSnapshotName: linux-vm-snapshot
1408+
restoreMode: Strict
1409+
```
1410+
1411+
#### Restore Modes
1412+
1413+
**Strict Mode** (default) - Ensures complete validation and consistency:
1414+
- All referenced resources must exist
1415+
- Operation fails if any dependency is missing
1416+
- VM is automatically placed in maintenance mode during restore
1417+
- Use for production environments
1418+
1419+
**BestEffort Mode** - Provides flexible restore with graceful degradation:
1420+
- Skips missing non-critical resources
1421+
- Continues restore even with missing dependencies
1422+
- Higher success rate in complex environments
1423+
- Use for development/testing environments
1424+
1425+
```yaml
1426+
spec:
1427+
type: Restore
1428+
restoreSpec:
1429+
restoreMode: BestEffort
1430+
virtualMachineSnapshotName: my-vm-snapshot
1431+
```
1432+
1433+
#### Monitoring Restore Progress
1434+
1435+
```bash
1436+
# Check operation status
1437+
kubectl get vmop
1438+
1439+
# View detailed progress
1440+
kubectl describe vmop restore-linux-vm-abc123
1441+
```
1442+
1443+
Operations progress through phases: `Pending` → `InProgress` → `Completed`/`Failed`.
1444+
1445+
{{< alert level="info" >}}
1446+
During VMOP Restore operations, the target VM is automatically placed in maintenance mode to ensure safe restore operations. The maintenance mode is automatically removed when the operation completes.
1447+
{{< /alert >}}
1448+
13921449
### Change virtual machine configuration
13931450

13941451
You can change the configuration of a virtual machine at any time after the `VirtualMachine` resource has been created. However, how these changes are applied depends on the current phase of the virtual machine and the nature of the changes made.
@@ -2682,13 +2739,13 @@ spec:
26822739
To restore a virtual machine in `Safe` mode, you must delete its current configuration and all associated disks. This is because the restoration process returns the virtual machine and its disks to the state recorded at the snapshot's creation time.
26832740
{{< /alert >}}
26842741

2685-
The `Forced` mode is used to bring an already existing virtual machine to the state at the time of the snapshot.
2742+
The `Forced` mode is used to bring an already existing virtual machine to the state at the time of the snapshot.
26862743

26872744
{{< alert level="warning" >}}
26882745
`Forced` may disrupt the operation of the existing virtual machine because it will be stopped during restoration, and `VirtualDisks` and `VirtualMachineBlockDeviceAttachments` resources will be deleted for subsequent restoration.
2689-
{{< /alert >}}
2746+
{{< /alert >}}
26902747

2691-
Example manifest for restoring a virtual machine from a snapshot in `Safe` mode:
2748+
Example manifest for restoring a virtual machine from a snapshot in `Safe` mode:
26922749

26932750
```yaml
26942751
d8 k apply -f - <<EOF

0 commit comments

Comments
 (0)