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

Defaults for start arguments? #242

Closed
joelpittet opened this issue Mar 25, 2022 · 9 comments · Fixed by #251
Closed

Defaults for start arguments? #242

joelpittet opened this issue Mar 25, 2022 · 9 comments · Fixed by #251
Labels
enhancement New feature or request
Milestone

Comments

@joelpittet
Copy link

Is there a way (like dotfile) for colima to specify the --memory --cpu flags instead of doing that each time?

Instead of typing:
colima start --cpu 4 --memory 8
I could do something like
colima start
And it would read from ~/.colima/config.yml or something with:

cpu: 4
memory: 8

Not sure if this is a question or a feature request ;)

@rfay
Copy link
Contributor

rfay commented Mar 25, 2022

I've been confused about what arguments are only useful for first launch, and which must be done later.

For example, if you start the first time with colima start --disk=100 --cpu 4 --memory 8 then does colima start without arguments later just use all 3 of those? I know it uses --disk because that can't be changed. But I've never been clear about other things.

And what about --dns which seems to be important right now?

Thanks!

@abiosoft abiosoft added the enhancement New feature or request label Mar 25, 2022
@abiosoft
Copy link
Owner

I agree that the documentation can be better in this regard. However, proper config file support is in the works.

And what about --dns which seems to be important right now?

DNS does not persist, it needs to be specified on each startup.

@rfay
Copy link
Contributor

rfay commented Mar 25, 2022

How about --cpu and --memory - do they persist?

@abiosoft
Copy link
Owner

abiosoft commented Mar 25, 2022

How about --cpu and --memory - do they persist?

Yeah they all persist, --dns is the exception.

@abiosoft
Copy link
Owner

I've been confused about what arguments are only useful for first launch, and which must be done later.

This is actually specified in colima start --help.

$ colima start --help
Start Colima with the specified container runtime (and kubernetes if --with-kubernetes is passed).
The --runtime, --disk and --arch flags are only used on initial start and ignored on subsequent starts.

@rfay
Copy link
Contributor

rfay commented Mar 25, 2022

Thanks! That always scrolled off the screen for me :) So only --disk really. So I've probably been messing up by not always specifying --memory

@abiosoft
Copy link
Owner

Yeah, you can always customize an existing VM with the exception of disk size as stated here https://github.com/abiosoft/colima#customization-examples.

  • modify an existing VM to 4CPUs and 8GiB memory.
colima stop
colima start --cpu 4 --memory 8

@rfay
Copy link
Contributor

rfay commented Mar 25, 2022

Hmm, you said in #242 (comment) "They all persist, DNS is the exception"

So the doc says
The --runtime, --disk and --arch flags are only used on initial start and ignored on subsequent starts

but you're saying that if you use --memory 6 --cpu 4 on the first start, those also persist (but can be overridden)?

@abiosoft
Copy link
Owner

but you're saying that if you use --memory 6 --cpu 4 on the first start, those also persist (but can be overridden)?

Yes :) I can now see how this gets easily confusing.

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

Successfully merging a pull request may close this issue.

3 participants