KubeVirt VM Outage Scenario - Kraken
Detailed implementation of the KubeVirt VM Outage Scenario in Kraken
This scenario enables the simulation of VM-level disruptions in clusters where KubeVirt or OpenShift Containerized Network Virtualization (CNV) is installed. It allows users to delete a Virtual Machine Instance (VMI) to simulate a VM crash and test recovery capabilities.
The kubevirt_vm_outage
scenario deletes a specific KubeVirt Virtual Machine Instance (VMI) to simulate a VM crash or outage. This helps users:
Before using this scenario, ensure the following:
The scenario supports the following parameters:
Parameter | Description | Required | Default |
---|---|---|---|
vm_name | The name of the VMI to delete | Yes | N/A |
namespace | The namespace where the VMI is located | No | “default” |
timeout | How long to wait (in seconds) before attempting recovery for VMI to start running again | No | 60 |
kill_count | How many VMI’s to kill serially | No | 1 |
When executed, the scenario will:
runStrategy: Always
, KubeVirt will automatically try to recreate the VMI after deletion. In this case, the scenario will wait for this automatic recovery to complete.While the kubvirt outage is running you can enable kube virt checks to check the ssh connection to a list of VMIs to test if an outage of one VMI effects any others become unready/unconnectable. See more details on how to enable these checks in kubevirt checks
This scenario is particularly useful for testing high availability configurations, such as:
The plugin implements two recovery strategies:
Automated Recovery: If the VM is managed by a VirtualMachine resource with runStrategy: Always
, the plugin will wait for KubeVirt’s controller to automatically recreate the VMI.
Manual Recovery: If automatic recovery doesn’t occur within the timeout period, the plugin will attempt to manually recreate the VMI using the saved state from before the deletion.
Krkn supports rollback for KubeVirt VM Outage Scenario. For more details, please refer to the Rollback Scenarios documentation.
If the scenario fails, check the following:
Detailed implementation of the KubeVirt VM Outage Scenario in Kraken
Detailed implementation of Kubevirt VM outage using Krkn-hub
Detailed implementation of Kubevirt VM outage with Krknctl