Site Recovery Manager API Developer's Guide
protectedVm – the protected virtual machine identifier on the local site
state – the protection state of this particular virtual machine
vm – the locally protected virtual machine (this reference is valid after reprotect or revert operations)
ProtectionGroupQueryVmProtection
Determine whether the specified VMs are currently protected, or can be protected. The virtual machine and
its folder, resource pool, and network must be inventory mapped to the recovery site. To get a list of currently
configured mappings, see "ListInventoryMappings" on page 22.
Example 3-23. Method to query virtual machine protection
protectInfo[] = _service.ProtectionGroupQueryVmProtection(_svcPtGrp, vms[]);
Parameters and return value:
_svcPtGrp – managed object reference to an SrmProtectionGroup object
vms[] – array of managed object references to VirtualMachine objects
protectInfo[] – array of SrmProtectionGroupVmProtectionInfo data objects with the following fields:
faults – any faults encountered while processing queryVmProtection for this virtual machine
peerProtectedVm – the protected virtual machine identifier on the remote site
protectedVm – the protected virtual machine identifier on the local site
protectionGroup – the group this virtual machine is a member of, if it is protected
protectionGroupName – the name of this virtual machine's protection group, if it is protected
recoveryPlanNames – the name(s) of any recovery plans the virtual machine will be recovered in
recoveryPlans – any recovery plans the virtual machine will be recovered in
status – the current protection status of the virtual machine
vm – the virtual machine for which protection status is being returned
You can also query replicated datastores with "ListReplicatedDatastores" on page 22.
ProtectionGroupListRecoveryPlans
This method retrieves a list of all the recovery plans that this protection group is a member of.
Example 3-24. Method to list a protection group's recovery plans
plans[] = _service.ProtectionGroupListRecoveryPlans(_svcPtGrp);
Parameters and return value:
_svcPtGrp – managed object reference to an SrmProtectionGroup object
plans[] – array of managed object references to SrmRecoveryPlan objects
Recovery Plans and Reprotection
This section covers the Site Recovery Manager API methods for recovery plans and reprotection.
You can set the recovery point objective (RPO), a desired time period for rerunning replication to avoid data
loss, using a slider in the vSphere Client. This is also where you can configure guest OS quiescing.
You can also set the recovery priority of virtual machines as part of running a recovery plan.
26
VMware, Inc.
Need help?
Do you have a question about the VC-SRM4-A - vCenter Site Recovery Manager and is the answer not in the manual?