Skip to content

Commit 1d4b537

Browse files
authored
Merge pull request #232443 from divargas-msft/patch-2
[Doc-a-thon] Updating azure-hybrid-benefit-linux
2 parents 9c5736e + 0878d31 commit 1d4b537

File tree

1 file changed

+70
-36
lines changed

1 file changed

+70
-36
lines changed

articles/virtual-machines/linux/azure-hybrid-benefit-linux.md

Lines changed: 70 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,9 @@ Azure Hybrid Benefit BYOS and PAYG capability are available to all RHEL and SLES
3838

3939
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.
4040

41-
4241
## Getting started with PAYG Azure Hybrid Benefit
4342

44-
### Red Hat (RHEL) PAYG Azure Hybrid Benefit
43+
# [Red Hat (RHEL) PAYG Azure Hybrid Benefit](#tab/rhelpayg)
4544

4645
Azure Hybrid Benefit for pay-as-you-go virtual machines for RHEL is available to Red Hat customers who meet the following criteria:
4746

@@ -56,8 +55,7 @@ To start using Azure Hybrid Benefit for Red Hat:
5655

5756
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.
5857

59-
60-
### SUSE (SLES) PAYG Azure Hybrid Benefit
58+
# [SUSE (SLES) PAYG Azure Hybrid Benefit](#tab/slespayg)
6159

6260
Azure Hybrid Benefit for pay-as-you-go virtual machines for SUSE is available to customers who have:
6361

@@ -74,6 +72,8 @@ To start using Azure Hybrid Benefit for SUSE:
7472
2. Activate the subscription in the SUSE Customer Center.
7573
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.
7674

75+
---
76+
7777
### Enable PAYG Azure Hybrid Benefit in the Azure portal
7878

7979
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
9494

9595
1. Go to the [Azure portal](https://portal.azure.com/).
9696
1. Go to **Create a virtual machine**.
97-
97+
9898
![Screenshot of the portal page for creating a virtual machine.](./media/azure-hybrid-benefit/create-vm-ahb.png)
9999
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+
101101
![Screenshot of the Azure portal that shows checkboxes selected for licensing.](./media/azure-hybrid-benefit/create-vm-ahb-checkbox.png)
102102
1. Create a virtual machine by following the next set of instructions.
103103
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
106106

107107
### Enable and disable PAYG Azure Hybrid Benefit using the Azure CLI
108108

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`.
110113

111114
#### Enable PAYG Azure Hybrid Benefit using the Azure CLI
115+
112116
```azurecli
113117
# This will enable Azure Hybrid Benefit on a RHEL virtual machine
114118
az vm update -g myResourceGroup -n myVmName --license-type RHEL_BYOS
115119
116120
# This will enable Azure Hybrid Benefit on a SLES virtual machine
117121
az vm update -g myResourceGroup -n myVmName --license-type SLES_BYOS
118122
```
123+
119124
#### Disable PAYG Azure Hybrid Benefit using the Azure CLI
125+
120126
To disable Azure Hybrid Benefit, use a `--license-type` value of `None`:
121127

122128
```azurecli
@@ -125,6 +131,7 @@ az vm update -g myResourceGroup -n myVmName --license-type None
125131
```
126132

127133
#### Enable PAYG Azure Hybrid Benefit on a large number of virtual machines using the Azure CLI
134+
128135
To enable Azure Hybrid Benefit on a large number of virtual machines, you can use the `--ids` parameter in the Azure CLI:
129136

130137
```azurecli
@@ -145,12 +152,15 @@ az vm list -o json | jq '.[] | {Virtual MachineName: .name, ResourceID: .id}'
145152
```
146153

147154
### Apply PAYG when creating a new VM
155+
148156
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+
149158
- You can provision both pay-as-you-go and BYOS virtual machines by using the same image and process.
150159
- It enables future licensing mode changes. These changes aren't available with a BYOS-only image or if you bring your own virtual machine.
151160
- 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.
152161

153162
### Check the PAYG Azure Hybrid Benefit status of a virtual machine
163+
154164
You can view the Azure Hybrid Benefit status of a virtual machine by using the Azure CLI or by using Azure Instance Metadata Service.
155165

156166
### 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
178188
179189
## Getting started with BYOS Azure Hybrid Benefit
180190

181-
### Red Hat (RHEL) BYOS Azure Hybrid Benefit
191+
# [Red Hat (RHEL) BYOS Azure Hybrid Benefit](#tab/rhelbyos)
182192

183193
To start using Azure Hybrid Benefit for Red Hat:
184194

@@ -207,7 +217,7 @@ To start using Azure Hybrid Benefit for Red Hat:
207217
> [!Note]
208218
> 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.
209219
210-
### SUSE (SLES) BYOS Azure Hybrid Benefit
220+
# [SUSE (SLES) BYOS Azure Hybrid Benefit](#tab/slesbyos)
211221

212222
To start using Azure Hybrid Benefit for SLES virtual machines:
213223

@@ -231,11 +241,18 @@ To start using Azure Hybrid Benefit for SLES virtual machines:
231241

232242
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`.
233243

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+
235250
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+
236252
```azurecli
237253
az vm extension set -n AHBForRHEL --publisher Microsoft.Azure.AzureHybridBenefit --vm-name myVMName --resource-group myResourceGroup
238254
```
255+
239256
1. After the extension is installed successfully, change the license type based on what you need:
240257
241258
```azurecli
@@ -258,31 +275,35 @@ After you successfully install the `AHBForRHEL` extension, you can use the `az v
258275
az vm update -g myResourceGroup -n myVmName --license-type RHEL_BASESAPHA
259276
260277
```
278+
261279
1. Wait five minutes for the extension to read the license type value and install the repositories.
262280
263281
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+
264283
```bash
265-
yum repolist
284+
sudo yum repolist
266285
```
286+
267287
1. If the extension isn't running by itself, you can try the following command on the virtual machine:
288+
268289
```bash
269-
systemctl start azure-hybrid-benefit.service
290+
sudo systemctl start azure-hybrid-benefit.service
270291
```
292+
271293
1. You can use the following command in your RHEL virtual machine to get the current status of the service:
294+
272295
```bash
273-
ahb-service -status
296+
sudo ahb-service -status
274297
```
275298
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)
279300
280-
### Enable BYOS Azure Hybrid Benefit for SLES using the Azure CLI
281301
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:
282302
283303
```azurecli
284304
az vm extension set -n AHBForSLES --publisher SUSE.AzureHybridBenefit --vm-name myVMName --resource-group myResourceGroup
285305
```
306+
286307
1. After the extension is installed successfully, change the license type based on what you need:
287308
288309
```azurecli
@@ -295,15 +316,23 @@ After you successfully install the `AHBForSLES` extension, you can use the `az v
295316
# This will enable Azure Hybrid Benefit to fetch software updates for SLES HPC repositories
296317
az vm update -g myResourceGroup -n myVmName --license-type SLES_HPC
297318
```
319+
298320
1. Wait five minutes for the extension to read the license type value and install the repositories.
299321
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:
301323
302324
```bash
303-
zypper repos
325+
sudo zypper repos
304326
```
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+
306334
### Disable BYOS Azure Hybrid Benefit using the Azure CLI
335+
307336
1. Ensure that the Azure Hybrid Benefit extension is installed on your virtual machine.
308337
1. To disable Azure Hybrid Benefit, use the following command:
309338
@@ -313,21 +342,21 @@ After you successfully install the `AHBForSLES` extension, you can use the `az v
313342
```
314343
315344
### 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:
318348
319349
```azurecli
320350
az vm get-instance-view -g MyResourceGroup -n MyVm
321351
```
322352
323353
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:
324354
325-
`RHEL_BASE`, `RHEL_EUS`, `RHEL_BASESAPAPPS`, `RHEL_SAPHA`, `RHEL_BASESAPAPPS`, `RHEL_BASESAPHA`, `SLES`, `SLES_SAP`, `SLES_HPC`
326-
355+
`RHEL_BASE`, `RHEL_EUS`, `RHEL_BASESAPAPPS`, `RHEL_SAPHA`, `RHEL_BASESAPAPPS`, `RHEL_BASESAPHA`, `SLES`, `SLES_SAP`, `SLES_HPC`
327356
328357
## Compliance
329358
330-
### Red Hat compliance
359+
# [Red Hat compliance](#tab/rhelcompliance)
331360
332361
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.
333362
@@ -345,58 +374,63 @@ For more information about Red Hat subscription compliance, software updates, an
345374
346375
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.
347376
348-
### SUSE compliance
377+
# [SUSE compliance](#tab/slescompliance)
349378
350379
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).
351380
352381
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+
353383
- [SUSE Customer Center](https://scc.suse.com)
354384
- SUSE Manager
355385
- SUSE Repository Mirroring Tool
356386
357387
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.
358388
389+
---
390+
359391
## 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?**
361394
362395
- 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.
363396
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?**
365398
366399
- 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.
367400
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?**
369402
370403
- A: Yes, you can use Azure Hybrid Benefit for BYOS virtual machines to do this. Learn more about this capability.
371404
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?**
373406
374407
- A: Yes, you can use Azure Hybrid Benefit for BYOS virtual machines to do this. Learn more about this capability.
375408
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?**
377410
378411
- 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.
379412
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?**
381414
382415
- 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.
383416
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?**
385418
386419
- 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.
387420
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?**
389422
390423
- A: Yes. Azure Hybrid Benefit for pay-as-you-go virtual machines on reserved instances for RHEL and SLES is available to all users.
391424
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?**
393426
394427
- A: No, you can't. There's no plan for supporting these virtual machines.
395428
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?**
397430
398431
- A: No. RHEL for Virtual Datacenters isn't supported on Azure at all, including Azure Hybrid Benefit.
399432
400433
## Next steps
434+
401435
* [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)
402436
* [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

Comments
 (0)