final ResourceAllocationInfo memAllocation,
final boolean force) throws Exception
{
final ResourceConfigSpec spec = new ResourceConfigSpecImpl(
null, null, null, cpuAllocation, memAllocation);
ManagedObjectReference ref =
VcContext.getTaskMgr().execPseudoTask("ResourcePool.createResourcePool",
VcEventType.ResourcePoolCreated, getMoRef(),
new IVcPseudoTaskBody() {
@Override
public final ManagedObjectReference body() throws Exception {
final ResourcePool rp = getManagedObject();
ManagedObjectReference child = null;
//at least execute once
while (true) {
try {
child = rp.createResourcePool(name, spec);
break;