UnprotectVms

This method removes virtual machines from their protection group. With an array-based replication, the protection group is determined by datastore location of the virtual machines. With vSphere Replication, you must also
UnassociateVms
from the protection group. With the vVol replication, the protection group is determined by replication groups of the virtual machines.

Synopsis

ProtectionTask unprotectVms(vim.VirtualMachine[] vms)
vms[]
is an array Virtual Machine objects not to protect.
Protection Task is the task object to monitor for status of the requested virtual machines.

Faults

  • InvalidArgument - If the list of virtual machines is empty or null.
  • InvalidState, if a specified VM was not being protected.
  • RuntimeFault
Example for UnprotectVms
ManagedObjectReference taskRef = srmPortType.unprotectVms( 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);