用來佈建 Windows 和 Linux 虛擬機器的 Azure 服務。
Azure CLI and Azure Compute Schedule can't start the VM in stopped status
Donnie Wu
40
信譽點數
If a VM is shut down from inside the guest OS (so it goes to Stopped, not Deallocated), the next start sent with az vm start succeeds, but Azure stops the VM again within a few seconds and the guest never boots. The same start sent with api-version=2025-11-01, which the Azure portal uses, boots the VM.
The cause appears to be the api-version. Azure CLI 2.91.0 sends the start request with api-version=2022-11-01, and Compute Schedule may do the same. The Azure portal sends it with api-version=2025-11-01, and the VM starts.
Steps to reproduce:
- Start the VM (I use Ubuntu 24.04).
- Run
sudo poweroffinside the VM. - Wait until the VM is in the Stopped state.
- Run
az vm start -g <rg_name> -n <vm_name>, or start the VM with Compute Schedule. - The VM stays Stopped. Its Resource Health page shows the start, followed immediately by a stop.
Is there a way to use Compute Schedule to start a VM that is in the Stopped state, without deallocating it first?
Azure 虛擬機器
Azure 虛擬機器
登入以回答