A VM group is a collection of virtual machines with similar host requirements. The virtual machines must all be in the same resource pool.
Prerequisites
You must be a system administrator to create or update a VM group.
Procedure
Example: Create a VM Group
The request body specifies a name for the group.
Request:
POST https://vcloud.example.com/api/admin/extension/resourcePool/83/vmGroups Content-type: application/vnd.vmware.admin.vmwVmGroupType+xml ... <VMWVmGroup xmlns="http://www.vmware.com/vcloud/extension/v1.5" xmlns:vcloud_v1.5="http://www.vmware.com/vcloud/v1.5"> <VmGroupName>ExampleGroup</VmGroupName> </VMWVmGroup>
The response is a Task. When the task completes, you can retrieve the
vmGroups in the resource pool to see the new VM Group. The system supplies a unique identifier and a count of VMs, initially 0, in the group.
GET https://vcloud.example.com/api/admin/extension/resourcePool/83/vmGroups ... <vmext:VMWVmGroups ...> <vmext:VmGroup href="https://vcloud.example.com/api/admin/extension/vmGroup/34"> <vcloud:Link rel="remove" href="https://vcloud.example.com/api/admin/extension/vmGroup/34" /> <vcloud:Link rel="down" href="https://vcloud.example.com/api/admin/extension/vmGroup/34/vmsList" type="application/vnd.vmware.vcloud.VmGroupVmsRecord+xml" /> <vcloud:Link rel="addVms" href="https://vcloud.example.com/api/admin/extension/vmGroup/name/foo/action/addVms" type="application/vnd.vmware.vcloud.vms+xml" /> <vcloud:Link rel="removeVms" href="https://vcloud.example.com/api/admin/extension/vmGroup/name/foo/action/removeVms" type="application/vnd.vmware.vcloud.vms+xml" /> <vmext:VmGroupId>34</vmext:VmGroupId> <vmext:VmGroupName>ExampleGroup</vmext:VmGroupName> <vmext:vmCount>0</vmext:vmCount> </vmext:VmGroup> ... </vmext:VMWVmGroups>