Skip to content

Commit 9541ac0

Browse files
committed
manual install with PS and CLI
1 parent a746648 commit 9541ac0

File tree

1 file changed

+59
-19
lines changed

1 file changed

+59
-19
lines changed

articles/virtual-machines/workloads/sap/vm-extension-for-sap-new.md

Lines changed: 59 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -136,19 +136,68 @@ The new VM Extension for SAP uses a managed identity that is assigned to the VM
136136

137137
## <a name="ba74712c-4b1f-44c2-9412-de101dbb1ccc"></a>Manually configure the Azure VM extension for SAP solutions
138138

139-
If you want to use Azure Resource Manager, Terraform or other tools to deploy the VM Extension for SAP, please use the following publisher and extension type:
139+
If you want to use Azure Resource Manager, Terraform or other tools to deploy the VM Extension for SAP, you can also deploy the VM Extension for SAP manually i.e. without using the dedicated PowerShell or Azure CLI commands.
140140

141-
For Linux:
142-
* **Publisher**: Microsoft.AzureCAT.AzureEnhancedMonitoring
143-
* **Extension Type**: MonitorX64Linux
144-
* **Version**: 1.*
141+
Before deploying the VM Extension for SAP, please make sure to assign a user or system assigned managed identity to the virtual machine. For more information, read the following guides:
145142

146-
For Windows:
147-
* **Publisher**: Microsoft.AzureCAT.AzureEnhancedMonitoring
148-
* **Extension Type**: MonitorX64Windows
149-
* **Version**: 1.*
143+
* [Configure managed identities for Azure resources on a VM using the Azure portal](/azure/active-directory/managed-identities-azure-resources/qs-configure-portal-windows-vm)
144+
* [Configure managed identities for Azure resources on an Azure VM using Azure CLI](/azure/active-directory/managed-identities-azure-resources/qs-configure-cli-windows-vm)
145+
* [Configure managed identities for Azure resources on an Azure VM using PowerShell](/azure/active-directory/managed-identities-azure-resources/qs-configure-powershell-windows-vm)
146+
* [Configure managed identities for Azure resources on an Azure VM using templates](/azure/active-directory/managed-identities-azure-resources/qs-configure-template-windows-vm)
147+
* [Terraform VM Identity](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/linux_virtual_machine#identity)
150148

151-
If you want to disable automatic updates for the VM extension or want to deploy a spefici version of the extension, you can retrieve the available versions with Azure CLI or Azure PowerShell.
149+
After assigning an identity to the virtual machine, give the VM read access to either the resource group or the individual resources associated to the virtual machine (VM, Network Interfaces, OS Disks and Data Disks). It is recommended to use the built-in Reader role to grant the acceess to these resources. You can also grant this access by adding the VM identity to an Azure Active Directory group that already has read access to the required resources.
150+
151+
There are different ways how to deploy the VM Extension for SAP manually. Please find a few examples in the next chapters.
152+
153+
### Deploy manually with Azure PowerShell
154+
155+
The following code contains four examples. It shows how to deploy the extension on Windows and Linux, using a system or user assigned identity. Make sure to replace the name of the resource group, the location and VM name in the example.
156+
157+
``` powershell
158+
# Windows VM - user assigned identity
159+
Set-AzVMExtension -Publisher "Microsoft.AzureCAT.AzureEnhancedMonitoring" -ExtensionType "MonitorX64Windows" -ResourceGroupName "<rg name>" -VMName "<vm name>" `
160+
-Name "MonitorX64Windows" -TypeHandlerVersion "1.0" -Location "<location>" -SettingString '{"cfg":[{"key":"msi_res_id","value":"<user assigned resource id>"}]}'
161+
162+
# Windows VM - system assigned identity
163+
Set-AzVMExtension -Publisher "Microsoft.AzureCAT.AzureEnhancedMonitoring" -ExtensionType "MonitorX64Windows" -ResourceGroupName "<rg name>" -VMName "<vm name>" `
164+
-Name "MonitorX64Windows" -TypeHandlerVersion "1.0" -Location "<location>" -SettingString '{"cfg":[]}'
165+
166+
# Linux VM - user assigned identity
167+
Set-AzVMExtension -Publisher "Microsoft.AzureCAT.AzureEnhancedMonitoring" -ExtensionType "MonitorX64Linux" -ResourceGroupName "<rg name>" -VMName "<vm name>" `
168+
-Name "MonitorX64Linux" -TypeHandlerVersion "1.0" -Location "<location>" -SettingString '{"cfg":[{"key":"msi_res_id","value":"<user assigned resource id>"}]}'
169+
170+
# Linux VM - system assigned identity
171+
Set-AzVMExtension -Publisher "Microsoft.AzureCAT.AzureEnhancedMonitoring" -ExtensionType "MonitorX64Linux" -ResourceGroupName "<rg name>" -VMName "<vm name>" `
172+
-Name "MonitorX64Linux" -TypeHandlerVersion "1.0" -Location "<location>" -SettingString '{"cfg":[]}'
173+
```
174+
175+
### Deploy manually with Azure CLI
176+
177+
``` bash
178+
# Windows VM - user assigned identity
179+
az vm extension set --publisher "Microsoft.AzureCAT.AzureEnhancedMonitoring" --name "MonitorX64Windows" --resource-group "<rg name>" --vm-name "<vm name>" \
180+
--extension-instance-name "MonitorX64Windows" --settings '{"cfg":[{"key":"msi_res_id","value":"<user assigned resource id>"}]}'
181+
182+
# Windows VM - system assigned identity
183+
az vm extension set --publisher "Microsoft.AzureCAT.AzureEnhancedMonitoring" --name "MonitorX64Windows" --resource-group "<rg name>" --vm-name "<vm name>" \
184+
--extension-instance-name "MonitorX64Windows" --settings '{"cfg":[]}'
185+
186+
# Linux VM - user assigned identity
187+
az vm extension set --publisher "Microsoft.AzureCAT.AzureEnhancedMonitoring" --name "MonitorX64Linux" --resource-group "<rg name>" --vm-name "<vm name>" \
188+
--extension-instance-name "MonitorX64Linux" --settings '{"cfg":[{"key":"msi_res_id","value":"<user assigned resource id>"}]}'
189+
190+
# Linux VM - system assigned identity
191+
az vm extension set --publisher "Microsoft.AzureCAT.AzureEnhancedMonitoring" --name "MonitorX64Linux" --resource-group "<rg name>" --vm-name "<vm name>" \
192+
--extension-instance-name "MonitorX64Linux" --settings '{"cfg":[]}'
193+
```
194+
195+
### Deploy manually with Azure Resource Manager Templates
196+
### Deploy manually with Terraform
197+
198+
### Versions of the VM Extension for SAP
199+
200+
If you want to disable automatic updates for the VM extension or want to deploy a specific version of the extension, you can retrieve the available versions with Azure CLI or Azure PowerShell.
152201

153202
**Azure PowerShell**
154203
```powershell
@@ -186,15 +235,6 @@ This check makes sure that all performance metrics that appear inside your SAP a
186235
curl http://127.0.0.1:11812/azure4sap/metrics
187236
```
188237
**Expected result**: Returns an XML document that contains the monitoring information of the virtual machine, its disks and network interfaces.
189-
1. Connect to the Azure Virtual Machine by using SSH.
190-
191-
1. Check the output of the following command
192-
193-
```console
194-
curl http://127.0.0.1:11812/azure4sap/metrics
195-
```
196-
197-
**Expected result**: Returns an XML document that contains the monitoring information of the virtual machine, its disks and network interfaces.
198238

199239
If the preceding check was not successful, run these additional checks:
200240

0 commit comments

Comments
 (0)