Skip to main content

VMware Windows network latency

VMware Windows network latency simulates a network latency scenario on Windows OS based VMware VM. It checks the performance of the application running on the VMware Windows VMs under network latency conditions.

VMware Windows Network Latency

Use cases

VMware Windows network latency:

  • Determines the resilience of an application when a network latency scenario is simulated on a VMware Windows virtual machine.
  • Simulates the situation of network latency for processes running on the application, which degrades their performance.
  • Helps verify the application's ability to handle network failures and its failover mechanisms.

Prerequisites

  • Kubernetes > 1.16 is required to execute this fault.

  • Execution plane should be connected to vCenter and host vCenter on port 443.

  • VMware tool should be installed on the target VM with remote execution enabled.

  • Adequate vCenter permissions should be provided to access the hosts and the VMs.

  • The VM should be in a healthy state before and after injecting chaos.

  • Kubernetes secret has to be created that has the vCenter credentials in the CHAOS_NAMESPACE.

  • Verify clumsy is installed on the VM, as it's essential for this experiment.

  • Run the fault with a user possessing admin rights, preferably the built-in Administrator, to guarantee permissions for memory stress testing. See how to enable the built-in Administrator in Windows.

  • VM credentials can be passed as secrets or as a chaos engine environment variable.

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 target VM(s). Multiple comma-separated names can be provided. For example, vm-1,vm-2.
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.

Optional tunables

Tunable Description Notes
DESTINATION_HOSTS Comma-separated list of destination hosts to induce latency. For example, github.com,harness.io. For more information, go to destination hosts.
DESTINATION_IPS Comma-separated list of destination IPs to induce latency. For example, 10.0.0.1,10.0.0.2. For more information, go to destination IPs.
NETWORK_LATENCY The amount of latency to induce (in ms). Default: 2000. For more information, go to network latency.
PATH_OF_CLUMSY Path of the Clumsy tool in the VM. For example, C:\Program Files\Clumsy\. For more information, go to path of Clumsy.
TOTAL_CHAOS_DURATION Duration that you specify, through which chaos is injected into the target resource (in seconds). Default: 60 s. For more information, go to duration of the chaos.
RAMP_TIME Period to wait before and after injecting chaos (in seconds). Default: 0 s. For more information, go to ramp time.
SEQUENCE Sequence of chaos execution for multiple instances. Default: parallel. Supports serial and parallel sequence. For more information, go to sequence of chaos execution.
DEFAULT_HEALTH_CHECKDetermines 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.

Destination hosts

The DESTINATION_HOSTS environment variable specifies the destination hosts to induce latency on the target Windows VM.

Use the following example to specify destination hosts:

apiVersion: litmuschaos.io/v1alpha1
kind: ChaosEngine
metadata:
name: engine-nginx
spec:
engineState: "active"
chaosServiceAccount: litmus-admin
experiments:
- name: vmware-windows-network-latency
spec:
components:
env:
# Name of the VM
- name: VM_NAME
value: 'test-vm-01'
# Destination hosts to induce latency
- name: DESTINATION_HOSTS
value: 'github.com'

Destination IPs

The DESTINATION_IPS environment variable specifies the destination IPs to induce latency on the target Windows VM.

Use the following example to specify destination IPs:

apiVersion: litmuschaos.io/v1alpha1
kind: ChaosEngine
metadata:
name: engine-nginx
spec:
engineState: "active"
chaosServiceAccount: litmus-admin
experiments:
- name: vmware-windows-network-latency
spec:
components:
env:
# Name of the VM
- name: VM_NAME
value: 'test-vm-01'
# Destination IPs to induce latency
- name: DESTINATION_IPS
value: '10.0.0.1,10.0.0.2'

Network latency

The NETWORK_LATENCY environment variable specifies the amount of latency to induce (in ms).

Use the following example to specify network latency:

apiVersion: litmuschaos.io/v1alpha1
kind: ChaosEngine
metadata:
name: engine-nginx
spec:
engineState: "active"
chaosServiceAccount: litmus-admin
experiments:
- name: vmware-windows-network-latency
spec:
components:
env:
# Name of the VM
- name: VM_NAME
value: 'test-vm-01'
# The amount of latency to induce (in ms)
- name: NETWORK_LATENCY
value: '2000'

Path of Clumsy

The PATH_OF_CLUMSY environment variable specifies the path of the Clumsy tool in the VM.

Use the following example to specify the path of Clumsy:

apiVersion: litmuschaos.io/v1alpha1
kind: ChaosEngine
metadata:
name: engine-nginx
spec:
engineState: "active"
chaosServiceAccount: litmus-admin
experiments:
- name: vmware-windows-network-latency
spec:
components:
env:
# Name of the VM
- name: VM_NAME
value: 'test-vm-01'
# Path of the Clumsy tool in the VM
- name: PATH_OF_CLUMSY
value: 'C:\\Program Files\\Clumsy\\'