Troubleshooting machine provisioning state failed errors
Topic
This article covers the context around pairing failures, referencing the machine's provisioning state. This can include:
The virtual machine's provisioningState must equal "Succeeded" for agent installation to proceed. Please correct this issue on the target VM and try again.
Environment
- Datto Backup for Microsoft Azure
Description
Attempting to pair a system with a Datto Backup for Microsoft Azure device, will fail if the machine is reporting provisioning state other than Succeeded. This can apply to extension or application's provisioning state as well.
This can be caused the machine processing an action requested, or issues completing a previous action. An example of this would be:
OS Provisioning for VM 'hostname' did not finish in the allotted time. The VM may still finish provisioning successfully. Please check provisioning state later. For details on how to check current provisioning state of Windows VMs, refer to https://aka.ms/WindowsVMLifecycle and Linux VMs, refer to https://aka.ms/LinuxVMLifecycle.
The provisioning state on the machine could be:
- Creating: The VM is currently being provisioned and has not yet been fully created.
- Updating: The VM is undergoing an update process.
- Deleting: The VM is in the process of being deleted.
- Succeeded: The last operation on the VM was successful.
- Failed: The last operation on the VM encountered an error.
- Locked: The VM's provisioning state is locked, preventing further changes.
The state will need to be addressed and confirmed to be "Succeeded" before pairing can continue.
Checking current provisioning state
Using Azure Resource Explorer:
-
Open the Azure Resource Explorer from All resources in the Azure portal.
-
Navigate to the VM within the Resource Groups and Resources sections.
-
The "ProvisioningState" property within the VM's details will show the current provisioning state.
Using Azure PowerShell:
-
Connect to your Azure account using:
Connect-AzAccount
-
Use the following cmdlet to retrieve information about the VM.
Get-AzVM
-
The "provisioningState" property in the output will show the VM's current provisioning state.
To check an application or extension's provisioning state:
-
Navigate to the relevant virtual machine.
-
Select Settings.
-
Select Extensions + applications.
-
Select the application or extension, then view the Status message to check the provisioning state for each extension or instance.
Troubleshooting
If it is reporting a failed provisioning state, rebooting the virtual machine may reset it, depending on the process that failed to complete.
If the pairing fails referencing the provisioning state, but it is reporting Succeeded, run the following Azure Resource Graph query to provide support, making sure to update the LOCATION with the region code of your subscription:
resources
| where location =~ "LOCATION"
| where type =~ "microsoft.compute/virtualmachines"
| extend vmId = id
| project
id = vmId,
name = name,
powerState = tostring(properties.extended.instanceView.powerState.displayStatus),
provisioningState = tostring(properties.provisioningState),
osDisk = properties.storageProfile.osDisk,
os = tostring(properties.storageProfile.osDisk.osType),
vmSize = properties.hardwareProfile.vmSize,
dataDisks = properties.storageProfile.dataDisks
| join kind=leftouter (
resources
| where type =~ "microsoft.compute/disks"
| extend diskSizeGb = toint(properties.diskSizeGB)
| extend managedByNormalized = tostring(split(managedBy, "/")[ -1 ])
| summarize diskSizeGb = sum(diskSizeGb) by managedByNormalized
| project vmId = managedByNormalized, diskSizeGb
) on $left.id == $right.vmId
| project
id,
name,
powerState,
provisioningState,
osDisk,
os,
dataDisks,
vmSize,
diskSizeGb
For more information on Azure Resource Graphs and how to run a query, refer to the Microsoft documentation.