lima icon indicating copy to clipboard operation
lima copied to clipboard

Couldnot run other lima with the option --name. (` instance name "default" and CLI flag --name="dev" cannot be specified together`)

Open 8Q757 opened this issue 2 years ago • 5 comments

Description

When I run limactl start --name dev

FATA[0000] instance name "default" and CLI flag --name="dev" cannot be specified together

limactl version 0.9.1

8Q757 avatar Mar 27 '22 14:03 8Q757

Workaround: limactl start --name dev template://default.

I think the template://default should be implied when you specify limactl start --name NAME.

jandubois avatar Mar 27 '22 16:03 jandubois

I think the template://default should be implied when you specify limactl start --name NAME.

I'm not sure. The --name option is dedicated to be used in conjunction with the template spec.

Probably we should just make the error message less cryptic. Appending hint: did you mean 'limactl start --dev name template://default'? to the current error message would be fine.

AkihiroSuda avatar Mar 28 '22 10:03 AkihiroSuda

I'm not sure. The --name option is dedicated to be used in conjunction with the template spec.

Ok, but it feels inconsistent to me, given limactl start is short for limactl start --name default template://default when the instance doesn't exist yet. So I would naïvely expect:

limactl start --name foo when foo doesn't exist is limactl start --name foo template://default limactl start --name foo when foo already exists is limactl start foo

So --name would be for limactl start what LIMA_INSTANCE is for lima: a way to override the default instance name, but all other semantics remain the same.

limactl start is already a bit weird with it being overloaded with both creation and starting of instances, but this would add just a little consistency to the weirdness.

jandubois avatar Mar 28 '22 17:03 jandubois

limactl start is already a bit weird with it being overloaded with both creation and starting of instances, but this would add just a little consistency to the weirdness.

Probably we should have the limactl create command as the "canonical" way to create an instance without starting it.

AkihiroSuda avatar Mar 28 '22 17:03 AkihiroSuda

I solved it and was able to run it successfully, but I don't think it's a friendly way to prompt. Also, could this command be more disambiguating? Thanks.

8Q757 avatar Mar 29 '22 00:03 8Q757