Skip to content

Allow editing a running instance #3346

@jandubois

Description

@jandubois

Right now we display an error when the user tries limactl edit on a running instance.

Instead we should display a prompt and offer the user to stop the instance first (or to abort).

The option to stop the instance should be the default selection, so using limactl edit --yes (see #3345) on a running instance would stop it, perform the edit, and then restart it.

Running limactl edit --yes --set ... should not return until the instance is running again, just as if the user had been running:

limactl stop
limactl edit --set ...
limactl start

I can't make up my mind if it would be a good idea to perform the edit operation first before stopping a running instance. That we we can validate the edit first, and skip the restarting if either the new lima.yaml doesn't validate, or if no changes have been made.

But this complicates things quite a bit, just to optimize the failure case, so maybe not worth it.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions