colima
colima copied to clipboard
Better UX in CLI: "start" subcommand should be split into "start" and "create"
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.
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.
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?
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
?
@chadlwilson you can always colima start --edit
to view the actual configuration being used.