ProtectionGroupQueryVmProtection

Determine whether the specified virtual machines are currently protected, or can be protected. To protect a Virtual Machine, its folder, resource pool, and network must be mapped from the protected site to the recovery site.
To get a list of currently configured mappings, see ListInventoryMappings. You can also query replicated datastores with ListReplicatedDatastores.

Synopsis

ProtectionGroup.VmProtectionInfo[] ProtectionGroupQueryVmProtection(vim.VirtualMachine[] vms)
vms[]
is an array of managed object references to VirtualMachine objects.
VmProtectionInfo[]
is an array of VmProtectionInfo data objects with the following fields:
Fields
Description
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

Faults

  • RuntimeFault
Example for ProtectionGroupQueryVmProtection
List < SrmProtectionGroupVmProtectionInfo > protection = srmPortType.protectionGroupQueryVmProtection( ManagedObjectReference _this, List < ManagedObjectReference > vms); Where ManagedObjectReference _this = _protectionGroupRef; where _protectionGroupRef can be taken from: SrmServiceInstanceContent content = _srmPortType.retrieveContent(_svcRef); ManagedObjectReference _protectionRef = content.getProtection(); List < ManagedObjectReference > groups = srmPortType.listProtectionGroups(_protectionRef); _protectionGroupRef = groups.get(0);