server: allow migration of all VMs with local storage on KVM (#7656)

This PR enables systemvm and VR migration on KVM with local storage.

Fixes: #7651
This commit is contained in:
dahn 2023-07-18 09:19:17 +02:00 committed by GitHub
parent 981d74825a
commit d575cae3e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1411,7 +1411,8 @@ public class ManagementServerImpl extends ManagerBase implements ManagementServe
// Check if the vm can be migrated with storage. // Check if the vm can be migrated with storage.
boolean canMigrateWithStorage = false; boolean canMigrateWithStorage = false;
if (VirtualMachine.Type.User.equals(vm.getType()) || HypervisorType.VMware.equals(vm.getHypervisorType())) { List<HypervisorType> hypervisorTypes = Arrays.asList(new HypervisorType[]{HypervisorType.VMware, HypervisorType.KVM});
if (VirtualMachine.Type.User.equals(vm.getType()) || hypervisorTypes.contains(vm.getHypervisorType())) {
canMigrateWithStorage = _hypervisorCapabilitiesDao.isStorageMotionSupported(srcHost.getHypervisorType(), srcHostVersion); canMigrateWithStorage = _hypervisorCapabilitiesDao.isStorageMotionSupported(srcHost.getHypervisorType(), srcHostVersion);
} }