Skip to main content

VMware service stop

VMware service stop stops the target system services running on a Linux OS based VMware VM.

  • It determines the performance and resilience of the application (or service) running on the VMware VMs.

VMware ServiceStop

Usage

View the uses of the fault
This fault helps determine how resilient an application is to random halts. It determines how efficiently an application recovers and restarts the services.

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 services 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.
SERVICE_NAME Name of the target service. For example, nginx.

Optional fields

Variables Description Notes
SELF_HEALING_SERVICES Set to enable if the target service is self-healing. Defaults to disable.
TOTAL_CHAOS_DURATION Duration that you specify, through which chaos is injected into the target resource (in seconds). Defaults to 30s.
CHAOS_INTERVAL Time interval between two successive instance terminations (in seconds). Defaults to 30s.
SEQUENCE Sequence of chaos execution for multiple instances. Defaults to parallel. Supports serial sequence as well.
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.

Service name

It contains the target service name running on a particular VM.

Use the following example to tune this:

# Service Stop in the VMware VM
apiVersion: litmuschaos.io/v1alpha1
kind: ChaosEngine
metadata:
name: engine-nginx
spec:
engineState: "active"
chaosServiceAccount: litmus-admin
experiments:
- name: VMware-service-stop
spec:
components:
env:
# Name of the VM
- name: VM_NAME
value: 'test-vm-01'
# Name of service
- name: SERVICE_NAME
value: 'nginx'