Kaido Jarvemets - Logo

Don’t Just Set It and Forget It: Ensuring Your Azure Arc Extensions Work Properly

Introduction

Managing Azure Arc machines requires more than just monitoring the status of assigned extensions. Administrators need to verify the operational state of these extensions to ensure they are functioning properly. This process helps identify extensions that might be assigned but are not working at all, potentially affecting different Azure Arc for Servers workloads.

Listing Extensions: A First Step

You can list all the extensions from the Azure Resource Graph Explorer using the following KQL query. Remember, just because an extension appears in this list doesn’t mean it’s functioning correctly:

				
					resources
| where type == "microsoft.hybridcompute/machines/extensions"

				
			

How to Identify Problematic Extensions

To manage this issue, utilize the following KQL query to check the provisioning states of extensions across Azure Arc machines:

				
					resources | where type == "microsoft.hybridcompute/machines"
| project ServerName = tostring(name)
| join kind = inner ( resources 
    | where type == "microsoft.hybridcompute/machines/extensions" 
    | extend ServerName = tostring(split(tostring(id),"/",8)[0])
    | extend ["Provisioning State"] = properties.provisioningState
    | where  ["Provisioning State"] != "Succeeded"
    | extend Extension = name
    )
    on ServerName
| project ServerName, Extension,["Provisioning State"]
				
			

This query lists all Azure Arc for Servers machine extensions where the ProvisioningState is not “Succeeded.” Alternatively, if you prefer not to use the KQL query, the Get-AzConnectedMachineExtension cmdlet can list the machine extensions. You can then filter out those that are not in an acceptable state.

Dealing with Blocked UI and Extension Issues

In many cases, the UI for managing extensions in the Azure Portal may be entirely blocked, preventing any direct action on extensions that are failing or updating improperly. In such case you can try to use the Remove-AzConnectedMachineExtension cmdlet.

If you see that the PowerShell cmdlet is not working either, you need to contact with the support.

Leave a Reply

Contact me

If you’re interested in learning about Don’t Just Set It and Forget It: Ensuring Your Azure Arc Extensions Work Properly. I can help you understand how this solution can benefit your organization and provide a customized solution tailored to your specific needs.

Table of Contents