[pve-devel] batch migrate : add a optionnal flag to check available memory on target node ?

Alexandre DERUMIER aderumier at odiso.com
Fri Jan 12 16:40:48 CET 2018


Hi,

Currently if we migrateall vm from 1 node to another node,
we don't check available memory on target node, and we can reach 100% memory usage is target host don't have enough ram.
(also, if target host have same physical memory, if ksm is used on source node, you'll get 100% memory on target node before ksm is triggered).


I would like to add an option to qm migrate, like "targethost_freememory_percent",

and before doing the live migration, do

die "not enough free memory on target host" if "(targethost_current_memory + vm_current_memory) / targethost)*100) > targethost_freememory_percent"


How is it possible to get stats of targetnode, from sourcenode ? (cluster resources api ?)


Regards,

Alexandre



More information about the pve-devel mailing list