ListAssociatedVms
This method retrieves the virtual machines currently associated with a specified vSphere Replication protection group.
For the method to get a list of protection groups, see ListProtectionGroups.
Synopsis
vim.VirtualMachine[] listAssociatedVms( )
VirtualMachine[] is an array listing the associated virtual machines.
Faults
- RuntimeFault
- vmodl.fault.NotSupported, if this protection group is not a VR group.
For information about the faults that Site Recovery Manager throws, see Faults in Site Recovery Manager API.
Example for ListAssociatedVms
List < ManagedObjectReference > vms = srmPortType.listAssociatedVms(ManagedObjectReference _this); 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);