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 call Folder.AddStandaloneHost_Task, the call returns a Task object that contains the ComputeResource. The ComputeResource.resourcePool property is the root resource pool associated with the compute resource (and with the host).
■ Cluster – When you call Folder.CreateClusterEx, the method returns a managed object reference to a ClusterComputeResource instance. Because ClusterComputeResource inherits all properties of ComputeResource, you can access the root folder through the ClusterComputeResource.resourcePool property.Resource pool hierarchies allow detailed control over which virtual machines are allowed how many resources.For example, assume a standalone host has several virtual machines. The marketing department uses three of the virtual machines and the QA department uses two virtual machines. Because the QA department needs larger amounts of CPU and memory, the administrator creates one resource pool for each group. The administrator sets CPU Shares to High for the QA department pool and to Normal for the Marketing department pool so that the QA department users can run automated tests. The second resource pool with fewer CPU and memory resources is sufficient for the lighter load of the marketing staff. Whenever the QA department is not fully using its allocation, the marketing department can use the available resources.
■ Do not overcommit resource pool resources. The sum of all child pools should always be less than (not equal to or more than) the parent. For example, if four child resource pool reservations total 40 gigabytes and the parent resource pool has a reservation of 60 gigabytes, you have some room to create another resource pool. However, if the four child resource pool reservations total 60 gigabytes, you do not. For virtual machine, some overcommitment of resources is supported. See the technical white papers on the VMware web site.
■ Before creating new child resource pools, check available resources in the parent pool. The ResourcePool.runtimeInfo property is a ResourcePoolRuntimeInfo data object. ResourcePoolRuntimeInfo.cpu and ResourcePoolRuntimeInfo.memory properties are ResourcePoolResourceUsage objects with resource usage information, including an unreservedForPool property. If the parent resource pool does not have enough available resources, reconfigure the reservation values of child pools before adding the new pool.
■ Reconfigure child resource pools first, to ensure that the reservation properties of each child do not absorb all the resources of the parent.vSphere supports grouping ESX/ESXi hosts that are managed by the same vCenter Server system into clusters. Clusters take advantage of features such as VMware DRS and VMware HA.
■ VMware HA (VMware High Availability) migrates virtual machine from one host in a cluster to another host, in the event of host failure.
■ VMware DRS (VMware Distributed Resource Scheduler, provides dynamic redistribution of resources. DRS also includes support for Distributed Power Management (DTM), which makes recommendations or decisions to power off hosts and power them on again as needed, to save energy.You can set up VMware DRS to automatically migrate virtual machines, or to display recommendations if resources are not used efficiently across the datacenter.