VMware process kill
VMware process kill kills the target processes that are running as a part of a Linux OS based VMware VM.
- It helps determine the resilience of an application (or process) running on the VMware VMs.
Usage
View fault usage
This fault disrupts critical processes running within the application, such as databases or message queues. These services may be running in the VMware VM, and this fault kills their underlying processes or threads. Such faults help determine how efficiently and quickly the VMware instance recovers from the unexpected disruption.
Prerequisites
- Kubernetes > 1.16
- Execution plane is connected to vCenter and the hosts on port 443.
- VMware tool is installed on the target VM with remote execution enabled.
- Adequate vCenter permissions to access the hosts and the VMs.
- Create a Kubernetes secret that has the Vcenter credentials in the
CHAOS_NAMESPACE
. Below is a sample secret file:
apiVersion: v1
kind: Secret
metadata:
name: vcenter-secret
namespace: litmus
type: Opaque
stringData:
VCENTERSERVER: XXXXXXXXXXX
VCENTERUSER: XXXXXXXXXXXXX
VCENTERPASS: XXXXXXXXXXXXX
Note
You can pass the VM credentials as secrets or as a ChaosEngine
environment variable.
Default validations
- The VM should be in a healthy state.
- The target processes should exist inside the VM.
Fault tunables
Fault tunables
Mandatory fields
Variables | Description | Notes |
---|---|---|
VM_NAME | Name of the VM where the target processes reside. | For example, ubuntu-vm-1 . |
PROCESS_IDS | Process IDs of the target processes that are provided as comma-separated values. | For example, 183,253,857 . |
Optional fields
Variables | Description | Notes |
---|---|---|
TOTAL_CHAOS_DURATION | Duration that you specify, through which chaos is injected into the target resource (in seconds). | Defaults to 30s. |
RAMP_TIME | Period to wait before and after injecting chaos (in seconds). | For example, 30s. |
Fault examples
Common fault tunables
Refer to the common attributes to tune the common tunables for all the faults.
Process IDs
It contains the target process IDs running on a particular VM. You can tune it using the PROCESS_IDS
environment variable.
Use the following example to tune it:
# Process kill in the VMware VM
apiVersion: litmuschaos.io/v1alpha1
kind: ChaosEngine
metadata:
name: engine-nginx
spec:
engineState: "active"
chaosServiceAccount: litmus-admin
experiments:
- name: VMware-process-kill
spec:
components:
env:
# Name of the VM
- name: VM_NAME
value: 'test-vm-01'
# List of Process IDs
- name: PROCESS_IDS
value: '8688,4678'