UnassociateVms
This method removes the association of
one or more virtual machines from a specified vSphere Replication (VR) protection group.
Once a virtual machine is unassociated, it can no longer be protected.
Synopsis
void unassociateVms(vim.VirtualMachine[] vms)
vms[]
is an array of Virtual Machine objects to disassociate
from.Faults
- InvalidArgument - If the list of virtual machines is empty or null.
- InvalidState, if a specified VM was already associated with another group.
- RuntimeFault
- vim.fault.ConcurrentAccess, if another operation has modified the object and the change version no longer matches.
- vmodl.fault.NotSupported, if this protection group is not a VR group.
See Faults in Site Recovery Manager API for
more details.
Example for
UnassociateVms
srmPortType.unassociateVms( 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);