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

Eccup Reservoir 66 Reputation points
2023-11-07T17:58:12.7966667+00:00

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?
Thanks!

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

Accepted answer
  1. Ryan Hill 27,111 Reputation points Microsoft Employee
    2023-11-13T20:45:12.4633333+00:00

    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