# Managed Object - SrmRecoveryPlan

Property of
  SrmProtectionGroupVmProtectionInfo, SrmRecoveryPlanPeer, SrmRecoveryResult
Parameter to
  DeleteRecoveryPlan, GetHistory, MovePlan_Task
Returned by
  GetNewRecoveryPlan, GetRecoveryPlan, ListChildRecoveryPlans, ListPlans, ProtectionGroupListRecoveryPlans
See also
  SrmProtectionGroup, SrmRecoveryOptions, SrmRecoveryPlanFolder, SrmRecoveryPlanInfo, SrmRecoveryPlanPeer, SrmRecoveryPlanRecoveryMode, SrmRecoveryPlanRecoveryPrompt, SrmRecoverySettings
Since
  SRM API 2.0

## Managed Object Description

Interface to a recovery plan.

Properties

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

Methods

Methods defined in this Managed Object
AddProtectionGroup, AddTestNetworkMappingToRecoveryPlan, AnswerPrompt, Cancel, GetRecoverySettings, ListPrompts, RecoveryPlanGetInfo, RecoveryPlanGetLocation, RecoveryPlanGetParentFolder, RecoveryPlanGetPeer, RecoveryPlanHasRunningTask, RemoveProtectionGroupFromRecoveryPlan, RemoveTestNetworkMappingFromRecoveryPlan, SetRecoverySettings, Start, StartEx_Task

# AddProtectionGroup

Add a SrmProtectionGroup.

Required Privileges
  VcDr.ProtectionProfile.com.vmware.vcDr.Edit
Since
  SRM API 3.0

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the SrmRecoveryPlan used to make the method call.
group P | ManagedObjectReference to a SrmProtectionGroup | The ProtectionGroup that is to be added Since SRM API 3.0

P Required privilege: group

Return Value

Type | Description
--- | ---
None

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.
SrmFaultInvalidArgument | Thrown if the ProtectionGroup already exists
SrmFaultNoPermission | Thrown if the given user has no permission for the folder where plan is located
SrmFaultProtectionGroupNotFound | Thrown if the ProtectionGroup no longer exists
SrmFaultRecoveryPlanLocked | Thrown if the plan is Locked/CheckedOut
SrmFaultVersionConflict | Thrown if a changeVersion value does not match

Events

Type
None

# AddTestNetworkMappingToRecoveryPlan

Add or update a test network mapping.

Required Privileges
  VcDr.ProtectionProfile.com.vmware.vcDr.Edit
Since
  SRM API 5.0

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the SrmRecoveryPlan used to make the method call.
secondaryNetwork P | vim.Network | The network on the recovery site (must be remote) Since SRM API 5.0
testNetwork P | vim.Network | The test network on the recovery site (must be remote) Since SRM API 5.0

P Required privilege - see tooltip for details

Return Value

Type | Description
--- | ---
None

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.
SrmFaultConnectionDownFault | Thrown if the remote site could not be contacted
SrmFaultInvalidPrimaryNetwork |
SrmFaultInvalidSecondaryNetwork |
SrmFaultNoPermission | Thrown if the given user has no permission for the folder where plan is located
SrmFaultRecoveryPlanLocked | Thrown if the plan is Locked/CheckedOut
SrmFaultRemoteSiteNotAuthenticated | Thrown if the remote site is not authenticated
SrmFaultRemoteSiteNotEnabled | Thrown if the remote site is not found
SrmFaultUnknownPrimaryNetwork |
SrmFaultUnknownSecondaryNetwork |
SrmFaultVersionConflict | Thrown if a changeVersion value does not match

Events

Type
None

# AnswerPrompt

Answer the current prompt being displayed in a recovery plan.

This operation requires one of the following privileges depending on the mode of recovery:

- VcDr.RecoveryProfile.com.vmware.vcDr.Failover for a real recovery
- VcDr.RecoveryProfile.com.vmware.vcDr.Run for a test recovery

Required Privileges
  None

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the SrmRecoveryPlan used to make the method call.
key P | xsd:string | The key value from the RecoveryPrompt. Since SRM API 2.0
cancelVmRecovery P | xsd:boolean | Settings this parameter to true will halt further processing on this VM. Since SRM API 2.0
response* P | xsd:string | A response to the prompt that will be recorded. Since SRM API 2.0

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

Return Value

Type | Description
--- | ---
None

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.
SrmFaultInvalidState | Thrown if this recovery plan is not running.
SrmFaultPromptNotFound | Thrown if no prompt with that key exists.

Events

Type
None

# Cancel

Cancel this recovery plan.

This operation requires one of the following privileges depending on the mode of recovery:

- VcDr.RecoveryProfile.com.vmware.vcDr.Failover for a real recovery
- VcDr.RecoveryProfile.com.vmware.vcDr.Run for a test recovery

Required Privileges
  None

Parameters

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

Return Value

Type | Description
--- | ---
None

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.
SrmFaultInvalidState | Thrown if this plan cannot be cancelled.

Events

Type
None

# GetRecoverySettings

Retrieve the SrmRecoverySettings for the specified VirtualMachine.

Required Privileges
  System.View
Since
  SRM API 3.0

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the SrmRecoveryPlan used to make the method call.
vm P | vim.VirtualMachine | The VirtualMachine whose RecoverySettings are to be retrieved Since SRM API 3.0

P Required privilege: vm

Return Value

Type | Description
--- | ---
SrmRecoverySettings | RecoverySettings for the specified VirtualMachine.

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
SrmFaultVmNotFoundInRecoveryPlan | Thrown if the VirtualMachine is not in the RecoveryPlan

Events

Type
None

# ListPrompts

List the current prompts that are waiting use input.

When a prompt step is reached, the plan will be in a waiting state until the prompt is answered AnswerPrompt.

Prompts are returned in the order corresponding to the order VMs are scheduled to start up.

Required Privileges
  System.View

Parameters

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

Return Value

Type | Description
--- | ---
SrmRecoveryPlanRecoveryPrompt[] | A list of any pending prompts that need a user-response.

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.
SrmFaultInvalidState | Thrown if this recovery plan is not running.

Events

Type
None

# RecoveryPlanGetInfo

Retrieve basic information about this recovery plan.

Required Privileges
  System.View

Parameters

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

Return Value

Type | Description
--- | ---
SrmRecoveryPlanInfo |

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

# RecoveryPlanGetLocation

Check whether this recovery plan is hosted locally or on the paired site.

Required Privileges
  System.View
Since
  SRM API 5.0

Parameters

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

Return Value

Type | Description
--- | ---
xsd:string | The meanings of values are specified by the RecoveryPlanLocation constants.

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

# RecoveryPlanGetParentFolder

Parent folder.

Required Privileges
  System.View
Since
  SRM API 3.0

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the SrmRecoveryPlan 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

# RecoveryPlanGetPeer

Get the peer plan for this recovery plan. The returned object refers to a plan at the paired site, not the local site.

Required Privileges
  System.View

Parameters

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

Return Value

Type | Description
--- | ---
SrmRecoveryPlanPeer | The peer recovery 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.

Events

Type
None

# RecoveryPlanHasRunningTask

Required Privileges
  System.View
Since
  SRM API 5.0

Parameters

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

Return Value

Type | Description
--- | ---
xsd:boolean | True if there is a recovery task associated with the local 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.

Events

Type
None

# RemoveProtectionGroupFromRecoveryPlan

Remove a SrmProtectionGroup.

Required Privileges
  VcDr.ProtectionProfile.com.vmware.vcDr.Edit
Since
  SRM API 5.0

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the SrmRecoveryPlan used to make the method call.
group P | ManagedObjectReference to a SrmProtectionGroup | The ProtectionGroup that is to be removed Since SRM API 3.0

P Required privilege: group

Return Value

Type | Description
--- | ---
None

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.
SrmFaultNoPermission | Thrown if the given user has no permission for the folder where plan is located
SrmFaultProtectionGroupNotFound | Thrown if the ProtectionGroup no longer exists
SrmFaultRecoveryPlanLocked | Thrown if the plan is Locked/CheckedOut
SrmFaultVersionConflict | Thrown if a changeVersion value does not match

Events

Type
None

# RemoveTestNetworkMappingFromRecoveryPlan

Remove a test network mapping for the specified secondary site network.

Required Privileges
  VcDr.ProtectionProfile.com.vmware.vcDr.Edit
Since
  SRM API 5.0

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the SrmRecoveryPlan used to make the method call.
secondaryNetwork P | vim.Network | The secondary site network whose mapping is to be removed Since SRM API 5.0

P Required privilege: secondaryNetwork

Return Value

Type | Description
--- | ---
None

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.
SrmFaultConnectionDownFault | Thrown if the remote site could not be contacted
SrmFaultNetworkNotFound | Thrown if the test network mapping no longer exists
SrmFaultNoPermission | Thrown if the given user has no permission for the folder where plan is located
SrmFaultRecoveryPlanLocked |
SrmFaultRemoteSiteNotAuthenticated | Thrown if the remote site is not authenticated
SrmFaultVersionConflict | Thrown if a changeVersion value does not match

Events

Type
None

# SetRecoverySettings

Update the VirtualMachine's SrmRecoverySettings.

This method updates the specified virtual machine's SrmRecoverySettings with values contained in the user-supplied RecoverySettings object. Note that this call will not modify any recovery settings unavailable to the external API (e.g. dependent VMs and customized IP settings).

Required Privileges
  VcDr.ProtectionProfile.com.vmware.vcDr.Edit
Since
  SRM API 3.0

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the SrmRecoveryPlan used to make the method call.
vm P | vim.VirtualMachine | The VirtualMachine whose RecoverySettings are to be updated Since SRM API 3.0
settings P | SrmRecoverySettings | The updated RecoverySettings Since SRM API 3.0

P Required privilege - see tooltip for details

Return Value

Type | Description
--- | ---
None

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.
SrmFaultDependencyConflict |
SrmFaultInvalidArgument | Thrown if any of the arguments contains an invalid value
SrmFaultRecoveryPlanLocked | Thrown if the plan is Locked/CheckedOut
SrmFaultRecoveryPlanNotFound | Thrown if the RecoveryPlan no longer exists
SrmFaultVersionConflict | Thrown if a changeVersion value does not match
SrmFaultVmNotFoundInRecoveryPlan | Thrown if the VirtualMachine is not in the recovery plan

Events

Type
None

# Start

Deprecated. This method has been deprecated as of version 12. Users should not rely on it in production code, as it is not guaranteed to provide valid information in future releases. Instead, users should use StartEx_Task.

Start this recovery plan in the selected mode.

This operation requires one of the following privileges depending on the mode of recovery:

- VcDr.RecoveryProfile.com.vmware.vcDr.Failover for a real recovery
- VcDr.RecoveryProfile.com.vmware.vcDr.Run for a test recovery

Required Privileges
  None

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the SrmRecoveryPlan used to make the method call.
mode P | SrmRecoveryPlanRecoveryMode | The mode to run the recovery plan in. Since SRM API 2.0
options* P | SrmRecoveryOptions | The recovery options for this execution. Since SRM API 2.0

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

Return Value

Type | Description
--- | ---
None

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.
SrmFaultInvalidArgument | Thrown if the recovery mode is not valid.
SrmFaultInvalidState | Thrown if the recovery plan is not in the ready state.

Events

Type
None

# StartEx_Task

Start this recovery plan in the selected mode.

This operation requires one of the following privileges depending on the mode of recovery:

- VcDr.RecoveryProfile.com.vmware.vcDr.Failover for a real recovery
- VcDr.RecoveryProfile.com.vmware.vcDr.Run for a test recovery

Required Privileges
  None
Since
  SRM API 12.0

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the SrmRecoveryPlan used to make the method call.
mode P | SrmRecoveryPlanRecoveryMode | The mode to run the recovery plan in. Since SRM API 12.0
options* P | SrmRecoveryOptions | The recovery options for this execution. Since SRM API 12.0

*Need not be set 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.
SrmFaultInvalidArgument | Thrown if the recovery mode is not valid.
SrmFaultInvalidState | Thrown if the recovery plan is not in the ready state.

Events

Type
None