code: func (vm *VirtualMachine) GetResourcePool(ctx context.Context) (*object.ResourcePool, error) {
  	vmMoList, err := vm.Datacenter.GetVMMoList(ctx, []*VirtualMachine{vm}, []string{"resourcePool"})
  	if err != nil {
  		klog.Errorf("Failed to get resource pool from VM: %q. err: %+v", vm.InventoryPath, err)
  		return nil, err
  	}
  	return object.NewResourcePool(vm.Client(), vmMoList[0].ResourcePool.Reference()), nil
  }
docs: // GetResourcePool gets the resource pool for VM.