You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/azure-sql/virtual-machines/linux/sql-agent-extension-register-vm-linux.md
+3-231Lines changed: 3 additions & 231 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ ms.service: virtual-machines-sql
9
9
ms.subservice: management
10
10
ms.devlang: na
11
11
ms.topic: how-to
12
-
ms.tgt_pltfrm: vm-windows-sql-server
12
+
ms.tgt_pltfrm: vm-Linux-sql-server
13
13
ms.workload: iaas-sql-server
14
14
ms.date: 09/01/2021
15
15
ms.author: adbadram
@@ -27,8 +27,6 @@ Register your SQL Server VM with the [SQL IaaS Agent extension](sql-server-iaas-
27
27
28
28
Registering with the [SQL Server IaaS Agent extension](sql-server-iaas-agent-extension-automate-management.md) creates the [**SQL virtual machine**_resource_](manage-sql-vm-portal.md) within your subscription, which is a _separate_ resource from the virtual machine resource. Unregistering your SQL Server VM from the extension will remove the **SQL virtual machine**_resource_ but will not drop the actual virtual machine.
29
29
30
-
Deploying a SQL Server VM Azure Marketplace image through the Azure portal automatically registers the SQL Server VM with the extension. However, if you choose to self-install SQL Server on an Azure virtual machine, or provision an Azure virtual machine from a custom VHD, then you must register your SQL Server VM with the SQL IaaS Agent extension to to unlock full feature benefits and manageability.
31
-
32
30
To utilize the SQL IaaS Agent extension, you must first [register your subscription with the **Microsoft.SqlVirtualMachine** provider](#register-subscription-with-rp), which gives the SQL IaaS extension the ability to create resources within that specific subscription.
33
31
34
32
> [!IMPORTANT]
@@ -41,7 +39,7 @@ To register your SQL Server VM with the extension, you'll need:
41
39
- An [Azure subscription](https://azure.microsoft.com/free/).
42
40
- An Azure Resource Model [Windows Server 2008 (or greater) virtual machine](../../../virtual-machines/windows/quick-create-portal.md) with [SQL Server 2008 (or greater)](https://www.microsoft.com/sql-server/sql-server-downloads) deployed to the public or Azure Government cloud.
43
41
- The latest version of [Azure CLI](/cli/azure/install-azure-cli) or [Azure PowerShell (5.0 minimum)](/powershell/azure/install-az-ps).
44
-
-A minimum of .NET Framework 4.5.1 or later.
42
+
-Azure Virtual Machine running Ubuntu Linux.
45
43
46
44
## Register subscription with RP
47
45
@@ -75,77 +73,13 @@ az provider register --namespace Microsoft.SqlVirtualMachine
# Register with SQL IaaS Agent extension in full mode
89
-
New-AzSqlVM -Name $vm.Name -ResourceGroupName $vm.ResourceGroupName -SqlManagementType Full
90
-
91
-
```
92
-
93
-
To learn more about full mode, see [management modes](sql-server-iaas-agent-extension-automate-management.md#management-modes).
94
-
95
-
### Upgrade to full
96
-
97
-
SQL Server VMs that have registered the extension in *lightweight* mode can upgrade to _full_ using the Azure portal, the Azure CLI, or Azure PowerShell. SQL Server VMs in _NoAgent_ mode can upgrade to _full_ after the OS is upgraded to Windows 2008 R2 and above. It is not possible to downgrade - to do so, you will need to [unregister](#unregister-from-extension) the SQL Server VM from the SQL IaaS Agent extension. Doing so will remove the **SQL virtual machine**_resource_, but will not delete the actual virtual machine.
98
-
99
-
#### Azure portal
100
-
101
-
To upgrade the extension to full mode using the Azure portal, follow these steps:
102
-
103
-
1. Sign in to the [Azure portal](https://portal.azure.com).
104
-
1. Go to your [SQL virtual machines](manage-sql-vm-portal.md#access-the-resource) resource.
105
-
1. Select your SQL Server VM, and navigate to the **Overview** page.
106
-
1. For SQL Server VMs with the NoAgent or lightweight IaaS extension mode, select the **Only license type and edition updates are available with the current SQL IaaS extension mode...** message.
107
-
108
-

109
-
110
-
1. Select **Confirm** to upgrade your SQL Server IaaS extension mode to full.
111
-
112
-

113
-
114
-
#### Command line
115
-
116
-
# [Azure CLI](#tab/bash)
117
-
118
-
To upgrade the extension to full mode, run the following Azure CLI code snippet:
119
-
120
-
```azurecli-interactive
121
-
# Update to full mode
122
-
az sql vm update --name <vm_name> --resource-group <resource_group_name> --sql-mgmt-type full
123
-
```
124
-
125
-
# [Azure PowerShell](#tab/powershell)
126
-
127
-
To upgrade the extension to full mode, run the following Azure PowerShell code snippet:
# Register with SQL IaaS Agent extension in full mode
134
-
Update-AzSqlVM -Name $vm.Name -ResourceGroupName $vm.ResourceGroupName -SqlManagementType Full -Location $vm.Location
135
-
```
136
-
137
-
---
138
76
139
77
## Lightweight mode
140
78
141
-
Use the Azure CLI or Azure PowerShell to register your SQL Server VM with the extension in lightweight mode for limited functionality.
79
+
SQL IaaS Agent extension on Linux comes only with Lightweight mode where changing the license type and edition of SQL Server is supported. Use the Azure CLI or Azure PowerShell to register your SQL Server VM with the extension in lightweight mode for limited functionality.
142
80
143
81
Provide the SQL Server license type as either pay-as-you-go (`PAYG`) to pay per usage, Azure Hybrid Benefit (`AHUB`) to use your own license, or disaster recovery (`DR`) to activate the [free DR replica license](business-continuity-high-availability-disaster-recovery-hadr-overview.md#free-dr-replica-in-azure).
144
82
145
-
Failover cluster instances and multi-instance deployments can only be registered with the SQL IaaS Agent extension in lightweight mode.
146
-
147
-
To learn more about lightweight mode, see [management modes](sql-server-iaas-agent-extension-automate-management.md#management-modes).
148
-
149
83
# [Azure CLI](#tab/bash)
150
84
151
85
Register a SQL Server VM in lightweight mode with the Azure CLI:
@@ -168,97 +102,6 @@ Register a SQL Server VM in lightweight mode with Azure PowerShell:
SQL Server 2008 and 2008 R2 installed on Windows Server 2008 (_not R2_) can only be registered with the SQL IaaS Agent extension in the [NoAgent mode](sql-server-iaas-agent-extension-automate-management.md#management-modes). This option assures compliance and allows the SQL Server VM to be monitored in the Azure portal with limited functionality.
175
-
176
-
For the **license type**, specify either: `AHUB`, `PAYG`, or `DR`.
177
-
For the **image offer**, specify either `SQL2008-WS2008` or `SQL2008R2-WS2008`
178
-
179
-
To register your SQL Server 2008 (`SQL2008-WS2008`) or 2008 R2 (`SQL2008R2-WS2008`) on Windows Server 2008 instance, use the following Azure CLI or Azure PowerShell code snippet:
180
-
181
-
# [Azure CLI](#tab/bash)
182
-
183
-
Register your SQL Server virtual machine in NoAgent mode with the Azure CLI:
184
-
185
-
```azurecli-interactive
186
-
az sql vm create -n sqlvm -g myresourcegroup -l eastus |
SQL Server VMs that have registered the extension in *lightweight* mode can upgrade to _full_ using the Azure portal, the Azure CLI, or Azure PowerShell. SQL Server VMs in _NoAgent_ mode can upgrade to _full_ after the OS is upgraded to Windows 2008 R2 and above. It is not possible to downgrade - to do so, you will need to [unregister](#unregister-from-extension) the SQL Server VM from the SQL IaaS Agent extension. Doing so will remove the **SQL virtual machine**_resource_, but will not delete the actual virtual machine.
221
-
222
-
### Azure portal
223
-
224
-
To upgrade the extension to full mode using the Azure portal, follow these steps:
225
-
226
-
1. Sign in to the [Azure portal](https://portal.azure.com).
227
-
1. Go to your [SQL virtual machines](manage-sql-vm-portal.md#access-the-resource) resource.
228
-
1. Select your SQL Server VM, and select **Overview**.
229
-
1. For SQL Server VMs with the NoAgent or lightweight IaaS mode, select the **Only license type and edition updates are available with the current SQL IaaS extension...** message.
230
-
231
-

232
-
233
-
1. Select **Confirm** to upgrade your SQL Server extension IaaS mode to full.
234
-
235
-

236
-
237
-
### Command line
238
-
239
-
# [Azure CLI](#tab/bash)
240
-
241
-
To upgrade the extension to full mode, run the following Azure CLI code snippet:
242
-
243
-
```azurecli-interactive
244
-
# Update to full mode
245
-
az sql vm update --name <vm_name> --resource-group <resource_group_name> --sql-mgmt-type full
246
-
```
247
-
248
-
# [Azure PowerShell](#tab/powershell)
249
-
250
-
To upgrade the extension to full mode, run the following Azure PowerShell code snippet:
# Register with SQL IaaS Agent extension in full mode
257
-
Update-AzSqlVM -Name $vm.Name -ResourceGroupName $vm.ResourceGroupName -SqlManagementType Full -Location $vm.Location
258
-
```
259
-
260
-
---
261
-
262
105
## Verify registration status
263
106
264
107
You can verify if your SQL Server VM has already been registered with the SQL IaaS Agent extension by using the Azure portal, the Azure CLI, or Azure PowerShell.
@@ -270,11 +113,6 @@ To verify the registration status using the Azure portal, follow these steps:
270
113
1. Sign in to the [Azure portal](https://portal.azure.com).
271
114
1. Go to your [SQL Server VMs](manage-sql-vm-portal.md).
272
115
1. Select your SQL Server VM from the list. If your SQL Server VM is not listed here, it likely hasn't been registered with the SQL IaaS Agent extension.
273
-
1. View the value under **Status**. If **Status** is **Succeeded**, then the SQL Server VM has been registered with the SQL IaaS Agent extension successfully.
274
-
275
-

276
-
277
-
Alternatively, you can check the status by choosing **Repair** under the **Support + troubleshooting** pane in the **SQL virtual machine** resource. The provisioning state for the SQL IaaS agent extension can be **Succeeded** or **Failed**.
278
116
279
117
### Command line
280
118
@@ -300,72 +138,6 @@ To verify the registration status using the Azure PowerShell, run the following
300
138
301
139
An error indicates that the SQL Server VM has not been registered with the extension.
302
140
303
-
## Repair extension
304
-
305
-
It's possible for your SQL IaaS agent extension to be in a failed state. Use the Azure portal to repair the SQL IaaS agent extension. To do so, follow these steps:
306
-
307
-
1. Sign in to the [Azure portal](https://portal.azure.com).
308
-
1. Go to your [SQL Server VMs](manage-sql-vm-portal.md).
309
-
1. Select your SQL Server VM from the list. If your SQL Server VM is not listed here, it likely hasn't been registered with the SQL IaaS Agent extension.
310
-
1. Select **Repair** under **Support + Troubleshooting** in the **SQL virtual machine** resource page.
311
-
312
-
:::image type="content" source="media/sql-agent-extension-manually-register-single-vm/repair-extension.png" alt-text="Select **Repair** under **Support + Troubleshooting** in the **SQL virtual machine** resource page":::
313
-
314
-
1. If your provisioning state shows as **Failed**, choose **Repair** to repair the extension. If your state is **Succeeded** you can check the box next to **Force repair** to repair the extension regardless of state.
315
-
316
-

317
-
318
-
319
-
## Unregister from extension
320
-
321
-
To unregister your SQL Server VM with the SQL IaaS Agent extension, delete the SQL virtual machine *resource* using the Azure portal or Azure CLI. Deleting the SQL virtual machine *resource* does not delete the SQL Server VM. However, use caution and follow the steps carefully because it is possible to inadvertently delete the virtual machine when attempting to remove the *resource*.
322
-
323
-
Unregistering the SQL virtual machine with the SQL IaaS Agent extension is necessary to downgrade the management mode from full.
324
-
325
-
### Azure portal
326
-
327
-
To unregister your SQL Server VM from the extension using the Azure portal, follow these steps:
328
-
329
-
1. Sign into the [Azure portal](https://portal.azure.com).

337
-
338
-
1. Type the name of the SQL virtual machine and **clear the check box next to the virtual machine**.
339
-
340
-

341
-
342
-
> [!WARNING]
343
-
> Failure to clear the checkbox next to the virtual machine name will *delete* the virtual machine entirely. Clear the checkbox to unregister the SQL Server VM from the extension but *not delete the actual virtual machine*.
344
-
345
-
1. Select **Delete** to confirm the deletion of the SQL virtual machine *resource*, and not the SQL Server VM.
346
-
347
-
### Command line
348
-
349
-
# [Azure CLI](#tab/azure-cli)
350
-
351
-
To unregister your SQL Server VM from the extension with Azure CLI, use the [az sql vm delete](/cli/azure/sql/vm#az_sql_vm_delete) command. This will remove the SQL Server VM *resource* but will not delete the virtual machine.
352
-
353
-
```azurecli-interactive
354
-
az sql vm delete
355
-
--name <SQL VM resource name> |
356
-
--resource-group <Resource group name> |
357
-
--yes
358
-
```
359
-
360
-
# [PowerShell](#tab/azure-powershell)
361
-
362
-
To unregister your SQL Server VM from the extension with Azure PowerShell, use the [Remove-AzSqlVM](/powershell/module/az.sqlvirtualmachine/remove-azsqlvm)command. This will remove the SQL Server VM *resource* but will not delete the virtual machine.
0 commit comments