Skip to content

Commit

Permalink
Add volume migration cancellation and recovery
Browse files Browse the repository at this point in the history
Signed-off-by: Alice Frosi <[email protected]>
  • Loading branch information
alicefr committed Oct 9, 2024
1 parent 482df65 commit 55b0a63
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions docs/storage/volume_migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,31 @@ spec:
pod: {}
```
## Volume migration cancellation
The users could, for various reasons, wish to stop and cancel the ongoing volume migration.
Migration cancellations are also handled declaratively, thus users must restore the previous set of volumes, which will be read as a cancellation for the volume update and migration.
A possible way to cancel the migration consists apply the old version of the VM declaration.
## Volume migration failure and recovery
If a volume migration fails, KubeVirt will continue to try to migrate until the volume update is cancelled. As a result, if the original failure was temporary, a subsequent migration could succeed; otherwise, KubeVirt continues to generate new migrations with exponential backoff time.
To recover from a persistent failure, users must revert the volume set to its original state, indicating the cancellation of the volume migration.
### Manual recovery required
If for any reasons the VMI disappears, then the volume migration isn't retried anymore. This might happen if the users inadvertently shutdown the VM or the VMI is accidentally deleted.
However, in these situations, the VM spec is in an inconsistent state because the volume set contains the destination volumes but the copy wasn't successful, and users could failed to boot correctly the VM. For this reason the VM is marked with the condition `ManualRecoveryRequired` and KubeVirt will refuses to start a VM which has this condition.

In order to recover the VM spec, the users need to revert the volume set in the VM spec as it is the case for the volume migration cancellation.

The volume migration information are stored in the VM status as well, and the users can see the full list of the migrated volumes which contain the source and destination names as well as the corresponding volume name .

Users can find the whole list of migrated volumes in the VM status, which includes the source and destination names together with the associated volume name.

## Limitations

Only certain types of disks and volumes are supported to be migrated. For an invalid type of volume the RestartRequired condition is set and volumes will be replaced upon VM restart.
Expand Down

0 comments on commit 55b0a63

Please sign in to comment.