Is Dynamic Memory Allocation and NVME passthrough supported?
-
Hello, I'm new to the world of XCP-NG/XO so this might just be a case of new user missing something obvious. I've not got a clear answer from a search of the docs/forums, so figured it was worth asking.
I'm running XCP-NG 8.3 on my host.
I'm managing it with Xen Orchestra from sources (commit 8d39f).
I've got a VM that I'd like to use for some basic Ollama/Openwebui tasks, so want to passthrough the Nvidia GPU from the host. I'm not using Ollama/Webui 24/7 so I'd also like to dynamically allocate RAM so that I don't have to consistently throw large quantities of the hosts RAM at it.
For this reason, I configured the VM with the following memory setup:
Static: 1 GiB/48 GiB
Dynamic: 16 GiB/48 GiBWhen the VM is running, this configuration appears to work. I have the GPU passed through and the dynamic memory allocation set. When I stop the VM and attempt to start it again, the boot fails with the error:
Error from xenguesthelper: Populate on Demand and PCI Passthrough are mutually exclusive
If I adjust dynamic to be 48 GiB/48 GiB the machine will then boot. Once booted, I can then once again apply the desired dynamic config of 16 GiB/48 GiB.
Am I misunderstanding the configuration options and this is just not supported, or have I stumbled across a bug?
-
-
Hello,
Unfortunately, the current approach of ballooning (dynamic memory) cannot work with PCI passthrough. I don't think it is possible to workaround that limitation (at least not in XCP-ng 8.3).If I adjust dynamic to be 48 GiB/48 GiB the machine will then boot. Once booted, I can then once again apply the desired dynamic config of 16 GiB/48 GiB.
Am I misunderstanding the configuration options and this is just not supported, or have I stumbled across a bug?
What's probably happening is that the dynamic configuration you set is not effective yet, and only applies when you reboot, that's why you got PCI passthrough work because you actually used static memory allocation.
-
TeddyAstie Thanks for confirming it's not supported, that saves me some head scratching!
I'd based the assumption of it working post boot on the stats for memory usage being low and
free -m
showing < 48 GiB but guess I just misunderstood.Do you know if this is a fixed limitation or is it a feature that can be added in the future?
-