VM changing minimum static ram results in MEMORY_CONSTRAINT_VIOLATION_ORDER() error
-
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!
-
Hi,
Not sure to really understand your issue. Are you talking about an error in Xen Orchestra?
-
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.
-
I'm not sure to understand the problem, but let me add @gduperrey in the loop
-
@olivierlambert @gduperrey Let me add screenshots
This seems to be the cause:
But If I select another template, like Debian 8, it allows me to go down to as little as 256MiB of ram;
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.
-
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
-
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.
-
@olivierlambert @gduperrey Thanks for clearing that up. Appreciate the responses.