Skip to content

Latest commit

 

History

History
33 lines (26 loc) · 1.76 KB

File metadata and controls

33 lines (26 loc) · 1.76 KB

← Back to Backlog

[SC-002] ✅ DONE - Add shutdown command to wsl-manager

Status: Done (2026-03-06) Priority: Medium Component: tools/wsl-manager/wsl-manager.ps1

Summary: As a WSL manager user, I want a wsl-manager shutdown command so that I can restart the entire WSL subsystem from the manager instead of running wsl --shutdown manually.

Description: The Podman setup documentation (docs/wsl-manager.md) instructs users to edit %USERPROFILE%\.wslconfig for cgroups v2 and then run wsl --shutdown to apply changes. This shutdown step should be available as a wsl-manager action command so that users stay within the manager workflow. Unlike terminate (which stops a single distro), shutdown stops the entire WSL subsystem including all running distributions and the WSL2 lightweight VM.

Scope decisions:

  • Command name: shutdown (mirrors wsl --shutdown semantics)
  • No distro name parameter — shuts down all of WSL
  • Should warn the user that all running distros will be stopped
  • Interactive menu: add [H] Shutdown WSL option ([S] was already taken by "Setup user account")
  • SupportsShouldProcess for -WhatIf / -Confirm support

Acceptance Criteria:

  • wsl-manager shutdown command executes wsl.exe --shutdown
  • Interactive menu option [H] Shutdown WSL available
  • Warning message before shutdown listing running distros (if any)
  • SupportsShouldProcess (-WhatIf, -Confirm) support
  • Idempotent — safe to run when no distros are running
  • ValidateSet and Invoke-WslManager switch updated
  • Unit tests
  • docs/wsl-manager.md updated to use wsl-manager shutdown instead of wsl --shutdown
  • All existing tests continue to pass

← Back to Backlog