Skip to content

Commit cef66b2

Browse files
authored
Merge pull request #260100 from esvmicrosoft/azurehb
Updating the Azure Hybrid Benefit doc
2 parents 52933e3 + f0c6f87 commit cef66b2

File tree

1 file changed

+53
-104
lines changed

1 file changed

+53
-104
lines changed

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

Lines changed: 53 additions & 104 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ Customers may see savings estimated to up to 76% with Azure Hybrid Benefit for L
2424
> [!TIP]
2525
> Try the **[Azure Hybrid Benefit Savings Calculator](https://azure.microsoft.com/pricing/hybrid-benefit/#calculator)** to visualize the cost saving benefits of this feature.
2626
27-
2827
## Defining Pay-as-you-go (PAYG) and Bring-your-own-subscription (BYOS)
2928

3029
In Azure, there are two main licensing pricing options: 'pay-as-you-go' (PAYG) and 'bring-your-own-subscription' (BYOS). 'PAYG' is a pricing option where you pay for the resources you use on an hourly or monthly basis. You only pay for what you use and can scale up or down as needed. On the other hand, 'BYOS' is a licensing option where you can use your existing licenses for certain software, in this case RHEL and SLES, on Azure virtual machines. You can use your existing licenses and don't have to purchase new ones for use in Azure.
@@ -36,13 +35,10 @@ In Azure, there are two main licensing pricing options: 'pay-as-you-go' (PAYG) a
3635
3736
You can use Azure Hybrid Benefit to switch back to pay-as-you-go billing at any time.
3837

39-
4038
## Which Linux virtual machines qualify for Azure Hybrid Benefit?
4139

4240
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.
4341

44-
45-
4642
## Enabling Azure Hybrid Benefit
4743

4844
### Enabling AHB on New VMs
@@ -82,10 +78,8 @@ You can use the `az vm extension` and `az vm update` commands to update new virt
8278
```
8379

8480
- RHEL License Types: RHEL_BASE, RHEL_EUS, RHEL_SAPAPPS, RHEL_SAPHA, RHEL_BASESAPAPPS, RHEL_BASESAPHA​
85-
8681
- SLES License Types: SLES_STANDARD, SLES_SAP, SLES_HPC​
8782

88-
8983
---
9084
### Enabling AHB on Existing VM
9185
#### [Azure portal](#tab/ahbExistingPortal)
@@ -105,23 +99,19 @@ You can use the `az vm extension` and `az vm update` commands to update existing
10599
```azurecli
106100
az vm extension
107101
```
102+
> [!Note]
103+
> The complete az vm extension depends on the particular distribution you are using, please refer to the next section for the complete details.
108104
109105
1. Update with the correct license type
110106
```azurecli
111107
az vm update
112108
``````
113109
114110
- RHEL License Types: RHEL_BASE, RHEL_EUS, RHEL_SAPAPPS, RHEL_SAPHA, RHEL_BASESAPAPPS, RHEL_BASESAPHA​
115-
116111
- SLES License Types: SLES_STANDARD, SLES_SAP, SLES_HPC​
117112
118-
119113
---
120114
121-
122-
123-
124-
125115
## Check the current licensing model of an AHB enabled VM
126116
127117
You can view the Azure Hybrid Benefit status of a virtual machine by using the Azure CLI or by using Azure Instance Metadata Service.
@@ -146,57 +136,62 @@ From within the virtual machine itself, you can query the attested metadata in A
146136
---
147137

148138
## PAYG to BYOS conversions
149-
Converting from a Pay-as-you-go to a Bring-your-own-subscription model.
150-
### Operating system instructions
151-
#### [Red Hat (RHEL)](#tab/rhelpaygreqs)
152-
153-
Azure Hybrid Benefit for converting PAYG virtual machines to BYOS for RHEL is available to Red Hat customers who meet the following criteria:
139+
---
140+
### Convert a Pay As You Go(PAYG) image to BYOS using the Azure CLI
141+
If you deployed an Azure Marketplace image with PAYG licensing model and desire to convert it to BYOS, follow this process to convert it to the desired licensing model.
154142

155-
- Have active or unused RHEL subscriptions that are eligible for use in Azure
156-
- Have correctly enabled one or more of their subscriptions for use in Azure with the [Red Hat Cloud Access](https://www.redhat.com/en/technologies/cloud-computing/cloud-access) program
143+
#### [Red Hat (RHEL)](#tab/rhelAzcliByosConv)
157144

158-
Bring your own subscription to Red Hat:
145+
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:
146+
```azurecli
147+
az vm extension set -n AHBForRHEL --publisher Microsoft.Azure.AzureHybridBenefit --vm-name myVMName --resource-group myResourceGroup
148+
```
159149
160-
1. Enable one or more of your eligible RHEL subscriptions for use in Azure using the [Red Hat Cloud Access customer interface](https://access.redhat.com/management/cloud). The Azure subscriptions that you provide during the Red Hat Cloud Access enablement process then have access to Azure Hybrid Benefit
150+
1. Apply the `RHEL_BYOS` license type to the machine:
161151
162-
1. Apply Azure Hybrid Benefit to any RHEL pay-as-you-go virtual machines that you deploy in Azure Marketplace pay-as-you-go images. You can use the Azure portal or the Azure CLI to enable Azure Hybrid Benefit.
152+
```azurecli
153+
# This will enable BYOS on a RHEL(PAYG) virtual machine using Azure Hybrid Benefit
154+
az vm update -g myResourceGroup -n myVmName --license-type RHEL_BYOS
155+
```
156+
1. Once the PAYG to BYOS conversion is complete, you must register the machine with Red Hat for system updates and usage compliance.
163157
164-
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.
158+
1. If you desire to return to PAYG model, you need to set up the license-type to "None", otherwise, it continues to be BYOS.
159+
```azurecli
160+
# If the image started as PAYG and was converted to BYOS, the following command will revert it back to PAYG.
161+
az vm update -g myResourceGroup -n myVmName --license-type NONE
162+
```
165163
166-
#### [SUSE (SLES)](#tab/slespaygreqs)
167164
168-
Azure Hybrid Benefit for pay-as-you-go virtual machines for SUSE is available to customers who have:
165+
#### [SUSE (SLES)](#tab/slesAzcliByosConv)
169166
170-
- Unused SUSE subscriptions that are eligible to use in Azure.
171-
- One or more active SUSE subscriptions to use on-premises that should be moved to Azure.
172-
- Purchased subscriptions that they activated in the SUSE Customer Center to use in Azure.
167+
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:
168+
```azurecli
169+
az vm extension set -n AHBForSLES --publisher SUSE.AzureHybridBenefit --vm-name myVMName --resource-group myResourceGroup
170+
```
173171
174-
> [!IMPORTANT]
175-
> Ensure that you select the correct subscription to use in Azure.
172+
1. Apply the `SLES_BYOS` license type to the virtual machine.
176173
177-
To start using Azure Hybrid Benefit for SUSE:
174+
```azurecli
175+
# This will enable BYOS on a SLES virtual machine
176+
az vm update -g myResourceGroup -n myVmName --license-type SLES_BYOS
177+
```
178178
179-
1. Register the subscription that you purchased from SUSE or a SUSE distributor with the [SUSE Customer Center](https://scc.suse.com).
180-
2. Activate the subscription in the SUSE Customer Center.
181-
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.
179+
1. Once the PAYG to BYOS conversion is complete, you must register the machine on your own with SUSE for software updates and usage compliance.
182180
181+
1. If you desire to return to PAYG model, you need to set up license-type to "None", otherwise, it continues to be BYOS.
182+
```azurecli
183+
# If the image started as PAYG and was converted to BYOS, the following command will revert it back to PAYG.
184+
az vm update -g myResourceGroup -n myVmName --license-type NONE
185+
```
183186
184187
---
188+
189+
## BYOS to PAYG conversions
190+
Converting to PAYG model is supported for Azure Marketplace images labeled BYOS, machines imported from on-premises or a third party cloud provider.
185191
186-
187-
188-
### Convert to BYOS using the Azure CLI
189-
190-
#### [Red Hat (RHEL)](#tab/rhelAzcliByosConv)
191-
* For RHEL virtual machines, run the command with a `--license-type` parameter of `RHEL_BYOS`.
192-
193-
```azurecli
194-
# This will enable BYOS on a RHEL virtual machine using Azure Hybrid Benefit
195-
az vm update -g myResourceGroup -n myVmName --license-type RHEL_BYOS
196-
```
192+
#### [Red Hat (RHEL)](#tab/rhelazclipaygconv)
197193
198194
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:
199-
200195
```azurecli
201196
az vm extension set -n AHBForRHEL --publisher Microsoft.Azure.AzureHybridBenefit --vm-name myVMName --resource-group myResourceGroup
202197
```
@@ -221,39 +216,17 @@ az vm update -g myResourceGroup -n myVmName --license-type RHEL_BYOS
221216
222217
# This will enable Azure Hybrid Benefit to fetch software updates for RHEL BASE SAP HA repositories
223218
az vm update -g myResourceGroup -n myVmName --license-type RHEL_BASESAPHA
219+
```
224220

221+
1. If you desire to return to BYOS model, you need to set up license-type to "None", otherwise, it continues to be PAYG.
222+
```azurecli
223+
# If the image started as BYOS and was converted to PAYG, the following command will revert it back to BYOS.
224+
az vm update -g myResourceGroup -n myVmName --license-type NONE
225225
```
226226
227-
1. Wait five minutes for the extension to read the license type value and install the repositories.
228-
229-
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:
230-
231-
```bash
232-
sudo yum repolist
233-
```
234-
235-
1. If the extension isn't running by itself, you can try the following command on the virtual machine:
236-
237-
```bash
238-
sudo systemctl start azure-hybrid-benefit.service
239-
```
240-
241-
1. You can use the following command in your RHEL virtual machine to get the current status of the service:
242-
243-
```bash
244-
sudo ahb-service -status
245-
```
246-
247-
#### [SUSE (SLES)](#tab/slesAzcliByosConv)
248-
* For SLES virtual machines, run the command with a `--license-type` parameter of `SLES_BYOS`.
249-
250-
```azurecli
251-
# This will enable BYOS on a SLES virtual machine
252-
az vm update -g myResourceGroup -n myVmName --license-type SLES_BYOS
253-
```
227+
#### [SUSE (SLES)](#tab/slesazclipaygconv)
254228
255229
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:
256-
257230
```azurecli
258231
az vm extension set -n AHBForSLES --publisher SUSE.AzureHybridBenefit --vm-name myVMName --resource-group myResourceGroup
259232
```
@@ -271,40 +244,16 @@ az vm update -g myResourceGroup -n myVmName --license-type SLES_BYOS
271244
az vm update -g myResourceGroup -n myVmName --license-type SLES_HPC
272245
```
273246
274-
1. Wait five minutes for the extension to read the license type value and install the repositories.
275-
276-
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:
277-
278-
```bash
279-
sudo zypper repos
247+
1. If you desire to return to BYOS model, you need to set up the "None" license type, otherwise, it continues to be PAYG.
248+
```azurecli
249+
# If the image started as BYOS and was converted to PAYG, the following command will revert it back to BYOS.
250+
az vm update -g myResourceGroup -n myVmName --license-type NONE
280251
```
281-
282-
283252
---
284253
254+
#### Multiple VMs
285255
286-
287-
288-
289-
290-
291-
292-
## BYOS to PAYG conversions
293-
Converting from a Bring-your-own-subscription to a Pay-as-you-go model.
294-
#### [Single VM](#tab/paygclisingle)
295-
296-
If the system was originally a PAYG image and you want to return the VM to a PAYG model, use a `--license-type` value of `None`. For example:
297-
298-
```azurecli
299-
# This will enable PAYG on a virtual machine using Azure Hybrid Benefit
300-
az vm update -g myResourceGroup -n myVmName --license-type None
301-
```
302-
303-
If you have a BYOS and want to convert the VM to PAYG, use a `--license-type` value that covers the VM needs as described further in this article. For example, for RHEL systems you can use any of the following: RHEL_BASE, RHEL_EUS, RHEL_SAPAPPS, RHEL_SAPHA, RHEL_BASEAPAPPS or RHEL_BASESAPHA.
304-
305-
#### [Multiple VMs](#tab/paygclimultiple)
306-
307-
To switch the licensing model on a large number of virtual machines, you can use the `--ids` parameter in the Azure CLI:
256+
The following command converts the machines specified in the argument to BYOS.
308257
309258
```azurecli
310259
# This will enable BYOS on a RHEL virtual machine. In this example, ids.txt is an

0 commit comments

Comments
 (0)