KEMBAR78
Implement clean instance terminate when using systemd by benhillis · Pull Request #13552 · microsoft/WSL · GitHub
Skip to content

Conversation

@benhillis
Copy link
Member

@benhillis benhillis commented Oct 2, 2025

This change ensures that systemctl poweroff gets time to do its work before terminating the VM.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR implements clean instance termination when using systemd by refactoring the termination logic to allow systemd proper time to shut down before falling back to a hard reboot.

  • Extracts common termination logic into a new InitTerminateInstanceInternal function
  • Changes systemd command from systemctl reboot to systemctl poweroff
  • Adds timeout waiting for systemd to complete shutdown before forcing reboot

@benhillis benhillis merged commit 05d6129 into master Oct 7, 2025
6 checks passed
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.

2 participants