Configuring Fault Tolerance
VMware Fault Tolerance is a feature that allows you to run a copy of a virtual machine on another host in the same cluster. The primary virtual machine and the secondary virtual machine are synchronized and run in virtual lockstep with each other. When the primary virtual machine fails, the secondary virtual machine takes its place with the minimum possible interruption of service. Detailed instructions for configuring Fault Tolerance in your vSphere environment can be found on the VMware vSphere 6.5 Documentation Center page at https://pubs.vmware.com/vsphere-65/index.jsp under ESXi and vCenter Server 6.5 Documentation | vSphere Availability | Providing Fault Tolerance for Virtual Machines. In this section, we will discuss how to turn Fault Tolerance on and off in a virtual machine.
Turning Fault Tolerance on
There are no PowerCLI cmdlets to turn Fault Tolerance on or off in a virtual machine, so we have to use the VMware vSphere API. In the following example...