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

NameTypeDescription
_thisManagedObjectReference A reference to the SrmRecoveryPlan used to make the method call.
group PManagedObjectReference
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.RuntimeFaultThrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.
SrmFaultInvalidArgumentThrown if the ProtectionGroup already exists
SrmFaultNoPermissionThrown if the given user has no permission for the folder where plan is located
SrmFaultProtectionGroupNotFoundThrown if the ProtectionGroup no longer exists
SrmFaultRecoveryPlanLockedThrown if the plan is Locked/CheckedOut
SrmFaultVersionConflictThrown 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

NameTypeDescription
_thisManagedObjectReference A reference to the SrmRecoveryPlan used to make the method call.
secondaryNetwork Pvim.Network

The network on the recovery site (must be remote)

Since SRM API 5.0
testNetwork Pvim.Network

The test network on the recovery site (must be remote)

Since SRM API 5.0
PRequired privilege - see tooltip for details

Return Value

Type Description
None

Faults

Type Description
vmodl.RuntimeFaultThrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.
SrmFaultConnectionDownFaultThrown if the remote site could not be contacted
SrmFaultInvalidPrimaryNetwork
SrmFaultInvalidSecondaryNetwork
SrmFaultNoPermissionThrown if the given user has no permission for the folder where plan is located
SrmFaultRecoveryPlanLockedThrown if the plan is Locked/CheckedOut
SrmFaultRemoteSiteNotAuthenticatedThrown if the remote site is not authenticated
SrmFaultRemoteSiteNotEnabledThrown if the remote site is not found
SrmFaultUnknownPrimaryNetwork
SrmFaultUnknownSecondaryNetwork
SrmFaultVersionConflictThrown 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:

Required Privileges
None

Parameters

NameTypeDescription
_thisManagedObjectReference A reference to the SrmRecoveryPlan used to make the method call.
key Pxsd:string

The key value from the RecoveryPrompt.

Since SRM API 2.0
cancelVmRecovery Pxsd:boolean

Settings this parameter to true will halt further processing on this VM.

Since SRM API 2.0
response* Pxsd:string

A response to the prompt that will be recorded.

Since SRM API 2.0
*Need not be set PRequired privilege - see tooltip for details

Return Value

Type Description
None

Faults

Type Description
vmodl.RuntimeFaultThrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.
SrmFaultInvalidStateThrown if this recovery plan is not running.
SrmFaultPromptNotFoundThrown 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:

Required Privileges
None

Parameters

NameTypeDescription
_thisManagedObjectReference A reference to the SrmRecoveryPlan used to make the method call.

Return Value

Type Description
None

Faults

Type Description
vmodl.RuntimeFaultThrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.
SrmFaultInvalidStateThrown 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

NameTypeDescription
_thisManagedObjectReference A reference to the SrmRecoveryPlan used to make the method call.
vm Pvim.VirtualMachine

The VirtualMachine whose RecoverySettings are to be retrieved

Since SRM API 3.0
P Required privilege: vm

Return Value

Type Description
SrmRecoverySettingsRecoverySettings for the specified VirtualMachine.

Faults

Type Description
vmodl.RuntimeFaultThrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.
SrmFaultRecoveryPlanNotFoundThrown if the RecoveryPlan no longer exists
SrmFaultVmNotFoundInRecoveryPlanThrown 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

NameTypeDescription
_thisManagedObjectReference 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.RuntimeFaultThrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.
SrmFaultInvalidStateThrown if this recovery plan is not running.

Events

Type
None



RecoveryPlanGetInfo

Retrieve basic information about this recovery plan.
Required Privileges
System.View

Parameters

NameTypeDescription
_thisManagedObjectReference A reference to the SrmRecoveryPlan used to make the method call.

Return Value

Type Description
SrmRecoveryPlanInfo

Faults

Type Description
vmodl.RuntimeFaultThrown 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

NameTypeDescription
_thisManagedObjectReference A reference to the SrmRecoveryPlan used to make the method call.

Return Value

Type Description
xsd:stringThe meanings of values are specified by the RecoveryPlanLocation constants.

Faults

Type Description
vmodl.RuntimeFaultThrown 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

NameTypeDescription
_thisManagedObjectReference A reference to the SrmRecoveryPlan used to make the method call.

Return Value

Type Description
ManagedObjectReference
to a SrmRecoveryPlanFolder

Faults

Type Description
vmodl.RuntimeFaultThrown 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

NameTypeDescription
_thisManagedObjectReference A reference to the SrmRecoveryPlan used to make the method call.

Return Value

Type Description
SrmRecoveryPlanPeerThe peer recovery plan.

Faults

Type Description
vmodl.RuntimeFaultThrown 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

NameTypeDescription
_thisManagedObjectReference A reference to the SrmRecoveryPlan used to make the method call.

Return Value

Type Description
xsd:booleanTrue if there is a recovery task associated with the local plan.

Faults

Type Description
vmodl.RuntimeFaultThrown 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

NameTypeDescription
_thisManagedObjectReference A reference to the SrmRecoveryPlan used to make the method call.
group PManagedObjectReference
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.RuntimeFaultThrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.
SrmFaultNoPermissionThrown if the given user has no permission for the folder where plan is located
SrmFaultProtectionGroupNotFoundThrown if the ProtectionGroup no longer exists
SrmFaultRecoveryPlanLockedThrown if the plan is Locked/CheckedOut
SrmFaultVersionConflictThrown 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

NameTypeDescription
_thisManagedObjectReference A reference to the SrmRecoveryPlan used to make the method call.
secondaryNetwork Pvim.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.RuntimeFaultThrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.
SrmFaultConnectionDownFaultThrown if the remote site could not be contacted
SrmFaultNetworkNotFoundThrown if the test network mapping no longer exists
SrmFaultNoPermissionThrown if the given user has no permission for the folder where plan is located
SrmFaultRecoveryPlanLocked
SrmFaultRemoteSiteNotAuthenticatedThrown if the remote site is not authenticated
SrmFaultVersionConflictThrown 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

NameTypeDescription
_thisManagedObjectReference A reference to the SrmRecoveryPlan used to make the method call.
vm Pvim.VirtualMachine

The VirtualMachine whose RecoverySettings are to be updated

Since SRM API 3.0
settings PSrmRecoverySettings

The updated RecoverySettings

Since SRM API 3.0
PRequired privilege - see tooltip for details

Return Value

Type Description
None

Faults

Type Description
vmodl.RuntimeFaultThrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.
SrmFaultDependencyConflict
SrmFaultInvalidArgumentThrown if any of the arguments contains an invalid value
SrmFaultRecoveryPlanLockedThrown if the plan is Locked/CheckedOut
SrmFaultRecoveryPlanNotFoundThrown if the RecoveryPlan no longer exists
SrmFaultVersionConflictThrown if a changeVersion value does not match
SrmFaultVmNotFoundInRecoveryPlanThrown 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:

Required Privileges
None

Parameters

NameTypeDescription
_thisManagedObjectReference A reference to the SrmRecoveryPlan used to make the method call.
mode PSrmRecoveryPlanRecoveryMode

The mode to run the recovery plan in.

Since SRM API 2.0
options* PSrmRecoveryOptions

The recovery options for this execution.

Since SRM API 2.0
*Need not be set PRequired privilege - see tooltip for details

Return Value

Type Description
None

Faults

Type Description
vmodl.RuntimeFaultThrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.
SrmFaultInvalidArgumentThrown if the recovery mode is not valid.
SrmFaultInvalidStateThrown 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:

Required Privileges
None
Since
SRM API 12.0

Parameters

NameTypeDescription
_thisManagedObjectReference A reference to the SrmRecoveryPlan used to make the method call.
mode PSrmRecoveryPlanRecoveryMode

The mode to run the recovery plan in.

Since SRM API 12.0
options* PSrmRecoveryOptions

The recovery options for this execution.

Since SRM API 12.0
*Need not be set PRequired privilege - see tooltip for details

Return Value

Type Description
ManagedObjectReference
to a SrmExtApiTask

Faults

Type Description
vmodl.RuntimeFaultThrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.
SrmFaultInvalidArgumentThrown if the recovery mode is not valid.
SrmFaultInvalidStateThrown if the recovery plan is not in the ready state.

Events

Type
None