Skip to content

Commit f2ee0e1

Browse files
authored
Merge pull request #268615 from Farha-Bano/New_article_Mar11
Added new article
2 parents 27487b3 + 2c9530c commit f2ee0e1

File tree

2 files changed

+169
-0
lines changed

2 files changed

+169
-0
lines changed
Lines changed: 167 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,167 @@
1+
---
2+
title: Remove your SCVMM environment from Azure Arc
3+
description: This article explains the steps to cleanly remove your SCVMM environment from Azure Arc and delete related Azure Arc resources from Azure.
4+
author: Farha-Bano
5+
ms.author: v-farhabano
6+
manager: jsuri
7+
ms.topic: how-to
8+
ms.date: 03/18/2024
9+
ms.service: azure-arc
10+
ms.subservice: azure-arc-scvmm
11+
ms.custom:
12+
# Customer intent: As an infrastructure admin, I want to cleanly remove my SCVMM environment from Azure Arc.
13+
---
14+
15+
# Remove your SCVMM environment from Azure Arc
16+
17+
> [!CAUTION]
18+
> This article references CentOS, a Linux distribution that is nearing End Of Life (EOL) status. Please consider your use and planning accordingly.
19+
20+
In this article, you learn how to cleanly remove your SCVMM managed environment from Azure Arc-enabled SCVMM. For SCVMM environments that you no longer want to manage with Azure Arc-enabled SCVMM, follow the steps in the article to:
21+
22+
1. Remove guest management from SCVMM virtual machines
23+
2. Remove your SCVMM environment from Azure Arc
24+
3. Remove Arc resource bridge related items in your SCVMM management server
25+
26+
## 1. Remove guest management from SCVMM virtual machines
27+
To prevent continued billing of Azure management services after you remove the SCVMM environment from Azure Arc, you must first cleanly remove guest management from all Arc-enabled SCVMM virtual machines where it was enabled. When you enable guest management on Arc-enabled SCVMM virtual machines, the Arc connected machine agent is installed on them.
28+
29+
Once guest management is enabled, you can install VM extensions on them and use Azure management services like the Log Analytics on them. To cleanly remove guest management, you must follow the steps below to remove any VM extensions from the virtual machine, disconnect the agent, and uninstall the software from your virtual machine. It's important to complete each of the three steps to fully remove all related software components from your virtual machines.
30+
31+
### Step 1: Remove VM extensions
32+
33+
If you have deployed Azure VM extensions to an Azure Arc-enabled SCVMM VM, you must uninstall the extensions before disconnecting the agent or uninstalling the software. Uninstalling the Azure Connected Machine agent doesn't automatically remove extensions, and they won't be recognized if you later connect the VM to Azure Arc again. Uninstall extensions using the following steps:
34+
35+
1. Go to [Azure Arc center in Azure portal](https://portal.azure.com/#blade/Microsoft_Azure_HybridCompute/AzureArcCenterBlade/overview)
36+
37+
2. Select **SCVMM management servers**.
38+
39+
3. Search and select the VMM management server you want to remove from Azure Arc.
40+
41+
4. Select Virtual machines under SCVMM inventory.
42+
43+
5. Search and select the virtual machine where you have Guest Management enabled.
44+
45+
6. Select Extensions.
46+
47+
7. Select the extensions and select Uninstall.
48+
49+
### Step 2: Disconnect the agent from Azure Arc
50+
51+
Disconnecting the agent clears the local state of the agent and removes agent information from our systems. To disconnect the agent, sign-in and run the following command as an administrator/root account on the virtual machine.
52+
53+
```powershell
54+
azcmagent disconnect --force-local-only
55+
```
56+
57+
### Step 3: Uninstall the agent
58+
59+
#### For Windows virtual machines
60+
61+
To uninstall the Windows agent from the machine, do the following:
62+
63+
1. Sign in to the computer with an account that has administrator permissions.
64+
2. In Control Panel, select Programs and Features.
65+
3. In Programs and Features, select Azure Connected Machine Agent, select Uninstall, and then select Yes.
66+
4. Delete the `C:\Program Files\AzureConnectedMachineAgent` folder.
67+
68+
#### For Linux virtual machines
69+
70+
To uninstall the Linux agent, the command to use depends on the Linux operating system. You must have `root` access permissions or your account must have elevated rights using sudo.
71+
72+
- For Ubuntu, run the following command:
73+
74+
```bash
75+
sudo apt purge azcmagent
76+
```
77+
78+
- For RHEL, CentOS, Oracle Linux run the following command:
79+
80+
```bash
81+
sudo yum remove azcmagent
82+
```
83+
84+
- For SLES, run the following command:
85+
86+
```bash
87+
sudo zypper remove azcmagent
88+
```
89+
90+
## 2. Remove your SCVMM environment from Azure Arc
91+
92+
You can remove your SCVMM resources from Azure Arc using either the deboarding script or manually.
93+
94+
### Remove SCVMM managed resources from Azure Arc using deboarding script
95+
96+
Download the [deboarding script](https://download.microsoft.com/download/a/d/b/adb5650c-5c90-4e94-8a93-2a4707c2020a/arcscvmm-deboard-windows.ps1) to do a full cleanup of all the Arc-enabled SCVMM resources. The script removes all the Azure resources, including SCVMM management server, custom location, virtual machines, virtual templates, hosts, clusters, resource pools, datastores, virtual networks, Azure Resource Manager (ARM) resource of Appliance, and the appliance VM running on the SCVMM management server.
97+
98+
#### Run the script
99+
100+
To run the deboarding script, follow these steps:
101+
102+
##### Windows
103+
1. Open a PowerShell window as an Administrator and go to the folder where you've downloaded the PowerShell script.
104+
105+
2. Run the following command to allow the script to run because it's an unsigned script. (If you close the session before you complete all the steps, run this command again for the new session.)
106+
107+
```powershell-interactive
108+
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass
109+
```
110+
3. Run the script.
111+
112+
```powershell-interactive
113+
./arcvmm-deboard-windows.ps1
114+
```
115+
116+
#### Inputs for the script
117+
118+
- **vmmServerId**: The Azure resource ID of the SCVMM management server resource. </br> For example: */subscriptions/204898ee-cd13-4332-1111-88ca5c11111c/resourceGroups/Synthetics/providers/Microsoft.ScVmm/VMMServers/scvmmserverresource*
119+
120+
- **ApplianceConfigFilePath (optional)**: Path to kubeconfig, output from deploy command. Providing applianceconfigfilepath also deletes the appliance VM running on the SCVMM management server.
121+
122+
- **Force**: Using the Force flag deletes all the Azure resources without reaching resource bridge. Use this option if resource bridge VM isn't in running state.
123+
124+
### Remove SCVMM managed resources from Azure manually
125+
126+
If you aren't using the deboarding script, follow these steps to remove the SCVMM resources manually:
127+
128+
>[!NOTE]
129+
>When you enable SCVMM resources in Azure, an Azure resource representing them is created. Before you can delete the SCVMM management server resource in Azure, you must delete all the Azure resources that represent your related SCVMM resources.
130+
131+
1. Go to [Azure Arc center in Azure portal](https://portal.azure.com/#blade/Microsoft_Azure_HybridCompute/AzureArcCenterBlade/overview)
132+
133+
2. Select **SCVMM management servers**.
134+
135+
3. Search and select the SCVMM management server you want to remove from Azure Arc.
136+
137+
4. Select **Virtual machines** under **SCVMM inventory**.
138+
139+
5. Select all the VMs that have **Virtual hardware management** value as **Enabled**.
140+
141+
6. Select **Remove from Azure**.
142+
143+
This action only removes these resource representations from Azure. The resources continue to remain in your SCVMM management server.
144+
145+
7. Do the steps 4, 5, and 6 for **Clouds**, **VM networks**, and **VM templates** by performing **Remove from Azure** operation for resources with **Azure Enabled** value as **Yes**.
146+
147+
8. Once the deletion is complete, select **Overview**.
148+
149+
9. Note the **Custom location** and the **Azure Arc Resource bridge** resource in the **Essentials** section.
150+
151+
10. Select **Remove from Azure** to remove the SCVMM management server resource from Azure.
152+
153+
11. Go to the noted **Custom location** resource and select **Delete**
154+
155+
12. Go to the noted **Azure Arc Resource bridge** resource and select **Delete**
156+
157+
At this point, all your Arc-enabled SCVMM resources are removed from Azure.
158+
159+
## 3. Remove Arc resource bridge related items in your VMM management server
160+
161+
During onboarding, to create a connection between your SCVMM management server and Azure, an Azure Arc resource bridge was deployed in your SCVMM managed environment. As the last step, you must delete the resource bridge VM and the VM template created during the onboarding.
162+
163+
You can find both the virtual machine and the template on the resource pool/cluster/host/cloud that you provided during [Azure Arc-enabled SCVMM onboarding](./quickstart-connect-system-center-virtual-machine-manager-to-arc.md).
164+
165+
## Next steps
166+
167+
[Connect your System Center Virtual Machine Manager management server to Azure Arc again](./quickstart-connect-system-center-virtual-machine-manager-to-arc.md).

articles/azure-arc/system-center-virtual-machine-manager/toc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@
4646
items:
4747
- name: Administer Arc-enabled SCVMM
4848
href: administer-arc-scvmm.md
49+
- name: Remove your SCVMM environment from Azure Arc
50+
href: remove-scvmm-from-azure-arc.md
4951
- name: Perform recovery operations for Arc resource bridge
5052
href: disaster-recovery.md
5153

0 commit comments

Comments
 (0)