diff --git a/api/src/org/apache/cloudstack/api/command/admin/host/FindHostsForMigrationCmd.java b/api/src/org/apache/cloudstack/api/command/admin/host/FindHostsForMigrationCmd.java index e6e45cc7246..b2d77b85dd2 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/host/FindHostsForMigrationCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/host/FindHostsForMigrationCmd.java @@ -45,7 +45,7 @@ public class FindHostsForMigrationCmd extends BaseListCmd { ///////////////////////////////////////////////////// @Parameter(name=ApiConstants.VIRTUAL_MACHINE_ID, type=CommandType.UUID, entityType = UserVmResponse.class, - required=false, description="find hosts to which this VM can be migrated and flag the hosts with enough " + + required=true, description="find hosts to which this VM can be migrated and flag the hosts with enough " + "CPU/RAM to host the VM") private Long virtualMachineId; diff --git a/server/src/com/cloud/server/ManagementServerImpl.java b/server/src/com/cloud/server/ManagementServerImpl.java index f74b7ad964c..06c0f964ccb 100755 --- a/server/src/com/cloud/server/ManagementServerImpl.java +++ b/server/src/com/cloud/server/ManagementServerImpl.java @@ -1086,17 +1086,16 @@ public class ManagementServerImpl extends ManagerBase implements ManagementServe VMInstanceVO vm = _vmInstanceDao.findById(vmId); if (vm == null) { - InvalidParameterValueException ex = new InvalidParameterValueException("Unable to find the VM with specified id"); - ex.addProxyObject(vm, vmId, "vmId"); + InvalidParameterValueException ex = new InvalidParameterValueException("Unable to find the VM with given id"); throw ex; } if (vm.getState() != State.Running) { if (s_logger.isDebugEnabled()) { - s_logger.debug("VM is not Running, unable to migrate the vm" + vm); + s_logger.debug("VM is not running, cannot migrate the vm" + vm); } - InvalidParameterValueException ex = new InvalidParameterValueException("VM is not Running, unable to" + - " migrate the vm with specified id"); + InvalidParameterValueException ex = new InvalidParameterValueException("VM is not Running, cannot " + + "migrate the vm with specified id"); ex.addProxyObject(vm, vmId, "vmId"); throw ex; }