Skip to content

Commit d529ad0

Browse files
Merge pull request #178159 from mimckitt/patch-21
Update states-billing.md
2 parents cde4e5a + 58f3e5a commit d529ad0

File tree

1 file changed

+38
-23
lines changed

1 file changed

+38
-23
lines changed

articles/virtual-machines/states-billing.md

Lines changed: 38 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: States and billing of Azure Virtual Machines
2+
title: States and billing status of Azure Virtual Machines
33
description: Overview of various states a VM can enter and when a user is billed.
44
services: virtual-machines
55
author: mimckitt
@@ -11,7 +11,7 @@ ms.author: mimckitt
1111
ms.reviewer: cynthn
1212
---
1313

14-
# States and billing of Azure Virtual Machines
14+
# States and billing status of Azure Virtual Machines
1515

1616
**Applies to:** :heavy_check_mark: Linux VMs :heavy_check_mark: Windows VMs :heavy_check_mark: Flexible scale sets :heavy_check_mark: Uniform scale sets
1717

@@ -21,14 +21,14 @@ Azure Virtual Machines (VMs) go through different states that can be categorized
2121

2222
The instance view API provides VM running-state information. For more information, see the [Virtual Machines - Instance View](/rest/api/compute/virtualmachines/instanceview) API documentation.
2323

24-
Azure Resources explorer provides a simple UI for viewing the VM running state: [Resource Explorer](https://resources.azure.com/).
24+
Azure Resources Explorer provides a simple UI for viewing the VM running state: [Resource Explorer](https://resources.azure.com/).
2525

26-
Provisioning states are visible on VM properties and instance view. Power states are available in instance view of VM.
26+
The VM provisioning state is available (in slightly different forms) from within the VM properties `provisioningState` and the InstanceView. In the VM InstanceView there will be an element within the `status` array in the form of `ProvisioningState/<state>[/<errorCode>]`.
2727

2828
To retrieve the power state of all the VMs in your subscription, use the [Virtual Machines - List All API](/rest/api/compute/virtualmachines/listall) with parameter **statusOnly** set to *true*.
2929

3030
> [!NOTE]
31-
> [Virtual Machines - List All API](/rest/api/compute/virtualmachines/listall) with parameter **statusOnly** set to true will retrieve the power states of all VMs in a subscription. However, in some rare situations, the power state may not available due to intermittent issues in the retrieval process. In such situations, we recommend retrying using the same API or using [Azure Resource Health](../service-health/resource-health-overview.md) or [Azure Resource Graph](..//governance/resource-graph/overview.md) to check the power state of your VMs.
31+
> [Virtual Machines - List All API](/rest/api/compute/virtualmachines/listall) with parameter **statusOnly** set to true will retrieve the power states of all VMs in a subscription. However, in some rare situations, the power state may not available due to intermittent issues in the retrieval process. In such situations, we recommend retrying using the same API or using [Azure Resource Health](../service-health/resource-health-overview.md) to check the power state of your VMs.
3232
3333
## Power states and billing
3434

@@ -47,35 +47,50 @@ The following table provides a description of each instance state and indicates
4747
| Deallocating | This is the transitional state between running and deallocated. | Not billed* |
4848
| Deallocated | The Virtual Machine has released the lease on the underlying hardware and is completely powered off. This state is also referred to as *Stopped (Deallocated)*. | Not billed* |
4949

50-
&#42; Some Azure resources, such as [Disks](https://azure.microsoft.com/pricing/details/managed-disks) and [Networking](https://azure.microsoft.com/pricing/details/bandwidth/) will continue to incur charges.
5150

51+
**Example of PowerState in JSON**
5252

53-
## Provisioning states
53+
```json
54+
{
55+
"code": "PowerState/running",
56+
"level": "Info",
57+
"displayStatus": "VM running"
58+
}
59+
```
5460

55-
A provisioning state is the status of a user-initiated, control-plane operation on the VM. These states are separate from the power state of a VM.
61+
&#42; Some Azure resources, such as [Disks](https://azure.microsoft.com/pricing/details/managed-disks) and [Networking](https://azure.microsoft.com/pricing/details/bandwidth/) will continue to incur charges.
5662

57-
:::image type="content" source="./media/virtual-machines-common-states-lifecycle/vm-provisioning-states.png" alt-text="Image shows the provisioning states a VM can go through.":::
5863

59-
| Provisioning state | Description | Power state | Billing |
60-
|---|---|---|---|
61-
| Create | Virtual machine creation. | Starting | Not billed* |
62-
| Update | Updates the model for an existing virtual machine. Some non-model changes to a virtual machine such as start and restart fall under the update state. | Running | Billed |
63-
| Delete | Virtual machine deletion. | Deallocating | Not billed* |
64-
| Deallocate | Virtual machine is fully stopped and removed from the underlying host. Deallocating a virtual machine is considered an update and will display provisioning states similar to updating. | Deallocating | Not billed* |
64+
## Provisioning states
6565

66-
&#42; Some Azure resources, such as [Disks](https://azure.microsoft.com/pricing/details/managed-disks) and [Networking](https://azure.microsoft.com/pricing/details/bandwidth/) will continue to incur charges.
66+
The provisioning state is the status of a user-initiated, control-plane operation on the VM. These states are separate from the power state of a VM.
67+
68+
| Provisioning state | Description |
69+
|---|---|
70+
| Creating | Virtual machine is being created. |
71+
| Updating | Virtual machine is updating to the latest model. Some non-model changes to a virtual machine such as start and restart fall under the updating state. |
72+
| Failed | Last operation on the virtual machine resource was not successful. |
73+
| Succeeded | Last operation on the virtual machine resource was successful. |
74+
| Deleting | Virtual machine is being deleted. |
75+
| Migrating | Seen when migrating from Azure Service Manager to Azure Resource Manager. |
6776

6877
## OS Provisioning states
69-
OS Provisioning states only apply to virtual machines created with an OS image. Specialized images will not display these states.
78+
OS Provisioning states only apply to virtual machines created with a [generalized](./linux/imaging.md#generalized-images) OS image. [Specialized](./linux/imaging.md#specialized-images) images and disks attached as OS disk will not display these states. The OS provisioning state is not shown separately. It is a sub-state of the Provisioning State in the VM instanceView. For example, `ProvisioningState/creating/osProvisioningComplete`.
7079

7180
:::image type="content" source="./media/virtual-machines-common-states-lifecycle/os-provisioning-states.png" alt-text="Image shows the OS provisioning states a VM can go through.":::
7281

73-
| OS Provisioning state | Description | Power state | Billing |
74-
|---|---|---|---|
75-
| OSProvisioningInProgress | The VM is running and the installation of the Guest OS is in progress. | Running | Billed |
76-
| OSProvisioningComplete | This is a short-lived state. The virtual machine quickly transitions from this state to **Success**. If extensions are still being installed you will continue to see this state until they are complete. | Running | Billed |
77-
| Succeeded | The user-initiated actions have completed. | Running | Billed |
78-
| Failed | Represents a failed operation. Refer to the error code for more information and possible solutions. | Running | Billed |
82+
| OS Provisioning state | Description |
83+
|---|---|
84+
| OSProvisioningInProgress | The VM is running and the initialization (setup) of the Guest OS is in progress. |
85+
| OSProvisioningComplete | This is a short-lived state. The virtual machine quickly transitions from this state to **Success**. If extensions are still being installed you will continue to see this state until they are complete. |
86+
| Succeeded | The user-initiated actions have completed. |
87+
| Failed | Represents a failed operation. Refer to the error code for more information and possible solutions. |
88+
89+
## Troubleshooting VM states
90+
91+
To troubleshoot specific VM state issues, see [Troubleshoot Windows VM deployments](https://docs.microsoft.com/troubleshoot/azure/virtual-machines/troubleshoot-deployment-new-vm-windows) and [Troubleshoot Linux VM deployments](https://docs.microsoft.comtroubleshoot/azure/virtual-machines/troubleshoot-deployment-new-vm-linux).
92+
93+
For other troubleshooting help visit [Azure Virtual Machines troubleshooting documentation](https://docs.microsoft.com/troubleshoot/azure/virtual-machines/welcome-virtual-machines).
7994

8095

8196
## Next steps

0 commit comments

Comments
 (0)