A Microsoft cloud service that enables deployment of Azure services across hybrid and multicloud environments.
You are right that this is a script-side gap, not a config issue on your end. The azcmagent partnerconfig command is officially marked as"Reserved for internal use" in the azcmagent CLI reference, so it isn't something you are expected to work around from outside the script. The azcmagent_check_updates.ps1 script that runs under the azcmagent scheduled task is the one that must handle the "serialNumber not yet set" condition and fall through to initialize hcrp. As you noted, it currently exits on the first thrown exception instead, which is why the task stays stuck in Running.
This path is part of the Automatic Agent Upgrade (Preview) feature. Automatic Agent Upgrade is still in Public Preview and the product group is actively iterating on the launcher/check scripts for example, 1.64 already shipped a related fix ("removed false positives from the upgrade launcher script") per the What's new with Azure Connected Machine agent release notes.
Interim workaround while a fix is released:
- End the hung scheduled task:
Stop-ScheduledTask -TaskName azcmagentand confirm the state returns to Ready. - Temporarily disable Automatic Agent Upgrade on the affected machine by setting
agentUpgrade.enableAutomaticUpgradetofalsevia ARM (see Manage Azure Connected Machine agent versions). - Upgrade the agent manually until the script fix ships — either through Microsoft Update, the MSI, or the
azcmagent upgradecommand (supported on 1.62+).
Please keep an eye on the release notes — the fix will be called out there once it lands. If this response addressed your question
If you have further questions regarding this answer, feel free to click "Comment". If you find the answer helpful, please click "upvote" and accept it. This helps the community by allowing others with similar queries to easily find the solution.