colima icon indicating copy to clipboard operation
colima copied to clipboard

Support for Disk/Memory Units Other Than GiB for --memory and --disk flags

Open ngshiheng opened this issue 1 year ago • 3 comments

Description

Currently, the --memory or --disk flags allow users to specify the amount of memory allocated to the VM in Gibibyte (GiB).

Are there plans for Colima to support other units for CPU/Disk/MEM allocation, specifically Mebibyte (MiB)?

Suggestion 1

colima start --memory 2GiB
colima start --memory 512MiB

This change would provide flexibility to the users and make it easier to manage memory resources.

Suggestion 2

Alternatively, Colima can also support float (instead of only int) values for memory allocation. This would allow users to specify the exact amount of memory they want to allocate while keeping the unit as GiB.

Here is an example of how this could look:

colima start --memory 0.5 --disk 0.5 # GiB

ngshiheng avatar Feb 04 '24 03:02 ngshiheng

The second suggestion is preferred as it would be backward compatible and not introduce breaking changes.

abiosoft avatar Feb 04 '24 06:02 abiosoft

I have found myself requiring the exact same thing. Running the smallest vm simply for a twingate connector would be a use case.

MrCee avatar Feb 15 '24 09:02 MrCee