[moc] Implement Graceful Shutdown Option for VM Stop Operation #406
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