Are you a service provider managing multiple clients and their vCenter servers? Have you developed your own custom tooling or a web based portal to manage your clients to individual vcenter servers/resource pools in your datacenter? Would you like to break free of the operational overhead of maintaining these environments yet at the same time give your clients a secure self-service portal?
vCloud Director for Service Providers v 8.20 has a new feature that lets service providers bring in existing vCenter servers in their datacenters to be managed by vCloud Director.
How does vCD do this? Let’s find out…
Below is a workflow of what the overall process looks like.
- Identify the vCenter servers you want to manage (Get their access information, along with the NSX Manager needed)
- Install NSX Manager (Optional, if you don’t have a NSX Manager mapped to vCenter Server)
- Install vCD 8.20 (optional, if you don’t have vCD in your environment /want to use a new setup)
- Create a map of which Client belongs to which vCenter or Resource pool within a vCenter (in case you are sharing a single vCenter with multiple clients)
- Make sure you have a parent RP or Cluster that will map to a Provider vDC in each vCenter server you want vCD to manage (If you have a cluster and individual resource pools mapped to clients then you don’t need to do much, if you have a client mapped to a cluster then you need to create a resource pools under the cluster such that everything else is within the parent resource pool you just created)
- Attach the vCenter Server and NSX Manager to vCD
- Create a Provider vDC for each of the vCenter Server you want vCD to adopt and use the vCenter server in step above
- Create an Organization in the Provider vDC for each client (map it to the Provider which will manage their current vCenter servers)
- Gather API references to the Organization, Provider vDC, Storage Policies, and the Resources Pool
- Optional: Validate the resource pools you want to adopt is valid
- Create a Org vDC in the Organization for sub-organization (like HR,Fin etc) and Attach the vCenter resources ( either a RP or a cluster ) to the Provider vDC with an API call
Let’s look at an example:
I have a vCD 8.20 already installed. I also have a vCenter server that has multiple clients and each client is in its own resource Pool.
vCenter Server Resource Pool Hierarchy
The goal is to let vCD manage this vCenter Server. In my case Client 1 is using the Resource Pool Client1 and the VM’s, Datastore and Networks in the cluster Cluster1.
I will be mapping the Cluster Cluster1 to a new Provider vDC in vCloud Director. Start by logging in to vCD and creating a Provider vDC.
First attach the vCenter server to the vCD by logging in as System Admin.
Once the vCenter is mapped and the Provider vDC ‘Adopted-VC-Provider‘is created, I create an Organization called ‘Client1‘
Get the Reference for the Organization you want to create the new Org vDC in, in our case ‘Client1‘ Org:
GET https://{{vcloud.example.com}}/api/admin/
Accept:application/*;version=27.0
Authorization:Basic YWRtaW5pc3RyYXRvckBzeXN0ZW06dm13YXJl
x-vcloud-authorization:{{x-vcloud-authorization}}
Identify the Href for Organization. In my case it’s ‘Client1′:
Get the Provider vDC Href from the same call:
Get the Reference for the Resource Pool you want to adopt , which should be part of this Provider vDC:
GET https://{{vcloud.example.com}}/api/admin/extension/providervdc/ba3bd40f-3ebf-4b3f-9222-18995cdab3dc/
Accept:application/*;version=27.0
Authorization:Basic YWRtaW5pc3RyYXRvckBzeXN0ZW06dm13YXJl
x-vcloud-authorization:{{x-vcloud-authorization}}
Identify the ‘discoverResourcePool’ reference from the response. See below:
Run the below call to list the available resource pools that are available to be adopted:
GET https://{{vcloud.example.com}}/api/admin/extension/providervdc/ba3bd40f-3ebf-4b3f-9222-18995cdab3dc/discoverResourcePools
Accept:application/*;version=27.0
Authorization:Basic YWRtaW5pc3RyYXRvckBzeXN0ZW06dm13YXJl
x-vcloud-authorization:{{x-vcloud-authorization}}
From the response identify and save the <ResourcePoolVImObjectRef> we will use this to construct the final API call to create the OrgvDC:
<vmext:ResourcePoolVimObjectRef>
<vmext:VimServerRef href=”https://10.134.3.58/api/admin/extension/vimServer/7f4ac92e-a28f-47b8-883c-d7a415fa6d4c” name=”adopted-vc” type=”application/vnd.vmware.admin.vmwvirtualcenter+xml”/>
<vmext:MoRef>resgroup-96
<vmext:VimObjectType>RESOURCE_POOL
</vmext:ResourcePoolVimObjectRef>
</vmext:VMWDiscoveredResourcePool>
</vmext:VMWDiscoveredResourcePools>
Finally, we construct the API call to create a OrgvDC with the above mentioned resourcePoolReference
<?xml version=”1.0″ encoding=”UTF-8″?>
<CreateVdcParams
name=”Client1-HR”
xmlns:vmext=”http://www.vmware.com/vcloud/extension/v1.5″
xmlns=”http://www.vmware.com/vcloud/v1.5″>
<Description>Example VDC</Description>
<AllocationModel>AllocationVApp</AllocationModel>
<ComputeCapacity>
<Cpu>
<Units>MHz</Units>
<Allocated>2048</Allocated>
<Limit>2048</Limit>
</Cpu>
<Memory>
<Units>MB</Units>
<Allocated>2048</Allocated>
<Limit>2048</Limit>
</Memory>
</ComputeCapacity>
<NicQuota>0</NicQuota>
<NetworkQuota>100</NetworkQuota>
<VdcStorageProfile>
<Enabled>true</Enabled>
<Units>MB</Units>
<Limit>20480</Limit>
<Default>true</Default>
<ProviderVdcStorageProfile
href=”https://10.134.3.58/api/admin/pvdcStorageProfile/deae40dd-34fc-47a6-bbf1-e95837b07285″/>
</VdcStorageProfile>
<ResourceGuaranteedMemory>1</ResourceGuaranteedMemory>
<ResourceGuaranteedCpu>1</ResourceGuaranteedCpu>
<VCpuInMhz>2048</VCpuInMhz>
<IsThinProvision>false</IsThinProvision>
<NetworkPoolReference
href=”https://vcloud.example.com/api/admin/extension/networkPool/313″/>
<ProviderVdcReference
name=”Adopted-vc-Provider”
href=”https://10.134.3.58/api/admin/providervdc/ba3bd40f-3ebf-4b3f-9222-18995cdab3dc” />
<ResourcePoolRefs>
<vmext:VimObjectRef >
<vmext:VimServerRef href=”https://10.134.3.58/api/admin/extension/vimServer/7f4ac92e-a28f-47b8-883c-d7a415fa6d4c”
name=”adopted-vc”
type=”application/vnd.vmware.admin.vmwvirtualcenter+xml”/>
<vmext:MoRef>resgroup-96</vmext:MoRef>
<vmext:VimObjectType>RESOURCE_POOL</vmext:VimObjectType>
</vmext:VimObjectRef>
</ResourcePoolRefs>
<UsesFastProvisioning>true</UsesFastProvisioning>
</CreateVdcParams>
Once the API call is successful, vCD will start managing the resource pool ‘Client1‘ . A system admin will then have to create users and Organization admin for the csutomer, in order for them to login and start consuming resources through vCD
Requirements:
- Each vCenter server you want to manage must have
- An NSX Manager managing it
- A DRS Cluster running on Automatic mode
- The Hardware version of the new Provider must map to the hardware version of the VM’s in the incoming resource pool