ftCLI.pl - VMware Fault Tolerant Managment

Version 3

    Description: Managing VMware Fault Tolerant via the command line.

     

    Params: The following operations are supported: create|enable|disable|stop

     

    Requirement:

    vSphere vCenter 4.0

    ESX(i) 4.0

    Advanced, Enterprise, Enterprise Plus or Eval licensing

     

    Assumption: Your environment is FT capable and is configured properly

     

    Sample Execution using ftCLI.pl

    -


     

    To create a newly fault tolerant VM, you'll want to use create operation and specify the VM that you would like to protect (A valid host within the cluster will be selected for you):

     

    [vi-admin@scofield ~]$ ./ftCLI.pl --server reflex.primp-industries.com --username primp --vmname Devastator --operation create
    Enter password:
    Creating FT secondary VM for "Devastator" ...
            Successfully created FT protection for "Devastator"!
    

     

     

    If you have fault tolerant enabled on a specific VM and would like to disable, you'll want to use disable operation:

     

    [vi-admin@scofield ~]$ ./ftCLI.pl --server reflex.primp-industries.com --username primp --vmname Devastator --operation disable
    Enter password:
    Disabling FT secondary VM for "Devastator" on host "everest.primp-industries.com" ...
            Successfully disabled FT protection for "Devastator"!
    

     

     

    If you have fault tolerant disabled on a specific VM and would like to re-enable, you'll want to use enable operation:

     

    [vi-admin@scofield ~]$ ./ftCLI.pl --server reflex.primp-industries.com --username primp --vmname Devastator --operation enable
    Enter password:
    Enabling FT secondary VM for "Devastator" on host "everest.primp-industries.com" ...
            Successfully enabled FT protection for "Devastator"!
    

     

     

    If you like to turn off fault tolerant completely and destroy the secondary VM, you'll want to use stop operation:

     

    [vi-admin@scofield ~]$ ./ftCLI.pl --server reflex.primp-industries.com --username primp --vmname Devastator --operation stop
    Enter password:
    Turning off FT for secondary VM for Devastator ...
            Successfully stopped FT protection for "Devastator"!
    

     

     

    Sample Execution using ftCLI2.pl

    -


     

    Hosts to configure FT logging on:

    [vi-admin@scofield ~]$ cat hostlists
    simplejack.primp-industries.com
    lazarus.primp-industries.com
    

     

    If you would like to enable FT logging on your FT portgroup for a specific ESX(i) host, you'll want to use config_enable specifying host and portgroup_name param:

     

    [vi-admin@scofield ~]$ ./ftCLI2.pl --server reflex.primp-industries.com --username primp --operation config_enable --hostlist hostlists --portgroup_name ft_portgroup
    Enabling FT logging on "simplejack.primp-industries.com" for port group "ft_portgroup" ...
            Successfully enabled FT logging on "simplejack.primp-industries.com" for port group ft_portgroup.
    Enabling FT logging on "lazarus.primp-industries.com" for port group "ft_portgroup" ...
            Successfully enabled FT logging on "lazarus.primp-industries.com" for port group ft_portgroup.
    

     

     

    If you would like to disable FT logging on your FT portgroup for a specific ESX(i) host, you'll want to use config_disable specifying host and portgroup_name param:

     

    [vi-admin@scofield ~]$ ./ftCLI2.pl --server reflex.primp-industries.com --username primp --operation config_disable --hostlist hostlists --portgroup_name ft_portgroup
    Disabling FT logging on "simplejack.primp-industries.com" for port group "ft_portgroup" ...
            Successfully disabled FT logging on "simplejack.primp-industries.com" for port group ft_portgroup.
    Disabling FT logging on "lazarus.primp-industries.com" for port group "ft_portgroup" ...
            Successfully disabled FT logging on "lazarus.primp-industries.com" for port group ft_portgroup.
    
    

     

     

    To create a newly fault tolerant VM, you'll want to use create operation and specify the VM that you would like to protect (A valid host within the cluster will be selected for you):

     

    [vi-admin@scofield ~]$ ./ftCLI2.pl --server reflex.primp-industries.com --username primp --operation create --vmname protect_thee_vm
    Creating FT secondary VM for "protect_thee_vm" ...
            Successfully created FT protection for "protect_thee_vm"!
    

     

     

    If you have fault tolerant configured and would like to enable it for a VM, you would use enable operation:

     

    [vi-admin@scofield ~]$ ./ftCLI2.pl --server reflex.primp-industries.com --username primp --operation disable --vmname protect_thee_vm
    Disabling FT secondary VM for "protect_thee_vm" on host "simplejack.primp-industries.com" ...
            Successfully disabled FT protection for "protect_thee_vm"!
    

     

     

    If you have fault tolerant configured and would like to enable it for a VM, you would use disable operation:

     

    [vi-admin@scofield ~]$ ./ftCLI2.pl --server reflex.primp-industries.com --username primp --operation enable --vmname protect_thee_vm
    Enabling FT secondary VM for "protect_thee_vm" on host "simplejack.primp-industries.com" ...
            Successfully enabled FT protection for "protect_thee_vm"!
    

     

     

    If you like to turn off fault tolerant completely and destroy the secondary VM, you'll want to use stop operation:

     

    [vi-admin@scofield ~]$ ./ftCLI2.pl --server reflex.primp-industries.com --username primp --operation stop --vmname protect_thee_vm
    Turning off FT for secondary VM for protect_thee_vm ...
            Successfully stopped FT protection for "protect_thee_vm"!