Terminals and Sessions
One window
MicroVMs open in the main window, never in windows of their own. Select a MicroVM in the sidebar to see its terminal. The others keep their sessions out of sight, screen and scrollback included. The header shows the MicroVM's state and time left, and its buttons: Suspend or Resume, Terminate…, Disconnect, History, Upload… and Download…. In a narrow window the last three are in a More menu. The MicroVM menu has them all.
Setup
Each time a workspace's MicroVM connects, the pane ticks off its setup: mounting /workspace with persistent storage, copying files, adding credentials, cloning repos and running setup commands. Cancel stops setup at any step and closes the connection. The pane then offers Close, Open Shell Anyway and Try Again. Escape doesn't cancel, so a key meant for the terminal can't stop setup. When a step fails, see Troubleshooting.
Keep session (tmux)
Keep the session when you disconnect (tmux), in the workspace's Behaviour section, is on for new workspaces. Reconnecting returns to the same tmux session, with everything still running in it, and a dropped connection reconnects by itself: it tries 8 times over about two minutes, and Reconnect Now skips the wait. The image needs tmux; the starter image has it. Plain shells in Other MicroVMs, and Open Shell Anyway, don't keep their shell.
Splits
- Split Right (⌘D) and Split Down (⇧⌘D), in the File menu, open another shell beside or below the one you're in. With Keep session, it joins the same tmux session in a tmux window of its own.
- Close Pane (⇧⌘W) closes the pane you're in. It asks first when the pane's shell isn't kept in tmux, because the shell ends with it.
- Next Pane (⌘]) and Previous Pane (⌘[) move between panes.
⌘W
While a terminal is shown, ⌘W is Disconnect. When every pane keeps its shell in tmux, it disconnects without asking; otherwise it asks first, because the shells end and anything running in them stops. With no terminal shown, ⌘W closes the window. Neither terminates the MicroVM: it keeps running, and billing. Closing the window and quitting ask in the same way. In these questions Return and Escape both cancel.
Disconnect and reconnect
Disconnect, in the header or the MicroVM menu, does what ⌘W does: it closes the terminal and leaves the MicroVM running. It doesn't reconnect by itself: press Connect. When a shell exits or the connection drops, the pane says so, and Reconnect connects again: with Keep session you're back in the same tmux session, and without it you get a new shell.
After the Mac wakes, MicroVM Studio checks each connection straight away, so a dead one shows up quickly. With Keep session, a dropped connection also reconnects as soon as the network comes back.
Idle and suspend
Three settings in the workspace's Time limits section decide what happens while no terminal is connected. Idle means just that: work running inside the MicroVM doesn't count.
- Suspend when idle: Off, or any time from 1 minute up to the max duration, typed in minutes or hours; the pop-up has shortcuts of 5, 15, 30 or 60 minutes. New workspaces suspend after 5 minutes. Off keeps the MicroVM running, and billing, while no terminal is connected, until its max duration. Otherwise AWS suspends it after that long with no terminal connected, even while something runs in it: everything in it pauses until it resumes.
- Terminate after suspended for: any time from 1 minute up to the max duration; the shortcuts are 1, 4 or 8 hours. A suspended MicroVM that isn't resumed in that time is terminated. New workspaces use 8 hours.
- Resume on connect: on for new workspaces. Connecting resumes a suspended MicroVM. When it's off, a reconnect that happens by itself, such as when a dropped connection comes back after your Mac wakes, leaves the MicroVM suspended: the pane says This MicroVM is suspended, and Resume and Reconnect resumes it. Connecting yourself, or choosing Resume, always resumes it.
The last two apply only while Suspend when idle is on. Workspaces saved before these settings keep what they did: Keep working when detached on became Suspend when idle Off, and off became 5 minutes.
- Suspend and Resume in the header act straight away. Resuming starts billing again.
- Every MicroVM stops for good after its max duration, 8 hours at most, and time suspended counts, so it can end a suspended MicroVM sooner. The header counts down, orange under 30 minutes and red under 5. Terminate… stops it for good now. Anything not pushed is lost when it stops.
History
History in the header shows what happened to the MicroVM, newest first, each with its time: its launch by MicroVM Studio, running, suspended, resumed and terminated, and terminals connecting and disconnecting. MicroVM Studio records it while it's open, and sees state changes within about a minute. A MicroVM's history is kept for 7 days after it stops.