bug 11377: remove the restriction on VMware in API layer to let it support VM manual migration

This commit is contained in:
Kelven Yang 2011-09-12 14:27:14 -07:00
parent d828f4e434
commit 41926cb038
2 changed files with 5 additions and 5 deletions

View File

@ -1278,11 +1278,11 @@ public class ManagementServerImpl implements ManagementServer {
throw new InvalidParameterValueException("VM is not Running, unable to migrate the vm " + vm);
}
if (!vm.getHypervisorType().equals(HypervisorType.XenServer)) {
if (!vm.getHypervisorType().equals(HypervisorType.XenServer) && !vm.getHypervisorType().equals(HypervisorType.VMware)) {
if (s_logger.isDebugEnabled()) {
s_logger.debug(vm + " is not XenServer, cannot migrate this VM.");
s_logger.debug(vm + " is not XenServer/VMware, cannot migrate this VM.");
}
throw new InvalidParameterValueException("Unsupported Hypervisor Type for VM migration, we support XenServer only");
throw new InvalidParameterValueException("Unsupported Hypervisor Type for VM migration, we support XenServer/VMware only");
}
ServiceOfferingVO svcOffering = _offeringsDao.findById(vm.getServiceOfferingId());
if (svcOffering.getUseLocalStorage()) {

View File

@ -3260,9 +3260,9 @@ public class UserVmManagerImpl implements UserVmManager, UserVmService, Manager
}
throw new InvalidParameterValueException("VM is not Running, unable to migrate the vm " + vm);
}
if (!vm.getHypervisorType().equals(HypervisorType.XenServer)) {
if (!vm.getHypervisorType().equals(HypervisorType.XenServer) && !vm.getHypervisorType().equals(HypervisorType.VMware)) {
if (s_logger.isDebugEnabled()) {
s_logger.debug(vm + " is not XenServer, cannot migrate this VM.");
s_logger.debug(vm + " is not XenServer/VMware, cannot migrate this VM.");
}
throw new InvalidParameterValueException("Unsupported Hypervisor Type for VM migration, we support XenServer only");
}