A host group is a vSphere host DRS group. A vSphere administrator must create host DRS groups in a resource pool mapped to a VMware Cloud Director Provider VDC before they can be used in VMware Cloud Director VM-Host affinity rules.
vSphere host DRS groups created in resource pools that are mapped to a Provider VDC appear in those resource pools and can be named in VM-Host affinity rules. For more information about host DRS groups, see the VMware vSphere ESXi and vCenter Server Documentation.
Procedure
- ♦ Host groups are properties of a resource pool. Select a resource pool from the Resource Pools list under vSphere Properties.
Host DRS groups in the resource pool are listed on its Host Groups tab.To retrieve the list of host groups in a resource pool, use a request like the one shown in Host Groups in a Resource Pool
Example: Host Groups in a Resource Pool
The
VMWProviderVdcResourcePoolSet element of a
VMWProviderVdc response includes a link of this form.
<vcloud:Link rel="down" href="https://vcloud.example.com/api/admin/extension/resourcePool/id/hostGroups" type="application/vnd.vmware.admin.vmwHostGroupsType+xml" />You can make a GET request to this link to list all vSphere host DRS groups created in that resource pool.
Request:
GET https://vcloud.example.com/api/admin/extension/resourcePool/83/hostGroups
This response shows a single host DRS group that includes two hosts.
Response:
<?xml version="1.0" encoding="UTF-8"?> <vmext:VMWHostGroups xmlns:vmext="http://www.vmware.com/vcloud/extension/v1.5" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ... > <vmext:HostGroup> <vmext:HostGroupName>HostGroup-MSSQL</vmext:HostGroupName> <vmext:Hosts type="application/vnd.vmware.admin.vmwHostReferences+xml"> <vmext:HostReference href="https://vcloud.example.com/api/admin/extension/host/95" name="ESXi37" type="application/vnd.vmware.admin.host+xml" /> <vmext:HostReference href="https://vcloud.example.com/api/admin/extension/host/28" name="ESXi39" type="application/vnd.vmware.admin.host+xml" /> </vmext:Hosts> </vmext:HostGroup> </vmext:VMWHostGroups>