How to remove Azure Arc VM from Log Analytics Workspace & Automation account?

Eccup Reservoir 66 Reputation points

Had a VM onboarded to Arc in Subscription A, connected to Log Analytics Workspace A / Automation Account A.

I moved the Arc VM from Subscription A to Subscription B, which passed validation etc, but it the VM was still connected the LAW and AA from Subscription A.

Things I've tried, to 'unhook it' from them;

  • Logged onto the VM and ran azcmagent disconnect
  • Uninstalled extensions from the Arc VM object.
  • Removed and re-added the VM into Arc, using the onboarding script generated in Subscription B.

Any other ideas?

Azure Arc
Azure Arc
A Microsoft cloud service that enables deployment of Azure services across hybrid and multicloud environments.
358 questions
Azure Automation
Azure Automation
An Azure service that is used to automate, configure, and install updates across hybrid environments.
1,161 questions
Azure Update Manager
Azure Update Manager
An Azure service to centrally manages updates and compliance at scale.
262 questions
0 comments No comments
{count} votes

Accepted answer
  1. Ryan Hill 26,771 Reputation points Microsoft Employee

    Hi @Eccup Reservoir

    Check to see if the VM is still listed in the Log Analytics Workspace in subscription A.

    1. Sign in to the Azure portal.
    2. Navigate to the Log Analytics Workspace and Automation account in Subscription A.
    3. In the left-hand menu, select "Virtual Machine (deprecated)" under the "Classic" section.
    4. Check if the VM is still listed in the connected machines list.
    5. If the VM is still listed, select it from the list and click on the "Disconnect" button to remove it from the Log Analytics Workspace and Automation account.

    If this fails to work, please comment down below with any error messages you received from the portal or the VM itself after running cmdlets.

0 additional answers

Sort by: Most helpful