Issue with New-AzAutomationSoftwareUpdateConfiguration - not registered VM
i currently have a problem with onboarding vms to the updatemanagement. I have this issue also in other tenants.
Steps to reproduce:
- Deployment of the Automation Account and LogAnalytics
- Adding the VM to the UpdateManagment
- Use New-AzAutomationSoftwareUpdateConfiguration to create a update configuration.
Then there is the error:
You have requested to create an update configuration on a machine that is not registered for Update Management. Assure that the machine is registered for Update Management. Machine Name(s) or Id(s): /subscriptions/xxxxxx/resourceGroups/xxxx/providers/Microsoft.Compute/virtualMachines/xxxxxxx/subscriptions/xxxxxxx/resourceGroups/xxxxx/providers/Microsoft.Compute/virtualMachines/xxxxx.
According to the Add-AzureVM window to update management, the VM is already enabled.
At the moment we solve the problem so that we always wait one day after adding.
This is not really a good way though.
Sometimes it may even happen that the onboard does not work anymore and we then have to set up a new automation account.