Skip to main content

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.

VMware Process kill

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.
note
  • 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 a ChaosEngine 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

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. For more information, go to process Ids.

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. 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.

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'