Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed updating memory limit: Cannot increase memory size beyond boot time size when VM is running #514

Open
Hybrid512 opened this issue Aug 14, 2024 · 1 comment

Comments

@Hybrid512
Copy link

Hi,

The title summurize my issue ... it is not possible to change memory size when a VM is running with terraform.
I understand this is not possible to do it live (and even if I know this is technically possible with LXD but ok, rebooting an instance to change its memory setting doesn't hurt) but why triggering an error about that ?
Why not just change the memory settings and let the user reboot by hand ?
Or maybe force the instance to reboot if the user agree (maybe with just some new attribute in the instance definition or lifecycle management).

Well, this is not blocking in any way but it is quite annoying.

@MusicDin
Copy link
Member

MusicDin commented Sep 20, 2024

Why not just change the memory settings and let the user reboot by hand ?

The provider actually tries to do that, but LXD reports an error. However, it seems that the limitation only applies to virtual machines when increasing the memory limit.

$ lxc launch images:alpine/edge v1 --vm \
    -c security.secureboot=false \
    -c limits.cpu=4 \
    -c limits.memory=4GiB

$ lxc config set v1 limits.cpu=6
$ lxc config set v1 limits.memory=6GiB
Error: Failed updating memory limit: Cannot increase memory size beyond boot time size when VM is running (Boot time size 4096MiB, new size 6144MiB)

@simondeziel Do you know more about that? Is this intentional or a bug in LXD?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants