Skip to content

Commit dcc8e27

Browse files
authored
Merge pull request #108931 from MGoedtel/task1700506
new agent manage article
2 parents 649da1a + b81ff1d commit dcc8e27

File tree

4 files changed

+192
-62
lines changed

4 files changed

+192
-62
lines changed
Lines changed: 174 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,174 @@
1+
---
2+
title: Managing the Azure Arc for servers (preview) agent
3+
description: This article describes the different management tasks that you will typically perform during the lifecycle of the Azure Arc for servers Connected Machine agent.
4+
services: azure-arc
5+
ms.service: azure-arc
6+
ms.subservice: azure-arc-servers
7+
author: mgoedtel
8+
ms.author: magoedte
9+
ms.date: 03/24/2020
10+
ms.topic: conceptual
11+
---
12+
13+
# Managing and maintaining the Connected Machine agent
14+
15+
After initial deployment of the Azure Arc for servers (preview) Connected Machine agent for Windows or Linux, you may need to reconfigure the agent, upgrade it, or remove it from the computer if it has reached the retirement stage in its lifecycle. You can easily manage these routine maintenance tasks manually or through automation, which reduces both operational error and expenses.
16+
17+
## Upgrading agent
18+
19+
The Azure Connected Machine agent for Windows and Linux can be upgraded to the latest release manually or automatically depending on your requirements. The following table describes the methods supported to perform the agent upgrade.
20+
21+
| Operating system | Upgrade method |
22+
|------------------|----------------|
23+
| Windows | Manually<br> Windows Update |
24+
| Ubuntu | [Apt](https://help.ubuntu.com/lts/serverguide/apt.html) |
25+
| SUSE Linux Enterprise Server | [zypper](https://en.opensuse.org/SDB:Zypper_usage_11.3) |
26+
| RedHat Enterprise, Amazon, CentOS Linux | [yum](https://wiki.centos.org/PackageManagement/Yum) |
27+
28+
### Windows agent
29+
30+
To update the agent on a Windows machine to the latest version, the agent is available from Microsoft Update and can be deployed using your existing software update management process. It can also be run manually from the Command Prompt, from a script or other automation solution, or from the UI wizard by executing `AzureConnectedMachine.msi`.
31+
32+
> [!NOTE]
33+
> * To upgrade the agent, you must have *Administrator* permissions.
34+
> * To upgrade manually, you must first download and copy the Installer package to a folder on the target server, or from a shared network folder.
35+
36+
If you are unfamiliar with the command-line options for Windows Installer packages, review [Msiexec standard command-line options](https://docs.microsoft.com/windows/win32/msi/standard-installer-command-line-options) and [Msiexec command-line options](https://docs.microsoft.com/windows/win32/msi/command-line-options).
37+
38+
#### To upgrade using the Setup Wizard
39+
40+
1. Sign on to the computer with an account that has administrative rights.
41+
42+
2. Execute **AzureConnectedMachineAgent.msi** to start the Setup Wizard.
43+
44+
The Setup Wizard discovers if a previous version exists, and then it automatically performs an upgrade of the agent. When the upgrade completes, the Setup Wizard automatically closes.
45+
46+
#### To upgrade from the command line
47+
48+
1. Sign on to the computer with an account that has administrative rights.
49+
50+
2. To upgrade the agent silently and create a setup log file in the `C:\Support\Logs` folder, run the following command.
51+
52+
```dos
53+
msiexec.exe /i AzureConnectedMachineAgent.msi /qn /l*v "C:\Support\Logs\Azcmagentupgradesetup.log"
54+
```
55+
56+
### Linux agent
57+
58+
To update the agent on a Linux machine to the latest version, it involves two commands. One command to update the local package index with the list of latest available packages from the repositories, and one command to upgrade the local package.
59+
60+
#### Upgrade Ubuntu
61+
62+
1. To update the local package index with the latest changes made in the repositories, run the following command:
63+
64+
```bash
65+
apt update
66+
```
67+
68+
2. To upgrade your system, run the following command:
69+
70+
```bash
71+
apt upgrade
72+
```
73+
74+
Actions of the [apt](https://help.ubuntu.com/lts/serverguide/apt.html) command, such as installation and removal of packages, are logged in the `/var/log/dpkg.log` log file.
75+
76+
#### Upgrade Red Hat/CentOS/Amazon Linux
77+
78+
1. To update the local package index with the latest changes made in the repositories, run the following command:
79+
80+
```bash
81+
yum check-update
82+
```
83+
84+
2. To upgrade your system, run the following command:
85+
86+
```bash
87+
yum update
88+
```
89+
90+
Actions of the [yum](https://access.redhat.com/articles/yum-cheat-sheet) command, such as installation and removal of packages, are logged in the `/var/log/yum.log` log file.
91+
92+
#### Upgrade SUSE Linux Enterprise
93+
94+
1. To update the local package index with the latest changes made in the repositories, run the following command:
95+
96+
```bash
97+
zypper refresh
98+
```
99+
100+
2. To upgrade your system, run the following command:
101+
102+
```bash
103+
zypper update
104+
```
105+
106+
Actions of the [zypper](https://en.opensuse.org/Portal:Zypper) command, such as installation and removal of packages, are logged in the `/var/log/zypper.log` log file.
107+
108+
## Remove the agent
109+
110+
Use one of the following procedures to uninstall the Windows or Linux agent using the command line or setup wizard described in this section. Before uninstalling the agent, first disconnect the machine from Azure Arc for servers (preview) by completing these steps:
111+
112+
1. Open Azure Arc for servers (preview) by going to the [Azure portal](https://aka.ms/hybridmachineportal).
113+
114+
2. Select the machine in the list, select the ellipsis (**...**), and then select **Delete**.
115+
116+
### Windows agent
117+
118+
#### Uninstall from Control Panel
119+
120+
1. To uninstall the Windows agent from the machine, do the following:
121+
122+
a. Sign in to the computer with an account that has administrator permissions.
123+
b. In **Control Panel**, select **Programs and Features**.
124+
c. In **Programs and Features**, select **Azure Connected Machine Agent**, select **Uninstall**, and then select **Yes**.
125+
126+
>[!NOTE]
127+
> You can also run the agent setup wizard by double-clicking the **AzureConnectedMachineAgent.msi** installer package.
128+
129+
#### Uninstall from the command line
130+
131+
To uninstall the agent manually from the Command Prompt or to use an automated method, such as a script, you can use the following example. First you need to retrieve the product code, which is a GUID that is the principal identifier of the application package, from the operating system. The uninstall is performed by using the Msiexec.exe command line - `msiexec /x {Product Code}`.
132+
133+
1. Open the Registry Editor.
134+
135+
2. Under registry key `HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall`, look for and copy the product code GUID.
136+
137+
3. You can then uninstall the agent by using Msiexec using the following examples:
138+
139+
* From the command-line type:
140+
141+
```dos
142+
msiexec.exe /x {product code GUID} /qn
143+
```
144+
145+
* You can perform the same steps using PowerShell:
146+
147+
```powershell
148+
Get-ChildItem -Path HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall | `
149+
Get-ItemProperty | `
150+
Where-Object {$_.DisplayName -eq "Azure Connected Machine Agent"} | `
151+
ForEach-Object {MsiExec.exe /x "$($_.PsChildName)" /qn}
152+
```
153+
154+
### Linux agent
155+
156+
To uninstall the Linux agent, the command to use depends on the Linux operating system.
157+
158+
- For Ubuntu, run the following command:
159+
160+
```bash
161+
sudo apt purge azcmagent
162+
```
163+
164+
- For RHEL, CentOS, and Amazon Linux, run the following command:
165+
166+
```bash
167+
sudo yum remove azcmagent
168+
```
169+
170+
- For SLES, run the following command:
171+
172+
```bash
173+
sudo zypper remove azcmagent
174+
```

articles/azure-arc/servers/onboard-portal.md

Lines changed: 13 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ ms.service: azure-arc
66
ms.subservice: azure-arc-servers
77
author: mgoedtel
88
ms.author: magoedte
9-
ms.date: 02/24/2020
9+
ms.date: 03/24/2020
1010
ms.topic: conceptual
1111
---
1212

@@ -60,16 +60,21 @@ You can install the Connected Machine agent manually by running the Windows Inst
6060
6161
If the machine needs to communicate through a proxy server to the service, after you install the agent you need to run a command that's described later in the article. This sets the proxy server system environment variable `https_proxy`.
6262

63-
The following table highlights the parameters that are supported by setup for the agent from the command line.
63+
If you are unfamiliar with the command-line options for Windows Installer packages, review [Msiexec standard command-line options](https://docs.microsoft.com/windows/win32/msi/standard-installer-command-line-options) and [Msiexec command-line options](https://docs.microsoft.com/windows/win32/msi/command-line-options).
6464

65-
| Parameter | Description |
66-
|:--|:--|
67-
| /? | Returns a list of the command-line options. |
68-
| /S | Performs a silent installation with no user interaction. |
65+
For example, run the installation program with the `/?` parameter to review the help and quick reference option.
6966

70-
For example, to run the installation program with the `/?` parameter, enter `msiexec.exe /i AzureConnectedMachineAgent.msi /?`.
67+
```dos
68+
msiexec.exe /i AzureConnectedMachineAgent.msi /?
69+
```
70+
71+
To install the agent silently and create a setup log file in the `C:\Support\Logs` folder, run the following command.
72+
73+
```dos
74+
msiexec.exe /i AzureConnectedMachineAgent.msi /qn /l*v "C:\Support\Logs\Azcmagentsetup.log"
75+
```
7176

72-
Files for the Connected Machine agent are installed in *C:\Program Files\AzureConnectedMachineAgent* by default. If the agent fails to start after setup is finished, check the logs for detailed error information. The log directory is *%Programfiles%\AzureConnectedMachineAgentAgent\logs*.
77+
Files for the Connected Machine agent are installed by default in *C:\Program Files\AzureConnectedMachineAgent*. If the agent fails to start after setup is finished, check the logs for detailed error information. The log directory is *%Programfiles%\AzureConnectedMachineAgentAgent\logs*.
7378

7479
### Install with the scripted method
7580

@@ -144,58 +149,6 @@ After you install the agent and configure it to connect to Azure Arc for servers
144149

145150
![A successful server connection](./media/onboard-portal/arc-for-servers-successful-onboard.png)
146151

147-
## Clean up
148-
149-
To disconnect a machine from Azure Arc for servers (preview), do the following:
150-
151-
1. Open Azure Arc for servers (preview) by going to the [Azure portal](https://aka.ms/hybridmachineportal).
152-
153-
1. Select the machine in the list, select the ellipsis (**...**), and then select **Delete**.
154-
155-
1. To uninstall the Windows agent from the machine, do the following:
156-
157-
a. Sign in to the computer with an account that has administrator permissions.
158-
b. In **Control Panel**, select **Programs and Features**.
159-
c. In **Programs and Features**, select **Azure Connected Machine Agent**, select **Uninstall**, and then select **Yes**.
160-
161-
>[!NOTE]
162-
> You can also run the agent setup wizard by double-clicking the **AzureConnectedMachineAgent.msi** installer package.
163-
164-
If you want to script removal of the agent, you can use the following example, which retrieves the product code and uninstalls the agent by using the Msiexec.exe command line - `msiexec /x {Product Code}`. To do so:
165-
166-
a. Open the Registry Editor.
167-
b. Under registry key `HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall`, look for and copy the product code GUID.
168-
c. You can then uninstall the agent by using Msiexec.
169-
170-
The following example demonstrates how to uninstall the agent:
171-
172-
```powershell
173-
Get-ChildItem -Path HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall | `
174-
Get-ItemProperty | `
175-
Where-Object {$_.DisplayName -eq "Azure Connected Machine Agent"} | `
176-
ForEach-Object {MsiExec.exe /x "$($_.PsChildName)" /qn}
177-
```
178-
179-
1. To uninstall the Linux agent, the command to use depends on the Linux operating system.
180-
181-
- For Ubuntu, run the following command:
182-
183-
```bash
184-
sudo apt purge azcmagent
185-
```
186-
187-
- For RHEL, CentOS, and Amazon Linux, run the following command:
188-
189-
```bash
190-
sudo yum remove azcmagent
191-
```
192-
193-
- For SLES, run the following command:
194-
195-
```bash
196-
sudo zypper remove azcmagent
197-
```
198-
199152
## Next steps
200153

201154
- Learn how to manage your machine using [Azure Policy](../../governance/policy/overview.md), for such things as VM [guest configuration](../../governance/policy/concepts/guest-configuration.md), verifying the machine is reporting to the expected Log Analytics workspace, enable monitoring with [Azure Monitor with VMs](../../azure-monitor/insights/vminsights-enable-at-scale-policy.md), and much more.

articles/azure-arc/servers/overview.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ ms.subservice: azure-arc-servers
77
author: mgoedtel
88
ms.author: magoedte
99
keywords: azure automation, DSC, powershell, desired state configuration, update management, change tracking, inventory, runbooks, python, graphical, hybrid
10-
ms.date: 02/24/2020
10+
ms.date: 03/24/2020
1111
ms.topic: overview
1212
---
1313

@@ -138,7 +138,7 @@ You can download the Azure Connected Machine agent package for Windows and L
138138
>[!NOTE]
139139
>During this preview, only one package has been released, which is suitable for Ubuntu 16.04 or 18.04.
140140
141-
The Azure Connected Machine agent for Windows and Linux can be upgraded to the latest release manually or automatically depending on your requirements. For Windows, the agent update can be automatically accomplished using Windows Update and for Ubuntu, using the [apt](https://help.ubuntu.com/lts/serverguide/apt.html) command-line tool.
141+
The Azure Connected Machine agent for Windows and Linux can be upgraded to the latest release manually or automatically depending on your requirements. For more information, see [here](manage-agent.md)
142142

143143
### Agent status
144144

@@ -152,6 +152,7 @@ Connecting machines in your hybrid environment directly with Azure can be accomp
152152
|--------|-------------|
153153
| Interactively | Manually install the agent on a single or small number of machines following the steps in [Connect machines from Azure portal](onboard-portal.md).<br> From the Azure portal, you can generate a script and execute it on the machine to automate the install and configuration steps of the agent.|
154154
| At scale | Install and configure the agent for multiple machines following the [Connect machines using a Service Principal](onboard-service-principal.md).<br> This method creates a service principal to connect machines non-interactively.|
155+
| At scale | Install and configure the agent for multiple machines following the method [Using Windows PowerShell DSC](onboard-dsc.md).<br> This method uses a service principal to connect machines non-interactively with PowerShell DSC. |
155156

156157
## Next steps
157158

articles/azure-arc/toc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
href: ./servers/onboard-service-principal.md
1515
- name: Connect machines to Azure Arc with PowerShell DSC
1616
href: ./servers/onboard-dsc.md
17+
- name: Manage agent
18+
href: ./servers/manage-agent.md
1719
- name: Reference
1820
items:
1921
- name: Azure Connected Machine Agent CLI interface

0 commit comments

Comments
 (0)