用來佈建 Windows 和 Linux 虛擬機器的 Azure 服務。
Compute Schedule returns OperationConflict when two operations on the same VM are closed
We schedule one-time VM starts with Compute Schedule (virtualMachinesSubmitStart, api-version=2025-05-01).
If the VM already has a pending operation, a new virtualMachinesSubmitStart or virtualMachinesSubmitDeallocate with a deadline less than 60 minutes before or after it is rejected. The call returns HTTP 200, but results[0].errorCode is OperationConflict and results[0].operation is the existing operation. No new operation is created.
In our tests, 59 minutes apart conflicts and 60 minutes apart creates a new operation. It also conflicts across operation types (a start against a pending deallocate) and across callers (the VM's managed identity and a user).
We could not find these rules in the Scheduled Actions REST reference.
Steps to reproduce
- Call
virtualMachinesSubmitStartwith deadline 12:00 UTC. A new operation is created. - Call it again on the same VM with deadline 12:30 UTC. The response has
errorCode: OperationConflictand the operation from step 1. - Call it again with deadline 13:00 UTC. A new operation is created.
Questions
- Is the 60-minute window by design? Does it apply to every Submit and Execute operation on the same VM, and is it documented?
- How should we schedule a short power cycle, for example deallocate at 10:00 and start at 10:30?