-
Notifications
You must be signed in to change notification settings - Fork 55
[moc] Implement Graceful Shutdown Option for VM Stop Operation #406
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+337
−327
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Contributor
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
arg5739
approved these changes
Nov 17, 2025
Contributor
|
All the gates for all PR has passed except |
arg5739
previously approved these changes
Dec 11, 2025
blairurish
reviewed
Dec 12, 2025
Contributor
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
arg5739
approved these changes
Dec 12, 2025
blairurish
approved these changes
Dec 12, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem Statement
When users select "Stop" for a virtual machine (VM) through the portal or CLI, the system currently performs an immediate "Turn Off" operation rather than executing a graceful shutdown. This behavior does not align with user expectations and has become a significant pain point, as customers anticipate a proper shutdown sequence when choosing to stop their VM.

Related PRs
• [MOC] #406
• [WSSD-SDK] https://github.com/microsoft/wssd-sdk-for-go/pull/343
• [MOC-SDK] microsoft/moc-sdk-for-go#365
• [MOCCLI] https://github.com/microsoft/moccli/pull/353
• [CloudAgent] https://github.com/microsoft/wssdcloudagent/pull/1620
• [NodeAgent] https://github.com/microsoft/wssdagent/pull/1454
WorkItem
https://msazure.visualstudio.com/One/_workitems/edit/30775126
Summary of changes
These PRs accomplish the following:
The parameter to request non-graceful VM shutdown. True value indicates non-graceful shutdown whereas false indicates otherwise. Default value for this flag is false if not specified
Testing
Validate current Stop functionality (making sure new changes wont break current user experience.)

Validate Graceful shutdown option