<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Rolling Pool Update fails with HOST_NOT_ENOUGH_FREE_MEMORY, when it really ought to be fine]]></title><description><![CDATA[<p dir="auto">I've had problems on and off with the RPU (Rolling Pool Update) feature for a while now. Usually, it <em>mostly</em> works for me, but runs into a problem figuring out how to move my VMs around and ends up quitting in the middle. Often this has to do with available memory.</p>
<p dir="auto">With one of my pools right now, if I launch the RPU it instantly fails with an error like this:</p>
<pre><code>CANNOT_EVACUATE_HOST(HOST_NOT_ENOUGH_FREE_MEMORY,OpaqueRef:...)
</code></pre>
<p dir="auto">Here's a screenshot of the pool host summary, where the horizontal bars show the RAM usage:</p>
<p dir="auto"><img src="/forum/assets/uploads/files/1783449550235-20ecaf95-16ad-4f41-b4f9-f9b49bc342b9-image.jpeg" alt="20ecaf95-16ad-4f41-b4f9-f9b49bc342b9-image.jpeg" class=" img-fluid img-markdown" /></p>
<p dir="auto">The first 7 hosts have 128 GB RAM but the last host is a big box with 1 TB RAM total, and 650 GB of RAM free. This pool hosts a set of VMs that use 64 GB of memory, so they are hard to fit on the smaller hosts, but they could all easily fit on the big host at once. We're not using dynamic memory or any host affinities.</p>
<p dir="auto">So it really seems to me like the RPU algorithm should be able to figure out how to make this work. Are there any settings I can adjust that might help here? Are there surprising constraints that the algorithm applies that might explain why it's failing here?</p>
<p dir="auto">(Semi-side note: often when an RPU fails, I do updates manually with <code>xe host-evacuate</code>, and that command seems to work fine when the RPU algorithm fails.)</p>
]]></description><link>https://xcp-ng.org/forum/topic/12348/rolling-pool-update-fails-with-host_not_enough_free_memory-when-it-really-ought-to-be-fine</link><generator>RSS for Node</generator><lastBuildDate>Tue, 07 Jul 2026 21:37:23 GMT</lastBuildDate><atom:link href="https://xcp-ng.org/forum/topic/12348.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 07 Jul 2026 18:45:34 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Rolling Pool Update fails with HOST_NOT_ENOUGH_FREE_MEMORY, when it really ought to be fine on Tue, 07 Jul 2026 20:27:54 GMT]]></title><description><![CDATA[<p dir="auto">OK, I've spent some time looking into this and have learned a few things worth mentioning.</p>
<p dir="auto">First, there is pretty ample logging of the RPU planning step in the <code>/var/log/xensource.log</code> file. In my particular case it didn't end up being directly helpful, but it's a good resource to be aware of.</p>
<p dir="auto">Second, it looks like the Xen Orchestra half of the RPU implementation lives <a href="https://github.com/vatesfr/xen-orchestra/blob/master/packages/xo-server/src/xapi/mixins/pool.mjs#L35" target="_blank" rel="noopener noreferrer nofollow ugc">here</a> on GitHub. In my case, the error was reported from inside the <code>host.assert_can_evacuate</code> API call that's implemented <a href="https://github.com/xapi-project/xen-api/blob/master/ocaml/xapi/xapi_host.ml#L425" target="_blank" rel="noopener noreferrer nofollow ugc">here</a> inside the xen-api repo.</p>
<p dir="auto">I don't know OCaml and haven't really grappled with the source code there in detail, but I believe what's happening is that the server is checking that each individual host can be evacuated, but only treating them individually — not taking into account the fact that VMs will be moving from one host to another as the evacuation proceeds in practice.</p>
<p dir="auto">In my particular case, the logging seems to be saying that this analysis was failing because, as things currently stood, when it would come time to reboot my big-memory machine (mpcxenbackup9), there wouldn't be room to hold its VMs on the other hosts, <em>treating the current VM layout as a given</em>. It has two 64 GB VMs, and only one of the other hosts (the one with &gt;50% memory free) can fit one.</p>
<p dir="auto">This would be consistent, I think, with other failure modes I've experienced, where the RPU starts and gets partway done, but fails with a not-enough-memory error. In those cases, I think that the assert_can_evacuate checks are passing, but as the VMs reshuffle during the migration, it becomes impossible to migrate a large-memory VM.</p>
<p dir="auto">I think the solution would be that the planning and execution algorithm needs to be smarter and understand how VMs will move around over the course of the migration; <em>plus</em> I think it has weaknesses in deciding where to send VMs during the process. My system has five 64 GB VMs, which a smart enough packing algorithm should be able to fit at all times no matter which host is offline. But if the algorithm just assigns each VM to the first host that will fit it (in some broad sense), it can get itself wedged later in the process.</p>
<p dir="auto">(FWIW, my intuition is that, if you only think worry about memory, there will always be a successful plan that migrates VMs a minimal number of times, but that might not be correct. Factoring in other constraints like SRs and networks, you probably need to try a bunch of different solutions with randomization to have higher confidence in finding a fully working migration plan.)</p>
]]></description><link>https://xcp-ng.org/forum/post/106735</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/106735</guid><dc:creator><![CDATA[pkgw]]></dc:creator><pubDate>Tue, 07 Jul 2026 20:27:54 GMT</pubDate></item></channel></rss>