Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Allow editing a running instance #3346

Open
jandubois opened this issue Mar 12, 2025 · 1 comment
Open

Allow editing a running instance #3346

jandubois opened this issue Mar 12, 2025 · 1 comment
Labels
area/cli limactl CLI user experience good first issue Good for newcomers

Comments

@jandubois
Copy link
Member

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.

@AkihiroSuda AkihiroSuda added area/cli limactl CLI user experience good first issue Good for newcomers labels Mar 12, 2025
@unsuman
Copy link
Contributor

unsuman commented Mar 17, 2025

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.

A possible user flow is to first edit and validate the changes, and then we can prompt the user to restart the VM(that requires #3323 ). However, I'm afraid while halting the instance during restart, is it necessary that the YAML file should not be modified(i.e. it should be in the form that the instance was launched in)?

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
area/cli limactl CLI user experience good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants