Sample Exchange

 View Only

vSphere Fault Tolerance Feature API operations utility 

Jul 20, 2016 06:26 PM

vSphere Fault Tolerance Feature API operations utility

1. Details

Utility to illustrate vSphere Fault Tolerance operations on provided Cluster and VM. Illustrates how to

  • Enable, Poweron FT VM
  • Disable, Enable Secondary VM
  • Make Primary VM / Test Failover

Flow through of the solution:

  • Connect to provided vCenter Server and Retrieve all Clusters. Check if user provided cluster exists and if vSphere HA is enabled on cluster.
  • Search for user provided VM or Pick a VM from one of the clustered host
  • Enable FT, monitor for secondary VM creation
  • Power on FT VM, monitor for Secondary VM power state and FT Pair protection state
  • Disable Secondary VM
  • Enable Secondary VM, monitor for FT Pair protection state to restore (i.e enabled and running)
  • Promote Secondary to Primary VM ('Test Failover' : Kill primary and check Secondary VM gets promoted to Primary and a new secondary VM gets created), monitor FT Pair protection state
  • Revert the inventory state: Power off VM and Turn off FT

2. How to run the Utility?

Run from Dev IDE
  • Import files under the src/faulttolerance/ folder into your IDE.
  • Required libraries are embedded within Runnable-Jar/ftops.jar, extract & import the libraries into the project.
  • Run the utility from 'RunApp' program by providing arguments like:
    --vsphereip 192.168.10.1 --username adminUser --password dummyPasswd --clusterName GuruCluster --vmName TestVM
Run from Pre-built Jars
  • Copy/Download the ftops.jar from Runnable-jar folder (from the uploaded file) and unzip on to local drive folder say c:\ftops
  • Open a command prompt and cd to the folder, lets say cd ftops
  • Run a command like shown below to see various usage commands:
    C:\ftops>java -jar ftops.jar --help

#vSphereAPI
#Java
#vSphereManagementSDK
#vSphere
#MIT

Statistics
0 Favorited
2 Views
1 Files
0 Shares
0 Downloads
Attachment(s)
zip file
vSphere-FaultTolerance-API-Operations-master.zip   2.30 MB   1 version
Uploaded - Apr 09, 2024

Tags and Keywords

Related Entries and Links

No Related Resource entered.