Doing some more testing, where I wished to place one Host in maintenance mode. I was then met with HOST_NOT_ENOUGH_FREE_MEMORY.
The pool is a 3 host pool in HA, with load balancing enabled.
My guess is that when trying to enable Maintenance mode. It tries to migrate ALL VMs on that host, to ONE single Host on the receiving end. And then it exhausts the amount of available memory.
What I had to do, was manually disable load balancing. And manually migrate VMs to the two other hosts, to distribute them. This worked.
What I expected to have happened:
The evacuation of the host going into Maintenance mode, would be distributing the VMs in a smarter fashion. So that their workload would fit in the pooled resources available.
Commit: 2f846
XCP-NG: Fully updated as of writing
host.setMaintenanceMode
{
"id": "<obfuscated>",
"maintenance": true
}
{
"code": "HOST_NOT_ENOUGH_FREE_MEMORY",
"params": [
"OpaqueRef:<obfuscated>"
],
"task": {
"uuid": "c3a83a2d-003d-ac0f-48b8-79a905c9e557",
"name_label": "Async.host.evacuate",
"name_description": "",
"allowed_operations": [],
"current_operations": {},
"created": "20260929T07:46:40Z",
"finished": "20260929T07:46:40Z",
"status": "failure",
"resident_on": "OpaqueRef:<obfuscated>",
"progress": 1,
"type": "<none/>",
"result": "",
"error_info": [
"HOST_NOT_ENOUGH_FREE_MEMORY",
"OpaqueRef:<obfuscated>"
],
"other_config": {},
"subtask_of": "OpaqueRef:NULL",
"subtasks": [],
"backtrace": "(((process xapi)(filename ocaml/xapi/xapi_host.ml)(line 629))((process xapi)(filename hashtbl.ml)(line 159))((process xapi)(filename hashtbl.ml)(line 165))((process xapi)(filename hashtbl.ml)(line 170))((process xapi)(filename ocaml/xapi/xapi_host.ml)(line 625))((process xapi)(filename ocaml/libs/xapi-stdext/lib/xapi-stdext-pervasives/pervasiveext.ml)(line 24))((process xapi)(filename ocaml/libs/xapi-stdext/lib/xapi-stdext-pervasives/pervasiveext.ml)(line 39))((process xapi)(filename ocaml/xapi/rbac.ml)(line 228))((process xapi)(filename ocaml/xapi/rbac.ml)(line 238))((process xapi)(filename ocaml/xapi/server_helpers.ml)(line 78)))"
},
"message": "HOST_NOT_ENOUGH_FREE_MEMORY(OpaqueRef:<obfuscated>)",
"name": "XapiError",
"stack": "XapiError: HOST_NOT_ENOUGH_FREE_MEMORY(OpaqueRef:<obfuscated>)
at XapiError.wrap (file:///opt/xen-orchestra/packages/xen-api/_XapiError.mjs:16:12)
at default (file:///opt/xen-orchestra/packages/xen-api/_getTaskResult.mjs:13:29)
at Xapi._addRecordToCache (file:///opt/xen-orchestra/packages/xen-api/index.mjs:1358:24)
at file:///opt/xen-orchestra/packages/xen-api/index.mjs:1392:14
at Array.forEach (<anonymous>)
at Xapi._processEvents (file:///opt/xen-orchestra/packages/xen-api/index.mjs:1382:12)
at Xapi._watchEvents (file:///opt/xen-orchestra/packages/xen-api/index.mjs:1589:14)"
}
Update: Edited title, since it would suggest Load Balancing was the problem. It isn't. It's the assignment of migration target(s) that is the issue (imho)