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

Better UX in CLI: "start" subcommand should be split into "start" and "create" #272

Open
dAnjou opened this issue May 3, 2022 · 4 comments

Comments

@dAnjou
Copy link

dAnjou commented May 3, 2022

This might be related to #242.

I've noticed this when I set up Colima on my M1 MacBook. I ran colima start and it created a VM but with the aarch64 architecture (I was unaware of that at the time). Then I tried running a container with an image produced only for x86_64 which obviously failed. After some time I figured out that I need to create a VM with the x86_64 architecture. I tried colima start --arch x86_64 but the container kept failing to start. And only then I noticed that --arch x86_64 had no effect because it was using the initially created aarch64 VM. So, I had to delete that one first and recreate one for x86_64. All very confusing in terms of UX.

Considering that you can have multiple VM profiles I think there should be a separate create subcommand which fails if a default profile already exists or overrides it with a warning, and the start subcommand should probably require a profile name.

@abiosoft
Copy link
Owner

abiosoft commented May 3, 2022

That would make it two steps to get a running instance :|

I do understand your point but I would argue that it may be better to make it more transparent that a previously created instance is being started.

@dAnjou
Copy link
Author

dAnjou commented May 3, 2022

That would make it two steps to get a running instance :|

Not quite, I think. You'd do create only once when you need a new VM, afterwards it's still just start, one step. I'd say this makes a much more consistent, less confusing UX which outweighs the additional "hassle" of using another command.

Or maybe I'm missing some use cases here. My situation is that I've switched from Docker Desktop on Mac to Colima because of the licence change, and in those years I've never changed the VM settings of Docker Desktop. Are there use cases for doing that with Colima?

@chadlwilson
Copy link

Perhaps it could at least fast-fail the start if certain CLI flags supplied clash with that on any existing VM for the profile, rather than silently ignoring the args? Similar with --cpu and --memory etc etc. It could then suggest that the user needs to colima delete [--profile blah] if the intention is to recreate the VM with new settings (a potentially destructive operation) or suggest they create a new one with a different --profile?

@abiosoft
Copy link
Owner

@chadlwilson you can always colima start --edit to view the actual configuration being used.

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

3 participants