CreateHbrProtectionGroup

Create a host based replication (vSphere replication) protection group using the provided VMs. This method does not automatically protect VMs on the storage array. Programs must call ProtectVms() separately for VMs on the storage array to be protected.

Note: The protection group name cannot be the same as the folder in which it will be created.

Synopsis

CreateProtectionGroupTask createHbrProtectionGroup(Folder location, String name,@optional String description, vim.VirtualMachine[] vms)
Parameter Description
location folder in which to create the protection group
name the name of the protection group
description an optional description of the protection group
vms virtual machines to associate with the new protection group. The virtual machine list cannot be empty.

Returns CreateProtectionGroupTask to monitor the asynchronous operation of this method. For more information, see Create Protection Group Task.

Faults

  • InternalError
  • InvalidArgument
  • InvalidType
  • ReplicationProviderFault
  • RuntimeFault

See Faults in Site Recovery Manager API for more details.

CreateHbrProtectionGroup

ManagedObjectReference hbrGroupRef = srmPortType.createHbrProtectionGroup(ManagedObjectReference _this,
  ManagedObjectReference location,
  String name,
  String description,
  List < ManagedObjectReference > vms);

Where ManagedObjectReference _this = _protectionRef;
where _protectionRef can be taken from:
  SrmServiceInstanceContent content = _srmPortType.retrieveContent(_svcRef);
ManagedObjectReference _protectionRef = content.getProtection();

The following exceptions are presented by the CreateProtectionGroupTask instance that is returned by the CreateAbrProtectionGroup and CreateHbrProtectionGroup methods:

  • ConnectionDownFault if the other site involved in the operation could not be contacted.
  • DuplicateName if a group with this name already exists.
  • StringArgumentTooLong if the size of either name or description in the settings parameter is too long.