lima icon indicating copy to clipboard operation
lima copied to clipboard

Implement the suspend and resume commands

Open afbjorklund opened this issue 3 years ago • 6 comments

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 avatar Feb 09 '22 21:02 afbjorklund

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.

afbjorklund avatar Feb 09 '22 21:02 afbjorklund

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 avatar Feb 10 '22 00:02 AkihiroSuda

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.

jandubois avatar Feb 10 '22 01:02 jandubois

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

afbjorklund avatar Feb 10 '22 06:02 afbjorklund

I rebased, but haven't updated the API.

afbjorklund avatar Mar 27 '23 14:03 afbjorklund

Maybe a new method to reset/restore all networking ?

afbjorklund avatar Oct 21 '23 08:10 afbjorklund