diff --git a/src/libxl/libxl_conf.c b/src/libxl/libxl_conf.c index dcd46873c78bfaa1f15fb6ff3aec4a108a6df13a..ea2b0c588f9b9cfa996a3e570989c08c7b80dd5a 100644 --- a/src/libxl/libxl_conf.c +++ b/src/libxl/libxl_conf.c @@ -367,6 +367,10 @@ libxlMakeDomBuildInfo(virDomainDefPtr def, } b_info->sched_params.weight = 1000; + /* Xen requires the memory sizes to be rounded to 1MiB increments */ + virDomainDefSetMemoryTotal(def, + VIR_ROUND_UP(virDomainDefGetMemoryInitial(def), 1024)); + def->mem.cur_balloon = VIR_ROUND_UP(def->mem.cur_balloon, 1024); b_info->max_memkb = virDomainDefGetMemoryInitial(def); b_info->target_memkb = def->mem.cur_balloon; if (hvm) {