XCP-ng
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Is Dynamic Memory Allocation and NVME passthrough supported?

    Scheduled Pinned Locked Moved Solved Management
    3 Posts 2 Posters 166 Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • O Offline
      oifndiondgbj
      last edited by

      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 GiB

      When 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?

      1 Reply Last reply Reply Quote 0
      • O oifndiondgbj marked this topic as a question on
      • TeddyAstieT Offline
        TeddyAstie Vates 🪐 XCP-ng Team Xen Guru
        last edited by

        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.

        O 1 Reply Last reply Reply Quote 0
        • O Offline
          oifndiondgbj @TeddyAstie
          last edited by

          @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?

          1 Reply Last reply Reply Quote 0
          • O oifndiondgbj has marked this topic as solved on
          • First post
            Last post