Skip to content

Implement the suspend and resume commands #642

New issue

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

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

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from

Conversation

afbjorklund
Copy link
Member

@afbjorklund afbjorklund commented Feb 9, 2022

For halting the emulation and putting the VM into paused run state.

Also query the status of running instances, when showing in "list".

NAME       STATUS    SSH                ARCH      CPUS    MEMORY    DISK      DIR
default    Paused    127.0.0.1:60022    x86_64    4       4GiB      100GiB    /home/anders/.lima/default

Closes #598

@afbjorklund
Copy link
Member Author

Tested with default instance and a busy loop, which went "silent" after putting the instance into pause.

There might be an issue with ssh getting disconnected if sleeping too long, but can be fixed by a restart.

@AkihiroSuda
Copy link
Member

There might be an issue with ssh getting disconnected if sleeping too long, but can be fixed by a restart.

I think we should switch away from sshfs to 9p before merging this PR.

@AkihiroSuda AkihiroSuda marked this pull request as draft February 10, 2022 00:59
@jandubois
Copy link
Member

I think we should switch away from sshfs to 9p before merging this PR.

I agree, but the volume mounts are not the only part affected by SSH disconnects. Unix socket forwarding is also sometimes breaking when the host is sleeping. I hope to look into this whole topic (host sleeping) next week, but I still have hopes that 9p would solve/improve other issues, like performance.

@afbjorklund
Copy link
Member Author

afbjorklund commented Feb 10, 2022

Actually I meant the guest sleeping (i.e. "pause"), suspending the host probably has similar (or worse) issues.

@afbjorklund afbjorklund marked this pull request as ready for review November 18, 2022 08:15
@afbjorklund afbjorklund force-pushed the suspend-resume branch 3 times, most recently from 3f47c79 to 107974a Compare November 19, 2022 17:31
@AkihiroSuda AkihiroSuda added this to the v0.14 milestone Nov 20, 2022
@afbjorklund

This comment was marked as outdated.

@afbjorklund
Copy link
Member Author

Maybe a new method to reset/restore all networking ?

@afbjorklund afbjorklund force-pushed the suspend-resume branch 2 times, most recently from 74f0a79 to 5b537e4 Compare October 21, 2023 12:10
@afbjorklund afbjorklund force-pushed the suspend-resume branch 2 times, most recently from 09c18c7 to ef8f24e Compare September 28, 2024 08:28
For halting the emulation and putting the VM into paused run state.

Also query the status of running instances, when showing in "list".

Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement suspend and resume of VM
3 participants