lima-vm / lima-vm/lima

Allow editing a running instance

Open
#3,346 9 comments 0 reactions 1 assignee Assigned to @jonas-peter View on GitHub
area/cli good first issue
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.