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.
Use cases
- VMware process kill disrupts critical processes running within the application, such as databases or message queues.
- The services that are disrupted might 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 is required to execute this fault.
- Execution plane should be connected to vCenter and host vCenter on port 443.
- The VM should be in a healthy state before and after injecting chaos.
- VMware tool should be installed on the target VM with remote execution enabled.
- The target processes should exist within the VM.
- Appropriate vCenter permissions should be provided to access the hosts and the VMs.
- Kubernetes secret has to be created that has the Vcenter credentials in the
CHAOS_NAMESPACE
. VM credentials can be passed as secrets or as aChaosEngine
environment variable. 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
Mandatory tunables
Tunable | Description | Notes |
---|---|---|
VM_NAME | Name of the VM where the target processes reside. | For example, ubuntu-vm-1 . |
VM_USER_NAME | Username of the target VM. | For example, vm-user . |
VM_PASSWORD | User password for the target VM. | For example, 1234 . Note: You can take the password from secret as well. |
PROCESS_IDS | Process IDs of the target processes that are provided as comma-separated values. | For example, 183,253,857 . For more information, go to process Ids. |
Optional tunables
Tunable | Description | Notes |
---|---|---|
TOTAL_CHAOS_DURATION | Duration that you specify, through which chaos is injected into the target resource (in seconds). | Defaults to 30s. For more information, go to duration of the chaos. |
RAMP_TIME | Period to wait before and after injecting chaos (in seconds). | For example, 30s. For more information, go to ramp time. |
DEFAULT_HEALTH_CHECK | Determines if you wish to run the default health check which is present inside the fault. | Default: 'true'. For more information, go to default health check. |
CHAOS_INTERVAL | Time interval between two successive instance terminations (in seconds). | Defaults to 30s. For more information, go to chaos interval. |
Process Ids
It specifies the target process Ids running on a particular VM. Tune it by 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'