mirror of
https://github.com/OpenNebula/one.git
synced 2026-12-06 15:13:39 +09:00
M #-: Fix host capacity accounting for datastore-only migrations
Only add or remove host capacity during migrations when the VM changes
hosts. Datastore-only migrations keep the existing host allocation, to
prevent removing the VM from the host VM collection.
(cherry picked from commit 23aba3ee81)
This commit is contained in:
3 files changed
+24
-8
No files matched your search
@@ -1009,7 +1009,8 @@ Request::ErrorCode VirtualMachineAPI::migrate(int vid,
|
||||
}
|
||||
|
||||
// Check the host has enough capacity
|
||||
if (check_host(hid, enforce, vm.get(), att.resp_msg) == false)
|
||||
if (c_hid != hid &&
|
||||
check_host(hid, enforce, vm.get(), att.resp_msg) == false)
|
||||
{
|
||||
return Request::ACTION;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user