Allow editing a running instance
- Dominant language
- Go
- Stars
- 21.9k
- Forks
- 957
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 53
Description
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:
```shell
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.
Contributor guide
Assessment
This issue has not been assessed yet.