FIX: Cannot enable Update Management because VM reports to other Workspace(OMS)

Are we talking about the same thing?

Hereby a small summary of the error message, so that we know for sure that we are talking about the same thing.

I want to add new servers in Azure Automation – Update Management. I get one of these error messages while adding to Update Management:

1.

The solution cannot be enabled on this VM because the VM already has the management agent but the workspace associated with the agent cannot be found within the subscription.

2.

Cannot enable – VM Reports to workspace ‘OTHERWORKSPACE’.

The Virtual Machine is already linked to another Workspace(OMS) in your own subscription, but can also be linked to workspace(OMS) in another subscription.

Cannot enable - VM Reports to workspace 'OTHERWORKSPACE'.
Cannot enable – VM Reports to workspace ‘OTHERWORKSPACE’.

Just let me enable Update Management in Azure Automation.

Okay the solution is pretty easy.

When you add a Virtual Machine to a Workspace, or Azure Automation, the server is then automatically linked to the OMS that is linked to Azure Automation, the Virtual Machine receives a new Extension: “Microsoft Monitoring Agent”.

If you remove the Microsoft Monitoring Agent extension from the VM, the Virtual Machine is disconnected from the Workspace(OMS), and you can then link the Virtual Machine with Azure Automation Update Management.


Please guide me through the steps!

Go to the virtual machine in Azure “Virtual Machines”

Search in the VM menu for Extensions.

The solution cannot be enabled on this VM because the VM already has the management agent but the workspace associated with the agent cannot be found within the subscription.
The solution cannot be enabled on this VM because the VM already has the management agent but the workspace associated with the agent cannot be found within the subscription.

Here you can see the Microsoft Monitoring Agent.
Click on the 3 dots and choose uninstall.

The solution cannot be enabled on this VM because the VM already has the management agent but the workspace associated with the agent cannot be found within the subscription.
Cannot enable – VM Reports to workspace ‘OTHERWORKSPACE’.

Click Yes to remove the extension.

As you can see in the screenshot below, the Extension will now be removed.

The solution cannot be enabled on this VM because the VM already has the management agent but the workspace associated with the agent cannot be found within the subscription.
Cannot enable – VM Reports to workspace ‘OTHERWORKSPACE’.

When you now go back to Azure Automation – Update Management, or go to Update Management via the VM, you will see that you can add the VM to Azure Automation.

The solution cannot be enabled on this VM because the VM already has the management agent but the workspace associated with the agent cannot be found within the subscription.
The solution cannot be enabled on this VM because the VM already has the management agent but the workspace associated with the agent cannot be found within the subscription.

Recap

I happened to encounter this problem in my own test environment. The Servers that you see in the screenshots are from my test environment.

I sometimes connect a server to a client or to test a script like that. The first time I ran into this, I did a bit of troubleshooting before I found this.

Now that I came across it again, I thought why didn’t I actually make a blog post of it?

Published by

Bas Wijdenes

My name is Bas Wijdenes and I work as a PowerShell DevOps Engineer. In my spare time I write about interesting stuff that I encounter during my work.

Leave a Reply

Your email address will not be published. Required fields are marked *