ProtectVms

This method adds virtual machines to a protection group. With array based replication, the protection group is determined by datastore location of the virtual machines. With host based replication (vSphere replication), you can use the AssociateVms method to place virtual machines into a protection group. 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.

Synopsis

ProtectionTask protectVms(ProtectionGroup.VmProtectionSpec[] vms)

vms[] is an array of managed object references to the Virtual Machine objects for protection.

ProtectionTask is the task object to monitor for status of the requested virtual machines.

Faults

  • RuntimeFault

Example for ProtectVms

SrmProtectionTaskRef = _service.ProtectVms(_svcRef, vm[] );