Site Recovery Manager API Developer's Guide
AssociateVms
This method associates one or more virtual machines with a specified VR protection group. Before you can
protect a virtual machine, it must first be associated with a protection group.
Example 3-41. Method to associate virtual machines with a protection group
void _service.AssociateVms(_svcPtGrp, VirtualMachine[] );
Parameters:
_svcPtGrp – managed object reference to an SrmProtectionGroup object
VirtualMachine[] – an array of managed object references to VirtualMachine object(s)
UnassociateVms
This method removes the association of one or more virtual machines with a specified VR protection group.
Once a virtual machine is unassociated, it can no longer be protected.
Example 3-42. Method to unassociate virtual machines with protection group
void _service.UnssociateVms(_svcPtGrp, VirtualMachine[] );
Parameters:
_svcPtGrp – managed object reference to an SrmProtectionGroup object
VirtualMachine[] – an array of managed object references to VirtualMachine object(s)
32
VMware, Inc.