Resource Allocation
When you create a virtual machine, you always specify the resource pool that the virtual machine can draw resources from and optionally a host on which the virtual machine should run. You can access the resource pool as follows:
- Standalone host – When you callFolder.AddStandaloneHost_Task, the call returns aTaskobject that contains theComputeResource. TheComputeResource.resourcePoolproperty is the root resource pool associated with the compute resource (and with the host).
- Cluster – When you callFolder.CreateClusterEx, the method returns a managed object reference to aClusterComputeResourceinstance. BecauseClusterComputeResourceinherits all properties ofComputeResource, you can access the root folder through theClusterComputeResource.resourcePoolproperty.