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

    VM changing minimum static ram results in MEMORY_CONSTRAINT_VIOLATION_ORDER() error

    Scheduled Pinned Locked Moved Xen Orchestra
    8 Posts 3 Posters 1.4k Views 2 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.
    • R Offline
      rocket
      last edited by

      I was trying to set the minimum ram for a VM yesterday to below the default value that was set after the installation but kept getting the MEMORY_CONSTRAINT_VIOLATION_ORDER() error.

      It worked with this;

      xe vm-memory-limits-set dynamic-min=1GiB dynamic-max=1GiB static-min=1GiB static-max=1GiB vm="PiHole"
      

      So I'm assuming the Rocky Linux 8 template that I used has it defined that 2GiB shall be the minimum you can set with the GUI.

      But I'm wondering where can I edit these template parameters? I'd like to reduce the default GUI minimum to 1.5GiB as per https://access.redhat.com/articles/rhel-limits

      Minimum required memory
      RHEL8 = 1.5 GiB for local media or NFS network installation
      

      And to get to 1.5GiB with xe I had to do this;

      [00:17 xcpng ~]# xe vm-memory-limits-set dynamic-min=1.5GiB dynamic-max=1.5GiB static-min=1.5GiB static-max=1.5GiB vm="PiHole"
      Error: Failed to parse field 'static-min': expecting an integer (possibly with suffix)
      
      [10:49 xcpng ~]# xe vm-memory-limits-set dynamic-min=1536MiB dynamic-max=1536MiB static-min=1536MiB static-max=1536MiB vm="PiHole"
      

      Thanks!

      1 Reply Last reply Reply Quote 0
      • olivierlambertO Offline
        olivierlambert Vates πŸͺ Co-Founder CEO
        last edited by

        Hi,

        Not sure to really understand your issue. Are you talking about an error in Xen Orchestra?

        R 1 Reply Last reply Reply Quote 0
        • R Offline
          rocket @olivierlambert
          last edited by rocket

          Hi Olivier,
          I think the issue is with the Rocky Linux 8 template within XO; the minimum ram amount is set to 2GiB when it should be 1.5GiB.
          Which is what seems to trigger the error I was getting when setting the ram below that minium in XO instead of using xe.

          Edit: unless the minimum ram numbers don’t come from the templates? This is my first xcp-ng/xo setup so correct me if I’m wrong.

          1 Reply Last reply Reply Quote 0
          • olivierlambertO Offline
            olivierlambert Vates πŸͺ Co-Founder CEO
            last edited by

            I'm not sure to understand the problem, but let me add @gduperrey in the loop

            R 1 Reply Last reply Reply Quote 0
            • R Offline
              rocket @olivierlambert
              last edited by

              @olivierlambert @gduperrey Let me add screenshots πŸ™‚

              This seems to be the cause:

              90f170ae-3d15-422f-93ca-daab3e6a4bad-image.png

              But If I select another template, like Debian 8, it allows me to go down to as little as 256MiB of ram;

              6ec8d0ad-08a3-4272-abd9-16f1a1e7aa6b-image.png

              Basically I'd like to edit my Rocky Linux 8 template to allow it to create VMs with 1.5GB of ram instead of the current minimum of 2GB. (Because Red Hat states 1.5GB is their current minimum, and every GB counts on a small virtualization system)

              As mentioned in my original post I can create one with the 2GiB and later use xe to reduce that down to my desired value, but would ideally eliminate this extra step and just create with 1.5GiB through XO right away.

              1 Reply Last reply Reply Quote 0
              • olivierlambertO Offline
                olivierlambert Vates πŸͺ Co-Founder CEO
                last edited by

                Okay, so we decided reducing the static min wasn't a "regular" operation and therefore it's not visible/meant to be modified in XO UI. So what you experience is normal πŸ™‚

                1 Reply Last reply Reply Quote 1
                • gduperreyG Offline
                  gduperrey Vates πŸͺ XCP-ng Team
                  last edited by

                  The limitation isn't in the Rocky Linux template but in the one we inherit from.
                  As these templates came from upstream (XenServer), it's better to keep them that way.

                  But you can create your own template to use. Create a VM and modify the memory limit as desired with the command line you used before. When the VM (you don't need to install it; just create an empty one with the right parameters) is ready, like you want it to be, Go to the advanced tab and click on "Convert to template". It will transform your VM into a template (you can see it in the menu Home - Templates). Then you could create any VM you want from this template when you add a new VM.

                  The information is stored in the XAPI. So it will stay when you upgrade XCP-ng from version 8.2.1 to a higher version.

                  R 1 Reply Last reply Reply Quote 1
                  • R Offline
                    rocket @gduperrey
                    last edited by

                    @olivierlambert @gduperrey Thanks for clearing that up. Appreciate the responses.

                    1 Reply Last reply Reply Quote 0
                    • First post
                      Last post