Log is needed to tell what's wrong.

Basically it means you don't have enough resources(host or network or
storage) to deploy the vm.

--Sheng


On Tue, Sep 24, 2013 at 12:27 AM, Jake.liu <heids...@sina.com> wrote:

>    DeployDestination dest;
>         try {
>             dest = _dpMgr.planDeployment(vmProfile, plan, exclude);
>         } catch (AffinityConflictException e) {
>             throw new CloudRuntimeException("Unable to create deployment,
> affinity rules associted to the VM conflict");
>         }
>
>
>         if (dest != null) {
>            //save destination with VMEntityVO
>             VMReservationVO vmReservation = new
> VMReservationVO(vm.getId(), dest.getDataCenter().getId(),
> dest.getPod().getId(), dest.getCluster().getId(), dest.getHost().getId());
>             Map<Long,Long> volumeReservationMap = new HashMap<Long,Long>();
>
>
>             if (vm.getHypervisorType() != HypervisorType.BareMetal) {
>                 for(Volume vo : dest.getStorageForDisks().keySet()){
>                     volumeReservationMap.put(vo.getId(),
> dest.getStorageForDisks().get(vo).getId());
>                 }
>                 vmReservation.setVolumeReservation(volumeReservationMap);
>             }
>
>
>             vmEntityVO.setVmReservation(vmReservation);
>             _vmEntityDao.persist(vmEntityVO);
>
>
>             return vmReservation.getUuid();
>         } else if (planChangedByReadyVolume) {
>             // we could not reserve in the Volume's cluster - let the
> deploy
>             // call retry it.
>             return UUID.randomUUID().toString();
>         }else{
>             throw new InsufficientServerCapacityException("Unable to
> create a deployment for " + vmProfile,
>                     DataCenter.class, plan.getDataCenterId(),
> areAffinityGroupsAssociated(vmProfile));
>         }

Reply via email to