mirror of https://github.com/apache/cloudstack.git
CLOUDSTACK-7400: Allow migration of systemVms in LXC. USer Vms cannot be migrated
This commit is contained in:
parent
08dc5c6f91
commit
55983d47c0
|
|
@ -1123,13 +1123,17 @@ public class ManagementServerImpl extends ManagerBase implements ManagementServe
|
|||
}
|
||||
|
||||
if (!vm.getHypervisorType().equals(HypervisorType.XenServer) && !vm.getHypervisorType().equals(HypervisorType.VMware) && !vm.getHypervisorType().equals(HypervisorType.KVM)
|
||||
&& !vm.getHypervisorType().equals(HypervisorType.Ovm) && !vm.getHypervisorType().equals(HypervisorType.Hyperv)) {
|
||||
&& !vm.getHypervisorType().equals(HypervisorType.Ovm) && !vm.getHypervisorType().equals(HypervisorType.Hyperv) && !vm.getHypervisorType().equals(HypervisorType.LXC)) {
|
||||
if (s_logger.isDebugEnabled()) {
|
||||
s_logger.debug(vm + " is not XenServer/VMware/KVM/OVM/Hyperv, cannot migrate this VM.");
|
||||
}
|
||||
throw new InvalidParameterValueException("Unsupported Hypervisor Type for VM migration, we support " + "XenServer/VMware/KVM/Ovm/Hyperv only");
|
||||
}
|
||||
|
||||
if (vm.getType().equals(VirtualMachine.Type.User) && vm.getHypervisorType().equals(HypervisorType.LXC)) {
|
||||
throw new InvalidParameterValueException("Unsupported Hypervisor Type for User VM migration, we support XenServer/VMware/KVM/Ovm/Hyperv only");
|
||||
}
|
||||
|
||||
long srcHostId = vm.getHostId();
|
||||
Host srcHost = _hostDao.findById(srcHostId);
|
||||
if (srcHost == null) {
|
||||
|
|
|
|||
|
|
@ -3867,13 +3867,17 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager, Vir
|
|||
|
||||
if (!vm.getHypervisorType().equals(HypervisorType.XenServer) && !vm.getHypervisorType().equals(HypervisorType.VMware) && !vm.getHypervisorType().equals(HypervisorType.KVM)
|
||||
&& !vm.getHypervisorType().equals(HypervisorType.Ovm) && !vm.getHypervisorType().equals(HypervisorType.Hyperv)
|
||||
&& !vm.getHypervisorType().equals(HypervisorType.Simulator)) {
|
||||
&& !vm.getHypervisorType().equals(HypervisorType.LXC) && !vm.getHypervisorType().equals(HypervisorType.Simulator)) {
|
||||
if (s_logger.isDebugEnabled()) {
|
||||
s_logger.debug(vm + " is not XenServer/VMware/KVM/Ovm/Hyperv, cannot migrate this VM.");
|
||||
}
|
||||
throw new InvalidParameterValueException("Unsupported Hypervisor Type for VM migration, we support XenServer/VMware/KVM/Ovm/Hyperv only");
|
||||
}
|
||||
|
||||
if (vm.getType().equals(VirtualMachine.Type.User) && vm.getHypervisorType().equals(HypervisorType.LXC)) {
|
||||
throw new InvalidParameterValueException("Unsupported Hypervisor Type for User VM migration, we support XenServer/VMware/KVM/Ovm/Hyperv only");
|
||||
}
|
||||
|
||||
if (isVMUsingLocalStorage(vm)) {
|
||||
if (s_logger.isDebugEnabled()) {
|
||||
s_logger.debug(vm + " is using Local Storage, cannot migrate this VM.");
|
||||
|
|
|
|||
Loading…
Reference in New Issue