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

Being able to set the VM memory size permanently #4

Open
mickours opened this issue Nov 14, 2023 · 2 comments
Open

Being able to set the VM memory size permanently #4

mickours opened this issue Nov 14, 2023 · 2 comments

Comments

@mickours
Copy link
Collaborator

Hi!

My composition needs VMs with 2GB of memory, but the default value is 1GB. I found out that I can set the VM memory using the MEM environment variable, but this is not very reproducible and I'd like to have a more permanent way to set this value.

Is it possible to set it in the composition directly? Or in the setup.toml?

Thanks!

@jojothan
Copy link

Hi !

I remember using this attribute in some compositions to set the memory size of the VM.

virtualisation.memorySize = 3000;

@mickours
Copy link
Collaborator Author

mickours commented Mar 5, 2024

This is not working anymore...

After some discussion with @augu5te, because VM specific options should not go into the composition, I'll try to add a new node-config option to nxc start to specify the resource of each nodes and the Qemu options to mount the volumes. This file should be generated by an external tool at first.

It includes the memory, and the CPU core, but also the disk setup. For example:

# Will be append to the deployments.json to be use inside the composition to mount the disk
deployments:
  volumes-config:
      nodes-1:
        path: /dev/hda1
        mount: /var
 
# Will be use by the start command to append options for each node
quemuOpts: 
  node-1: -drive file=/tmp/disks/diskID1234.qcow -m=2G
  node-2: -drive file=/tmp/disks/diskID4567.qcow -m=2G
  server: -drive file=/tmp/disks/diskID0987.qcow -cpu=3

An external tool should be call to create the disks before the VM starts and remove disks once stopped.

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