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/virtual-machines/linux/azure-hybrid-benefit-linux.md
+70-36Lines changed: 70 additions & 36 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -38,10 +38,9 @@ Azure Hybrid Benefit BYOS and PAYG capability are available to all RHEL and SLES
38
38
39
39
Azure dedicated host instances and SQL hybrid benefits aren't eligible for Azure Hybrid Benefit if you already use Azure Hybrid Benefit with Linux virtual machines.
40
40
41
-
42
41
## Getting started with PAYG Azure Hybrid Benefit
43
42
44
-
### Red Hat (RHEL) PAYG Azure Hybrid Benefit
43
+
#[Red Hat (RHEL) PAYG Azure Hybrid Benefit](#tab/rhelpayg)
45
44
46
45
Azure Hybrid Benefit for pay-as-you-go virtual machines for RHEL is available to Red Hat customers who meet the following criteria:
47
46
@@ -56,8 +55,7 @@ To start using Azure Hybrid Benefit for Red Hat:
56
55
57
56
1. Follow the recommended [next steps](https://access.redhat.com/articles/5419341) to configure update sources for your RHEL virtual machines and for RHEL subscription compliance guidelines.
Azure Hybrid Benefit for pay-as-you-go virtual machines for SUSE is available to customers who have:
63
61
@@ -74,6 +72,8 @@ To start using Azure Hybrid Benefit for SUSE:
74
72
2. Activate the subscription in the SUSE Customer Center.
75
73
3. Register your virtual machines that are receiving Azure Hybrid Benefit with the SUSE Customer Center to get the updates from the SUSE Customer Center.
76
74
75
+
---
76
+
77
77
### Enable PAYG Azure Hybrid Benefit in the Azure portal
78
78
79
79
In the Azure portal, you can enable Azure Hybrid Benefit on existing virtual machines or on new virtual machines at the time that you create them.
@@ -94,10 +94,10 @@ To enable Azure Hybrid Benefit when you create a virtual machine, use the follow
94
94
95
95
1. Go to the [Azure portal](https://portal.azure.com/).
96
96
1. Go to **Create a virtual machine**.
97
-
97
+
98
98

99
99
1. In the **Licensing** section, select the checkbox that asks if you want to use an existing RHEL subscription and the checkbox to confirm that your subscription is eligible.
100
-
100
+
101
101

102
102
1. Create a virtual machine by following the next set of instructions.
103
103
1. On the **Configuration** pane, confirm that the option is enabled.
@@ -106,17 +106,23 @@ To enable Azure Hybrid Benefit when you create a virtual machine, use the follow
106
106
107
107
### Enable and disable PAYG Azure Hybrid Benefit using the Azure CLI
108
108
109
-
You can use the `az vm update` command to update existing virtual machines. For RHEL virtual machines, run the command with a `--license-type` parameter of `RHEL_BYOS`. For SLES virtual machines, run the command with a `--license-type` parameter of `SLES_BYOS`.
109
+
You can use the `az vm update` command to update existing virtual machines.
110
+
111
+
* For RHEL virtual machines, run the command with a `--license-type` parameter of `RHEL_BYOS`.
112
+
* For SLES virtual machines, run the command with a `--license-type` parameter of `SLES_BYOS`.
110
113
111
114
#### Enable PAYG Azure Hybrid Benefit using the Azure CLI
115
+
112
116
```azurecli
113
117
# This will enable Azure Hybrid Benefit on a RHEL virtual machine
114
118
az vm update -g myResourceGroup -n myVmName --license-type RHEL_BYOS
115
119
116
120
# This will enable Azure Hybrid Benefit on a SLES virtual machine
117
121
az vm update -g myResourceGroup -n myVmName --license-type SLES_BYOS
118
122
```
123
+
119
124
#### Disable PAYG Azure Hybrid Benefit using the Azure CLI
125
+
120
126
To disable Azure Hybrid Benefit, use a `--license-type` value of `None`:
121
127
122
128
```azurecli
@@ -125,6 +131,7 @@ az vm update -g myResourceGroup -n myVmName --license-type None
125
131
```
126
132
127
133
#### Enable PAYG Azure Hybrid Benefit on a large number of virtual machines using the Azure CLI
134
+
128
135
To enable Azure Hybrid Benefit on a large number of virtual machines, you can use the `--ids` parameter in the Azure CLI:
129
136
130
137
```azurecli
@@ -145,12 +152,15 @@ az vm list -o json | jq '.[] | {Virtual MachineName: .name, ResourceID: .id}'
145
152
```
146
153
147
154
### Apply PAYG when creating a new VM
155
+
148
156
In addition to applying Azure Hybrid Benefit to existing pay-as-you-go virtual machines, you can invoke it at the time of virtual machine creation. Benefits of doing so are threefold:
157
+
149
158
- You can provision both pay-as-you-go and BYOS virtual machines by using the same image and process.
150
159
- It enables future licensing mode changes. These changes aren't available with a BYOS-only image or if you bring your own virtual machine.
151
160
- The virtual machine is connected to Red Hat Update Infrastructure (RHUI) by default, to help keep it up to date and secure. You can change the updated mechanism after deployment at any time.
152
161
153
162
### Check the PAYG Azure Hybrid Benefit status of a virtual machine
163
+
154
164
You can view the Azure Hybrid Benefit status of a virtual machine by using the Azure CLI or by using Azure Instance Metadata Service.
155
165
156
166
### Check PAYG Azure Hybrid Benefit status using the Azure CLI
@@ -178,7 +188,7 @@ If you've purchased compute costs at a discounted rate by using reserved instanc
178
188
179
189
## Getting started with BYOS Azure Hybrid Benefit
180
190
181
-
### Red Hat (RHEL) BYOS Azure Hybrid Benefit
191
+
#[Red Hat (RHEL) BYOS Azure Hybrid Benefit](#tab/rhelbyos)
182
192
183
193
To start using Azure Hybrid Benefit for Red Hat:
184
194
@@ -207,7 +217,7 @@ To start using Azure Hybrid Benefit for Red Hat:
207
217
> [!Note]
208
218
> In the unlikely event that the extension can't install repositories or there are any other issues, switch the license type back to empty and reach out to Microsoft support. This ensures that you don't get billed for software updates.
To start using Azure Hybrid Benefit for SLES virtual machines:
213
223
@@ -231,11 +241,18 @@ To start using Azure Hybrid Benefit for SLES virtual machines:
231
241
232
242
After you successfully install the `AHBForRHEL` extension, you can use the `az vm update` command to update the existing license type on your running virtual machines. For SLES virtual machines, run the command and set the `--license-type` parameter to one of the following license types: `RHEL_BASE`, `RHEL_EUS`, `RHEL_SAPHA`, `RHEL_SAPAPPS`, `RHEL_BASESAPAPPS`, or `RHEL_BASESAPHA`.
233
243
234
-
### Enable BYOS Azure Hybrid Benefit for RHEL using the Azure CLI
244
+
---
245
+
246
+
### Enable BYOS Azure Hybrid Benefit using the Azure CLI
247
+
248
+
# [RHEL](#tab/rhelEnablebyos)
249
+
235
250
1. Install the Azure Hybrid Benefit extension on a running virtual machine. You can use the Azure portal or use the following command via the Azure CLI:
251
+
236
252
```azurecli
237
253
az vm extension set -n AHBForRHEL --publisher Microsoft.Azure.AzureHybridBenefit --vm-name myVMName --resource-group myResourceGroup
238
254
```
255
+
239
256
1. After the extension is installed successfully, change the license type based on what you need:
240
257
241
258
```azurecli
@@ -258,31 +275,35 @@ After you successfully install the `AHBForRHEL` extension, you can use the `az v
258
275
az vm update -g myResourceGroup -n myVmName --license-type RHEL_BASESAPHA
259
276
260
277
```
278
+
261
279
1. Wait five minutes for the extension to read the license type value and install the repositories.
262
280
263
281
1. You should now be connected to Red Hat Update Infrastructure. The relevant repositories are installed on your machine. You can validate the installation by running the following command on your virtual machine:
282
+
264
283
```bash
265
-
yum repolist
284
+
sudo yum repolist
266
285
```
286
+
267
287
1. If the extension isn't running by itself, you can try the following command on the virtual machine:
288
+
268
289
```bash
269
-
systemctl start azure-hybrid-benefit.service
290
+
sudo systemctl start azure-hybrid-benefit.service
270
291
```
292
+
271
293
1. You can use the following command in your RHEL virtual machine to get the current status of the service:
294
+
272
295
```bash
273
-
ahb-service -status
296
+
sudo ahb-service -status
274
297
```
275
298
276
-
### Enable and disable BYOS Azure Hybrid Benefit for SLES
277
-
278
-
After you successfully install the `AHBForSLES` extension, you can use the `az vm update` command to update the existing license type on your running virtual machines. For SLES virtual machines, run the command and set the `--license-type` parameter to one of the following license types: `SLES_STANDARD`, `SLES_SAP`, or `SLES_HPC`.
299
+
# [SLES](#tab/slesEnablebyos)
279
300
280
-
### Enable BYOS Azure Hybrid Benefit for SLES using the Azure CLI
281
301
1. Install the Azure Hybrid Benefit extension on a running virtual machine. You can use the Azure portal or use the following command via the Azure CLI:
282
302
283
303
```azurecli
284
304
az vm extension set -n AHBForSLES --publisher SUSE.AzureHybridBenefit --vm-name myVMName --resource-group myResourceGroup
285
305
```
306
+
286
307
1. After the extension is installed successfully, change the license type based on what you need:
287
308
288
309
```azurecli
@@ -295,15 +316,23 @@ After you successfully install the `AHBForSLES` extension, you can use the `az v
295
316
# This will enable Azure Hybrid Benefit to fetch software updates for SLES HPC repositories
296
317
az vm update -g myResourceGroup -n myVmName --license-type SLES_HPC
297
318
```
319
+
298
320
1. Wait five minutes for the extension to read the license type value and install the repositories.
299
321
300
-
1. You should now be connected to the SUSE public cloud update infrastructure on Azure. The relevant repositories are installed on your machine. You can verify this change by running the following command to list SUSE repositories on your machine:
322
+
1. You should now be connected to the SUSE public cloud update infrastructure on Azure. The relevant repositories are installed on your machine. You can verify this change by running the following command to list SUSE repositories on your virtual machine:
301
323
302
324
```bash
303
-
zypper repos
325
+
sudo zypper repos
304
326
```
305
-
327
+
328
+
---
329
+
330
+
## Enable and disable BYOS Azure Hybrid Benefit for SLES
331
+
332
+
After you successfully install the `AHBForSLES` extension, you can use the `az vm update` command to update the existing license type on your running virtual machines. For SLES virtual machines, run the command and set the `--license-type` parameter to one of the following license types: `SLES_STANDARD`, `SLES_SAP`, or `SLES_HPC`.
333
+
306
334
### Disable BYOS Azure Hybrid Benefit using the Azure CLI
335
+
307
336
1. Ensure that the Azure Hybrid Benefit extension is installed on your virtual machine.
308
337
1. To disable Azure Hybrid Benefit, use the following command:
309
338
@@ -313,21 +342,21 @@ After you successfully install the `AHBForSLES` extension, you can use the `az v
313
342
```
314
343
315
344
### Check the BYOS Azure Hybrid Benefit status of a virtual machine
316
-
1. Ensure that the Azure Hybrid Benefit extension is installed.
317
-
1. In the Azure CLI or Azure Instance Metadata Service, run the following command:
345
+
346
+
1. Ensure that the Azure Hybrid Benefit extension is installed.
347
+
1. In the Azure CLI or Azure Instance Metadata Service, run the following command:
318
348
319
349
```azurecli
320
350
az vm get-instance-view -g MyResourceGroup -n MyVm
321
351
```
322
352
323
353
1. Look for a `licenseType` field in the response. If the `licenseType` field exists and the value is one of the following, your virtual machine has Azure Hybrid Benefit enabled:
Customers who use Azure Hybrid Benefit for pay-as-you-go RHEL virtual machines agree to the standard [legal terms](http://www.redhat.com/licenses/cloud_CSSA/Red_Hat_Cloud_Software_Subscription_Agreement_for_Microsoft_Azure.pdf) and [privacy statement](http://www.redhat.com/licenses/cloud_CSSA/Red_Hat_Privacy_Statement_for_Microsoft_Azure.pdf) associated with the Azure Marketplace RHEL offers.
333
362
@@ -345,58 +374,63 @@ For more information about Red Hat subscription compliance, software updates, an
345
374
346
375
Customers who use Azure Hybrid Benefit BYOS to PAYG capability for RHEL agree to the standard [legal terms](http://www.redhat.com/licenses/cloud_CSSA/Red_Hat_Cloud_Software_Subscription_Agreement_for_Microsoft_Azure.pdf) and [privacy statement](http://www.redhat.com/licenses/cloud_CSSA/Red_Hat_Privacy_Statement_for_Microsoft_Azure.pdf) associated with the Azure Marketplace RHEL offerings.
347
376
348
-
### SUSE compliance
377
+
# [SUSE compliance](#tab/slescompliance)
349
378
350
379
To use Azure Hybrid Benefit for pay-as-you-go SLES virtual machines, and to get information about moving from SLES pay-as-you-go to BYOS or moving from SLES BYOS to pay-as-you-go, see [SUSE Linux Enterprise and Azure Hybrid Benefit](https://aka.ms/suse-ahb).
351
380
352
381
Customers who use Azure Hybrid Benefit for pay-as-you-go SLES virtual machines need to move the cloud update infrastructure to one of three options that provide software updates and patches to those virtual machines:
382
+
353
383
- [SUSE Customer Center](https://scc.suse.com)
354
384
- SUSE Manager
355
385
- SUSE Repository Mirroring Tool
356
386
357
387
If you use Azure Hybrid Benefit BYOS to PAYG capability for SLES and want more information about moving from SLES pay-as-you-go to BYOS, or moving from SLES BYOS to pay-as-you-go, see [Azure Hybrid Benefit Support](https://aka.ms/suse-ahb) on the SUSE website.
358
388
389
+
---
390
+
359
391
## Frequently asked questions
360
-
- Q: Can I use a license type of RHEL_BYOS with a SLES image, or vice versa?
392
+
393
+
- **Q: Can I use a license type of RHEL_BYOS with a SLES image, or vice versa?**
361
394
362
395
- A: No, you can't. Trying to enter a license type that incorrectly matches the distribution running on your virtual machine will not update any billing metadata. But if you accidentally enter the wrong license type, updating your virtual machine again to the correct license type will still enable Azure Hybrid Benefit.
363
396
364
-
- Q: I've registered with Red Hat Cloud Access but still can't enable Azure Hybrid Benefit on my RHEL virtual machines. What should I do?
397
+
- **Q: I've registered with Red Hat Cloud Access but still can't enable Azure Hybrid Benefit on my RHEL virtual machines. What should I do?**
365
398
366
399
- A: It might take some time for your Red Hat Cloud Access subscription registration to propagate from Red Hat to Azure. If you still see the error after one business day, contact Microsoft support.
367
400
368
-
- Q: I've deployed a virtual machine by using a RHEL BYOS "golden image." Can I convert the billing on this image from BYOS to pay-as-you-go?
401
+
- **Q: I've deployed a virtual machine by using a RHEL BYOS "golden image." Can I convert the billing on this image from BYOS to pay-as-you-go?**
369
402
370
403
- A: Yes, you can use Azure Hybrid Benefit for BYOS virtual machines to do this. Learn more about this capability.
371
404
372
-
- Q: I've uploaded my own RHEL or SLES image from on-premises (via Azure Migrate, Azure Site Recovery, or otherwise) to Azure. Can I convert the billing on these images from BYOS to pay-as-you-go?
405
+
- **Q: I've uploaded my own RHEL or SLES image from on-premises (via Azure Migrate, Azure Site Recovery, or otherwise) to Azure. Can I convert the billing on these images from BYOS to pay-as-you-go?**
373
406
374
407
- A: Yes, you can use Azure Hybrid Benefit for BYOS virtual machines to do this. Learn more about this capability.
375
408
376
-
- Q: I've uploaded my own RHEL or SLES image from on-premises (via Azure Migrate, Azure Site Recovery, or otherwise) to Azure. Do I need to do anything to benefit from Azure Hybrid Benefit?
409
+
- **Q: I've uploaded my own RHEL or SLES image from on-premises (via Azure Migrate, Azure Site Recovery, or otherwise) to Azure. Do I need to do anything to benefit from Azure Hybrid Benefit?**
377
410
378
411
- A: No, you don't. RHEL or SLES images that you upload are already considered BYOS, and you're charged only for Azure infrastructure costs. You're responsible for RHEL subscription costs, just as you are for your on-premises environments.
379
412
380
-
- Q: Can I use Azure Hybrid Benefit for pay-as-you-go virtual machines for Azure Marketplace RHEL and SLES SAP images?
413
+
- **Q: Can I use Azure Hybrid Benefit for pay-as-you-go virtual machines for Azure Marketplace RHEL and SLES SAP images?**
381
414
382
415
- A: Yes. You can use the license type of RHEL_BYOS for RHEL virtual machines and SLES_BYOS for conversions of virtual machines deployed from Azure Marketplace RHEL and SLES SAP images.
383
416
384
-
- Q: Can I use Azure Hybrid Benefit for pay-as-you-go virtual machines on Virtual Machine Scale Sets for RHEL and SLES?
417
+
- **Q: Can I use Azure Hybrid Benefit for pay-as-you-go virtual machines on Virtual Machine Scale Sets for RHEL and SLES?**
385
418
386
419
- A: Yes. Azure Hybrid Benefit on Virtual Machine Scale Sets for RHEL and SLES is available to all users. Learn more about this benefit and how to use it.
387
420
388
-
- Q: Can I use Azure Hybrid Benefit for pay-as-you-go virtual machines on reserved instances for RHEL and SLES?
421
+
- **Q: Can I use Azure Hybrid Benefit for pay-as-you-go virtual machines on reserved instances for RHEL and SLES?**
389
422
390
423
- A: Yes. Azure Hybrid Benefit for pay-as-you-go virtual machines on reserved instances for RHEL and SLES is available to all users.
391
424
392
-
- Q: Can I use Azure Hybrid Benefit for pay-as-you-go virtual machines on a virtual machine deployed for SQL Server on RHEL images?
425
+
- **Q: Can I use Azure Hybrid Benefit for pay-as-you-go virtual machines on a virtual machine deployed for SQL Server on RHEL images?**
393
426
394
427
- A: No, you can't. There's no plan for supporting these virtual machines.
395
428
396
-
- Q: Can I use Azure Hybrid Benefit on my RHEL for Virtual Datacenters subscription?
429
+
- **Q: Can I use Azure Hybrid Benefit on my RHEL for Virtual Datacenters subscription?**
397
430
398
431
- A: No. RHEL for Virtual Datacenters isn't supported on Azure at all, including Azure Hybrid Benefit.
399
432
400
433
## Next steps
434
+
401
435
* [Learn how to create and update virtual machines and add license types (RHEL_BYOS, SLES_BYOS) for Azure Hybrid Benefit by using the Azure CLI](/cli/azure/vm)
402
436
* [Learn about Azure Hybrid Benefit on Virtual Machine Scale Sets for RHEL and SLES and how to use it](../../virtual-machine-scale-sets/azure-hybrid-benefit-linux.md)
0 commit comments