Skip to main content

VMware host reboot

VMware host reboot reboots a VMware host that is attached to the Vcenter.

  • It helps determine the VMware infrastructure resilience when the host reboots.
  • It also measures the infrastructure resilience in case of an high availability (HA) cluster.

VMware Host Reboot

note

Harness CE doesn't support injecting VMWare Windows faults on Bare metal server.

Use cases

  • VMware host reboot has a high blast radius due to which all the VMs under the target host are disrupted.
  • It measures the impact of the host reboot on the VMs and its underlying applications.
  • It also measures the effectiveness of a HA cluster.

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

Mandatory tunables

Tunable Description Notes
HOST_NAME Name of the target host For example, host-1. For more information, go to host name.
HOST_DATACENTER Name of the data center to which the host belongs. For example, datacenter-1. For more information, go to host datacenter.
HIGH_AVAILABILITY_CLUSTER Specify whether the host is a part of the high availability cluster. Defaults to disable. Supports enable as well. For more information, go to high availablity cluster.

Optional tunables

Tunable Description Notes
RAMP_TIME Period to wait before and after injecting chaos (in seconds). For example, 30s. For more information, go to ramp time.
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.

Host reboot

It reboots a vCenter host.

Use the following example to tune it:

# vCenter host reboot
apiVersion: litmuschaos.io/v1alpha1
kind: ChaosEngine
metadata:
name: engine-nginx
spec:
engineState: "active"
annotationCheck: "false"
chaosServiceAccount: litmus-admin
experiments:
- name: VMware-host-reboot
spec:
components:
env:
# Name of the host
- name: HOST_NAME
value: 'host-1'
# Host datacenter
- name: HOST_DATACENTER
value: 'datacenter-1'

HA cluster

It specifies whether to reboot a vCenter host which is a part of a high availability cluster. Tune it by using the HIGH_AVAILABILITY_CLUSTER environment variable.

Use the following example to tune it:

# vCenter HA cluster host reboot
apiVersion: litmuschaos.io/v1alpha1
kind: ChaosEngine
metadata:
name: engine-nginx
spec:
engineState: "active"
annotationCheck: "false"
chaosServiceAccount: litmus-admin
experiments:
- name: VMware-host-reboot
spec:
components:
env:
# Name of the host
- name: HOST_NAME
value: 'host-1'
# Host datacenter
- name: HOST_DATACENTER
value: 'datacenter-1'
# Is host part of HA cluster
- name: HIGH_AVAILABILITY_CLUSTER
value: 'enable'