Azure CLI to check VM status

xpt

Azure CLI allows people to start & stop VMs.

However, is there any Azure CLI command that can show the VM status? I.e., whether it is started or being stopped? Thx.

ironman

You can use the '-d' flag with list and status for all VMs

az vm list -d -o table

For single VM, you can use:

az vm list -d -o table --query "[?name=='vm-name']"

If you need more specific results then you can also try:

az vm list -d --query "[?powerState=='VM running']" -o table

この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。

侵害の場合は、連絡してください[email protected]

編集
0

コメントを追加

0

関連記事

分類Dev

Passing Secret from keyvault as password of Azure VM using Azure CLI wrapped in Python

分類Dev

How do you check the status of a SQL Import Export Operation in Azure?

分類Dev

Azure CLI(Cloud Shell-Bash)を使用してVMを作成する

分類Dev

Azure CLI、domainNamesを使用してVMを作成する

分類Dev

Azure CLI 2.0:az vm update --set / -removeが機能しませんか?

分類Dev

Azure VM InternalDnsSuffix

分類Dev

Check status of AWS job

分類Dev

Check status of Mysql replication

分類Dev

Azure CLI vs Powershell?

分類Dev

Azure CLI vs Powershell?

分類Dev

Schedule Azure CLI Script

分類Dev

How to scale Azure VM Cores

分類Dev

Terraform Azure VM SSH Key

分類Dev

Azure VM machine restore issues

分類Dev

Hacking attempts to Linux VM in Azure

分類Dev

How to get check status for check box in jquery

分類Dev

Azure CLIは、異なるリージョンのイメージからVMを作成します

分類Dev

Query to check postgresql database status

分類Dev

How to check worker status in Asyncio?

分類Dev

Azure SQL Database vs Azure SQL on VM

分類Dev

Can I check is hardware alright using VM?

分類Dev

SSH connect from local windows VM to Azure windows VM

分類Dev

Creating application insights with azure cli

分類Dev

azure cli vmcreateタグ

分類Dev

Calling Azure functions through the Azure CLI

分類Dev

Azure PaaS Compatibility Check

分類Dev

Execute script inside azure VM programmatically

分類Dev

Stop and deallocate an Azure VM within the guest OS

分類Dev

Azure VM SQLServerアクセス