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

Lima: default memory should have a minimum #7499

Open
mook-as opened this issue Sep 17, 2024 · 1 comment
Open

Lima: default memory should have a minimum #7499

mook-as opened this issue Sep 17, 2024 · 1 comment
Labels
area/preferences component/lima Issues related to lima and qemu kind/bug Something isn't working

Comments

@mook-as
Copy link
Contributor

mook-as commented Sep 17, 2024

Actual Behavior

On a VM with a balloon device (i.e. the amount of memory is flexible), the initial VM memory size can be too small. This leads to Lima failing to start up, and reading lima.serial.log shows that some packages failed to install at startup (leading to a non-working sshd).

Steps to Reproduce

  1. Set up a VM (with nested virtualization) with dynamically ballooning memory.
  2. Install Rancher Desktop.
  3. Factory reset as needed.
  4. Let the VM idle a bit to let the total system memory go down.
  5. Start Rancher Desktop, accepting default settings.

Result

Lima exits with an error because ssh couldn't connect.
Digging into things, this was because packages failed to install in early boot (into the tmpfs) due to running out of disk, and ssh host keys couldn't be generated.

Expected Behavior

Everything should start successfully.

Additional Information

if (os.platform() === 'darwin' || os.platform() === 'linux') {
const totalMemoryInGB = os.totalmem() / 2 ** 30;
// 25% of available ram up to a maximum of 6gb
return Math.min(6, Math.round(totalMemoryInGB / 4.0));

We set the default memory to be up to 6GB, but no minimum.

Rancher Desktop Version

1.15.1-328-g0ba5528e9

Rancher Desktop K8s Version

1.30.4

Which container engine are you using?

moby (docker cli)

What operating system are you using?

Other Linux

Operating System / Build Version

openSUSE Leap 15.5

What CPU architecture are you using?

x64

Linux only: what package format did you use to install Rancher Desktop?

rpm

Windows User Only

No response

@mook-as mook-as added kind/bug Something isn't working component/lima Issues related to lima and qemu area/preferences labels Sep 17, 2024
@jandubois
Copy link
Member

We set the default memory to be up to 6GB, but no minimum.

We should set a minimum. We can do some experiments, but I don't think anything below 2GB is going to work if you want to do more than just spin up an empty VM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/preferences component/lima Issues related to lima and qemu kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants