You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/virtual-machines/states-billing.md
+38-23Lines changed: 38 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
---
2
-
title: States and billing of Azure Virtual Machines
2
+
title: States and billing status of Azure Virtual Machines
3
3
description: Overview of various states a VM can enter and when a user is billed.
4
4
services: virtual-machines
5
5
author: mimckitt
@@ -11,7 +11,7 @@ ms.author: mimckitt
11
11
ms.reviewer: cynthn
12
12
---
13
13
14
-
# States and billing of Azure Virtual Machines
14
+
# States and billing status of Azure Virtual Machines
15
15
16
16
**Applies to:**:heavy_check_mark: Linux VMs :heavy_check_mark: Windows VMs :heavy_check_mark: Flexible scale sets :heavy_check_mark: Uniform scale sets
17
17
@@ -21,14 +21,14 @@ Azure Virtual Machines (VMs) go through different states that can be categorized
21
21
22
22
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.
23
23
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/).
25
25
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>]`.
27
27
28
28
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*.
29
29
30
30
> [!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.
32
32
33
33
## Power states and billing
34
34
@@ -47,35 +47,50 @@ The following table provides a description of each instance state and indicates
47
47
| Deallocating | This is the transitional state between running and deallocated. | Not billed*|
48
48
| 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*|
49
49
50
-
* 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.
51
50
51
+
**Example of PowerState in JSON**
52
52
53
-
## Provisioning states
53
+
```json
54
+
{
55
+
"code": "PowerState/running",
56
+
"level": "Info",
57
+
"displayStatus": "VM running"
58
+
}
59
+
```
54
60
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
+
* 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.
56
62
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.":::
58
63
59
-
| Provisioning state | Description | Power state | Billing |
| 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 |
| 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
65
65
66
-
* 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. |
67
76
68
77
## 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`.
70
79
71
80
:::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.":::
72
81
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).
0 commit comments