# Managed Object - SrmRecovery

Property of
  SrmServiceInstanceContent
See also
  SrmCreateRecoveryPlanTask, SrmDeleteRecoveryPlanTask, SrmFolder, SrmProtectionGroup, SrmRecoveryHistory, SrmRecoveryPlan, SrmRecoveryPlanFolder, SrmRecoveryTestNetworkMapping
Since
  SRM API 2.0

## Managed Object Description

External Interface to Site Recovery Manager - Recovery.

This interface works only on the locally connected site except where specified.

SNMP EVENTS: Users may need to configure the VC Server to cause these to be forwarded to the registered SNMP Server.

Callers of this API are strongly encouraged to listen for the following SNMP Events DrRecoveryProfilePromptDisplay - The Recovery Plan/Profile is paused waiting for user input

Callers of this API are encouraged to listen for the following SNMP Events. Additionally, users should also listen for VC Event that a VM cannot boot due to a Prompt requiring user attention.

ADDITIONAL:

- DrRecoveryProfilePromptResponse - The RecoveryPlan is no longer paused waiting for user input
- DrRecoveryVmBegin - Starting to recovery a particular VM
- DrRecoveryVmEnd - Completed recovery of a particular VM
- DrRecoveryVmResultSuccess - A particular VM was recovered successfully
- DrRecoveryVmResultFailure - A particular VM failed recovery
- DrRecoveryVmResultWarning - A particular VM was recovered but there may have been errors
- DrRecoveryProfileExecuteTestBegin - A recovery is starting in Test mode
- DrRecoveryProfileExecuteTestEnd - A recovery has finished running in Test mode
- DrRecoveryProfileExecuteBegin - A recovery is starting in Recovery mode
- DrRecoveryProfileExecuteEnd - A recovery has finished running in Recovery mode

Properties

Name | Type | Description
--- | --- | ---
None

Methods

Methods defined in this Managed Object
CreateRecoveryPlan, DeleteRecoveryPlan, GetHistory, GetRecoveryPlanRootFolder, ListPlans, MovePlan_Task

# CreateRecoveryPlan

Create a new recovery plan.

Required Privileges
  VcDr.RecoveryProfile.com.vmware.vcDr.Create
Since
  SRM API 5.0

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the SrmRecovery used to make the method call.
name P | xsd:string | Name of the plan. Must be unique in the parent folder, and contain between 1 and 80 characters. Since SRM API 5.0
folder P | ManagedObjectReference to a SrmFolder | A folder where the plan will be created. Since SRM API 5.0
groups P | ManagedObjectReference[] to a SrmProtectionGroup[] | List of protection groups to add to the recovery plan. Since SRM API 5.0
description* P | xsd:string | Optional description of the plan. Can not contain more than 4096 characters. Since SRM API 5.0
mapping* P | SrmRecoveryTestNetworkMapping[] | Optional list of test network mappings. Since SRM API 5.0

*Need not be set P Required privilege - see tooltip for details

Return Value

Type | Description
--- | ---
ManagedObjectReference to a SrmCreateRecoveryPlanTask | A task instance to monitor the asynchronous operation of this method.

Faults

Type | Description
--- | ---
vmodl.RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.
SrmFaultDirectionError | Thrown if there are groups in both directions.
SrmFaultInvalidArgument | Thrown if some arguments are missing or invalid.
SrmFaultProtectionGroupNotFound | Thrown if some protection groups are mising.
SrmFaultRemoteSiteNotEnabled | Thrown if the remote site is not enabled. The CreateRecoveryPlanTask fails with: DuplicateNames if a plan with this name already exists. InvalidArgument if the name parameter is empty string. InvalidType if folder parameter isn't meant to hold a recovery plans. InvalidPrimaryNetwork if mapping parameter contains TestNetworkMapping with an invalid network on primary site (for example uplink DVPortgroup). InvalidSecondaryNetwork if mapping parameter contains TestNetworkMapping with an invalid network on secondary site (for example uplink DVPortgroup). NoPermission iff user doesn't have VcDr.RecoveryProfile.com.vmware.vcDr.Create privilege on the specified folder or VcDr.ProtectionProfile.com.vmware.vcDr.AssignToRecoveryPlan privilege on all protection groups in the plan. StringArgumentTooLong if the size of either name or description of the plan is too long. UnknownPrimaryNetwork if mapping parameter contains TestNetworkMapping with a network that does not exist on primary site. UnknownSecondaryNetwork if mapping contains TestNetworkMapping with a network that does not exist on secondary site.
SrmFaultStringArgumentTooLong |

Events

Type
None

# DeleteRecoveryPlan

Delete a given RecoveryPlan.

Required Privileges
  VcDr.RecoveryProfile.com.vmware.vcDr.Delete
Since
  SRM API 5.0

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the SrmRecovery used to make the method call.
plan P | ManagedObjectReference to a SrmRecoveryPlan | The recovery plan to delete. Since SRM API 5.0

P Required privilege: plan

Return Value

Type | Description
--- | ---
ManagedObjectReference to a SrmDeleteRecoveryPlanTask | A task instance to monitor the asynchronous operation of this method. The DeleteRecoveryPlanTask fails with InvalidState if the plan or its peer is not in a valid state for deletion.

Faults

Type | Description
--- | ---
vmodl.RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Events

Type
None

# GetHistory

Retrieve the History for a given Recovery Plan.

Required Privileges
  System.View

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the SrmRecovery used to make the method call.
plan P | ManagedObjectReference to a SrmRecoveryPlan | The SrmRecoveryPlan of interest. Since SRM API 2.0

P Required privilege: plan

Return Value

Type | Description
--- | ---
ManagedObjectReference to a SrmRecoveryHistory | The history of the given plan.

Faults

Type | Description
--- | ---
vmodl.RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.
SrmFaultRecoveryPlanNotFound | Thrown if the RecoveryPlan no longer exists

Events

Type
None

# GetRecoveryPlanRootFolder

Get a reference to the top-level container for recovery plans.

Required Privileges
  System.View
Since
  SRM API 3.0

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the SrmRecovery used to make the method call.

Return Value

Type | Description
--- | ---
ManagedObjectReference to a SrmRecoveryPlanFolder |

Faults

Type | Description
--- | ---
vmodl.RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Events

Type
None

# ListPlans

Retrieve all the Recovery Plans for this SRM Server.

Required Privileges
  System.View

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the SrmRecovery used to make the method call.

Return Value

Type | Description
--- | ---
ManagedObjectReference[] to a SrmRecoveryPlan[] | A list of Recovery Plans.

Faults

Type | Description
--- | ---
vmodl.RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Events

Type
None

# MovePlan_Task

Moves the RecoveryPlan to a different folder.

Required Privileges
  VcDr.RecoveryProfile.com.vmware.vcDr.Edit
Since
  SRM API 11.0

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the SrmRecovery used to make the method call.
recoveryPlan P | ManagedObjectReference to a SrmRecoveryPlan | the recovery plan to move. Since SRM API 11.0
destination P | ManagedObjectReference to a SrmFolder | the folder which will become the new parent folder of this plan. Since SRM API 11.0

P Required privilege - see tooltip for details

Return Value

Type | Description
--- | ---
ManagedObjectReference to a SrmExtApiTask |

Faults

Type | Description
--- | ---
vmodl.RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Events

Type
None