[moc] Implement Graceful Shutdown Option for VM Stop Operation#404
Open
arg5739 wants to merge 10 commits intomicrosoft:mainfrom
Open
[moc] Implement Graceful Shutdown Option for VM Stop Operation#404arg5739 wants to merge 10 commits intomicrosoft:mainfrom
arg5739 wants to merge 10 commits intomicrosoft:mainfrom
Conversation
Contributor
Author
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Contributor
Author
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Contributor
Author
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
jocardeMSFT
reviewed
Oct 31, 2025
| repeated VirtualMachine VirtualMachines = 1; | ||
| VirtualMachineOperation OBSOLETE_OperationType = 2 [deprecated=true]; | ||
| ProviderAccessOperation OperationType = 3; | ||
| bool SkipShutdown = 4; |
Contributor
There was a problem hiding this comment.
this looks stale, remove.
rpc/common/moc_common_common.proto
Outdated
| VirtualMachine_Pause = 608; | ||
| VirtualMachine_Save = 609; | ||
| VirtualMachine_Remove_Iso_Disk = 610; | ||
| VirtualMachine_Poweroff = 611; |
Contributor
There was a problem hiding this comment.
VirtualMachine_StopGraceful?
| message VirtualMachineOperationRequest { | ||
| repeated VirtualMachine VirtualMachines = 1; | ||
| VirtualMachineOperation OperationType = 2; | ||
| bool SkipShutdown = 3; |
Contributor
There was a problem hiding this comment.
I believe this is leftover and needs to be cleaned up.
|
@arg5739 please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
Contributor License AgreementContribution License AgreementThis Contribution License Agreement (“Agreement”) is agreed to by the party signing below (“You”),
|
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
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] #404
[WSSD-SDK] microsoft/wssd-sdk-for-go#342
[MOC-SDK] microsoft/moc-sdk-for-go#359
[MOCCLI] https://github.com/microsoft/moccli/pull/352
[CloudAgent] In progress
[NodeAgent] In progress
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
In progress