Skip to content

Commit

Permalink
MTV-1573 | Allow scheduler to migrate VMs with more disks
Browse files Browse the repository at this point in the history
Issue:
When migrating the VM using the warm migration with more disks
than the MAX_VM_INFLIGHT the VM won't get scheduled and won't start the migration.

Fix:
Once the scheduler is empty the controller will start the migration of
the large VMs.

Signed-off-by: Martin Necas <[email protected]>
  • Loading branch information
mnecas committed Oct 7, 2024
1 parent e3dbc9a commit 5e011fb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/controller/plan/scheduler/vsphere/scheduler.go
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,11 @@ func (r *Scheduler) schedulable() (schedulable map[string][]*pendingVM) {
if vms[i].cost+r.inFlight[host] <= r.MaxInFlight {
schedulable[host] = append(schedulable[host], vms[i])
}
// In case there is VM with more disks than the MaxInFlight MTV will migrate it, if there are no other VMs
// being migrated at that time.
if vms[i].cost > r.MaxInFlight && r.inFlight[host] == 0 {
schedulable[host] = append(schedulable[host], vms[i])
}
}
}

Expand Down

0 comments on commit 5e011fb

Please sign in to comment.