Request an invite
Docs menu

vm_stop

Shut a virtual machine down.

Asks a machine's guest to shut down and returns at once; a guest still running 30 seconds later is turned off, which vm_info and the events say. During a snapshot the 30 seconds start once it ends, up to 2 minutes later. A Windows whose guest agent took the shutdown, or that shows it is installing updates, is waited for while it makes progress, up to 2 hours; vm_info's status says how far it is. A guest turned off loses its unsaved work. An ephemeral machine with a workspace takes its diff while it stops, and the answer names where the patch goes; one whose diff cannot be taken, that the host holds paused, or that is forced off, is kept until vm_workspace_diff takes it or vm_delete drops it. A suspended machine is refused unless discard_memory is true, which throws its saved memory away.

Profiles
operator, full
Read-only
No
Destructive
Yes
Idempotent
No
Open world
No
Runs as a task
No

Parameters

discard_memoryboolean

Stops a suspended machine by throwing its saved memory away; what it had not written to its disks is lost. Default false.

forceboolean

Powers the machine off at once without asking the guest; it loses what it has not written and, while Windows installs updates, can leave Windows unable to start.

vmstringRequired

The machine's name or identifier, as vm_list shows it.

Output

The result's structured content is an object with these fields.

JSON Schema: /schemas/0/mcp/tools/vm_stop/output.json

detailstring
outcomestringRequired

One of shutdown, poweredOff, memoryDiscarded.

workspaceDiffstring

Report a problem with this page