Error: "PlacementException NO_FEASIBLE_PLACEMENT_SOLUTION" when changing the storage policy of a VM
search cancel

Error: "PlacementException NO_FEASIBLE_PLACEMENT_SOLUTION" when changing the storage policy of a VM

book

Article ID: 434060

calendar_today

Updated On:

Products

VMware Cloud Director

Issue/Introduction

  • Updating Virtual Machine failed during storage policy change with error "PlacementException NO_FEASIBLE_PLACEMENT_SOLUTION"
  • You are trying to change a VM to a different Cluster using a different Storage Policy and Placement Policy
  • From the Cloud Director debug log, you will get error similar to:

com.vmware.vcloud.api.presentation.service.InternalServerErrorException: The operation failed because no suitable resource was found. Out of 3 candidate hubs: 
    2 hubs eliminated because: Does not contain required storage container(s): [[moref://########-###-###-###-############/Datastore#datastore-####1], [moref://########-###-###-###-############/Datastore#datastore-####2]]  Rejected hubs: resgroup-####3, resgroup-####4
    1 hubs eliminated because: No valid storage containers found for VirtualMachine "####-####-####-####-############". All 34 available storage containers were filtered out as being invalid.  Rejected hubs: resgroup-####5
Storage containers were rejected for the following reasons: 
    33 storage containers rejected because: They are not in the list of required datastores .....

    1 storage containers rejected because: They do not support the required storage policy:<STORAGE_POLICY_NAME>.  Rejected storage containers: <STORAGE_CONTAINER_NAME>
    at com.vmware.vcloud.placement.PlacementExceptionHandler.convertPlacementException(PlacementExceptionHandler.java:78)
    at com.vmware.vcloud.placementfacade.impl.PlacementServiceFacadeImpl.computePlacementSolution(PlacementServiceFacadeImpl.java:1057)
    at com.vmware.vcloud.placementfacade.impl.PlacementServiceFacadeImpl.computePlacementSolution(PlacementServiceFacadeImpl.java:1040)
    at com.vmware.vcloud.placementfacade.impl.PlacementServiceFacadeImpl.getPlacementState(PlacementServiceFacadeImpl.java:929)
    at com.vmware.ssdc.backend.services.impl.VmManagerImpl.getSubjectAssignmentForVmDuringReconfigure(VmManagerImpl.java:3550)
    at com.vmware.ssdc.backend.services.impl.VmManagerImpl.updateVmStorageClassAndVdcComputePolicy(VmManagerImpl.java:3390)
    at jdk.internal.reflect.GeneratedMethodAccessor12587.invoke(Unknown Source) ...

Caused by: com.vmware.pbm.placement.PlacementException: PlacementException NO_FEASIBLE_PLACEMENT_SOLUTION
    at com.vmware.vcloud.placement.engine.impl.PlacementSolverImpl.constructPlacementException(PlacementSolverImpl.java:138)
    at com.vmware.vcloud.placement.engine.impl.PlacementSolverImpl.ensureHubAvailability(PlacementSolverImpl.java:750)
    at com.vmware.vcloud.placement.engine.impl.PlacementSolverImpl.solve(PlacementSolverImpl.java:182)
    at jdk.internal.reflect.GeneratedMethodAccessor10016.invoke(Unknown Source) ...

Environment

VMware Cloud Director 10.6.1.2

Cause

This is an expected behavior in Cloud Director when the destination Placement Policy for a VM when changing the Storage Policy differs from the Placement Policy the VM is currently placed.

Resolution

Two methods are available to change the Storage Policy and the Placement Policy available on destination.

Workaround

1. Method via Clooud Director UI

  1. From the Tenant portal, select the VM you will need to change the Storage policy.
  2. Click Edit and then remove the current Placement Policy and change the Storage Policy and click Save.
  3. Once the task has completed, and the VM is placed on the new Storage Policy. Click edit again and add the Placement Policy you will require and click Save.

2. Method via API

To change the Storage Policy and the Placement Policy at the same time, you will need to use the POST /vApp/{id}/action/reconfigureVm