Azure Hybrid Benefit for Red Hat Enterprise Linux (RHEL) and SUSE Linux Enterprise Server (SLES) Virtual Machines

Azure Hybrid Benefit (AHB) for Linux lets you easily switch the software subscription model for your VM, enabling flexibility and savings. The conversion between subscription models is accomplished without a redeployment of your VM, avoiding any downtime risk.

There are two subscription models on Azure which you can switch seamlessly between using Azure Hybrid Benefit.

  • The Bring-Your-Own-Subscription (BYOS) model enables you to bring your own REHL or SLES subscription directly to Azure. With BYOS, you only pay Azure for the infrastructure costs of your VM as the software fee is covered by your RHEL or SLES subscription.

  • The Pay-As-You-Go (PAYG) model enables you to pay for RHEL and SLES subscriptions as you use them.

This article further defines BYOS and PAYG subscription models, compares the benefits of each model, and shows how you can use the Azure Hybrid Benefit to switch between the two at any point. This process applies to Virtual Machine Scale Sets, Spot Virtual Machines, and custom images. Azure Hybrid Benefit allows for seamless bi-directional conversions between the two subscription models on eligible VM instances.

Customers may see combined savings estimated to up to 76% with Azure Hybrid Benefit for Linux and three-year Azure Reserved VM Instances. Savings estimates are based on one standard D2s v5 Azure VM with RHEL or SLES subscription in the East US region running at a pay-as-you-go rate vs a reduced rate for a three-year reserved instance plan. Based on Azure pricing as of September 2024. Prices subject to change. Actual savings may vary based on location, instance type, or usage.

Tip

Try the Azure Hybrid Benefit Savings Calculator to visualize the cost saving benefits of this feature.

Defining Pay-As-You-Go (PAYG) and Bring-Your-Own-Subscription (BYOS)

In Azure, there are two main licensing pricing options: Pay-As-You-Go (PAYG) and Bring-Your-Own-Subscription (BYOS). With PAYG you only pay for the resources you use and can scale up or down as needed. BYOS enables you to use your existing license subscriptions, in this case RHEL and SLES, with no need to pay license fees in Azure.

Diagram that shows the use of Azure Hybrid Benefit to switch Linux virtual machines between pay-as-you-go and bring-your-own-subscription.

Note

Virtual machines deployed from PAYG images or VMs converted from BYOS models incur both an infrastructure fee and a software fee. If you have your own license, use Azure Hybrid Benefit to convert from a PAYG to BYOS model.

You can use Azure Hybrid Benefit to switch between the two subscription options at any time.

Which Linux Virtual Machines are Eligible for Azure Hybrid Benefit

Pay-As-You-Go (PAYG)

The following PAYG RHEL and SLES Marketplace offers are AHB eligible:

Limitations

  • Only RHEL images published by Red Hat, Inc. are AHB eligible
  • Images published by other vendors aren't supported
The following Red Hat published RHEL PAYG offers are ABH eligible:

The names of the eligible offers are listed below, with links to them in the Azure Marketplace. Within these offers, the associated images will be described as 'Pay-As-You-Go'.

BYOS

Azure Hybrid Benefit is also available for BYOS RHEL and SLES Marketplace images. There's currently one RHEL BYOS offer available, which is a private listing. To gain access to this private listing, it's necessary to join Red Hat's Cloud Access program.

SLES BYOS Marketplace offers can be identified by their name, which denotes them as BYOS, for example, 'SUSE Enterprise Linux 12 SP5 - BYOS'.

Additionally, please note that 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.

Note

For Red Hat VMs, the Azure account needs to be part of the Red Hat Cloud Access. Register with Red Hat Cloud Access before you try to enable Azure Hybrid Benefit on your VMs.

Enabling Azure Hybrid Benefit

Enabling AHB on New VMs

You can invoke AHB at the time of virtual machine creation. Benefits of doing so are threefold:

  • You can provision both PAYG and BYOS virtual machines by using the same image and process.
  • It enables future licensing mode changes.
  • 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.

To enable Azure Hybrid Benefit when you create a virtual machine, use the following procedure. (The SUSE workflow is the same as the RHEL example shown here.)

  1. Go to the Azure portal.

  2. Go to Create a virtual machine.

    Screenshot of the portal page for creating a virtual machine.

  3. 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.

    Screenshot of the Azure portal that shows checkboxes selected for licensing.

  4. Create a virtual machine by following the next set of instructions.

  5. On the Operating System pane, confirm that the option is enabled.

    Screenshot of the Azure Hybrid Benefit configuration pane after you create a virtual machine.

Enabling AHB on Existing VM

To enable Azure Hybrid Benefit on an existing virtual machine:

  1. Go to the Azure portal.
  2. Open the virtual machine page on which you want to apply the conversion.
  3. Go to Operating System > Licensing. To enable the Azure Hybrid Benefit conversion, select Yes, and then select the confirmation checkbox.

Screenshot of the Azure portal that shows the Licensing section of the configuration page for Azure Hybrid Benefit.

Check the current licensing model of an AHB enabled VM

It's required the Azure Hybrid Benefit extension be installed on the VM to switch the licensing model from BYOS to PAYG or vice versa. You can view whether the agent is installed using the Azure CLI or the Azure Instance Metadata Service.

  1. You can use the az vm get-instance-view command to check whether the extension is installed or not. Look for the AHBForSLES or AHBForRHEL extension, if the corresponding one is installed, the Azure Hybrid Benefit has been enabled, review the license type to review which licensing model your VM is using.

    az vm get-instance-view -g MyResourceGroup -n myVm --query instanceView.extensions
    
  2. Once the corresponding Red Hat or SUSE Hybrid benefit extension is installed, use the following command to review the license type the machine is using.

    az vm get-instance-view -g MyResourceGroup -n myVM --query licenseType
    
  3. The following license types correspond to PAYG model.

    • For RHEL: RHEL_BASE, RHEL_EUS, RHEL_SAPAPPS, RHEL_SAPHA, RHEL_BASESAPAPPS, or RHEL_BASESAPHA.
    • For SLES: SLES, SLES_SAP, or SLES_HPC
  4. These ones correspond to BYOS.

    • For RHEL: RHEL_BYOS
    • For SLES: SLES_BYOS

If the license type of the VM hasn't been modified, the previous command returns an empty string and the VM continues to use the billing model of the image used to deploy it.

PAYG to BYOS conversions


Convert a Pay As You Go(PAYG) image to BYOS using the Azure CLI

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.

  1. Apply the RHEL_BYOS license type to the machine:

    # This will enable BYOS on a RHEL(PAYG) virtual machine using Azure Hybrid Benefit
    az vm update -g myResourceGroup -n myVmName --license-type RHEL_BYOS
    
  2. Once the PAYG to BYOS conversion is complete, you must register the machine with Red Hat for system updates and usage compliance.

  3. If you desire to return to PAYG model, you need to set up the license-type to "None", otherwise, it continues to be BYOS.

    # If the image started as PAYG and was converted to BYOS, the following command will revert it back to PAYG.
    az vm update -g myResourceGroup -n myVmName --license-type NONE
    

BYOS to PAYG conversions

Converting to PAYG model is supported for Azure Marketplace images labeled BYOS, machines imported from on-premises or a third party cloud provider.

  1. Install the Azure Hybrid Benefit extension on a running virtual machine. You can use the following command via the Azure CLI:

    az vm extension set -n AHBForRHEL --publisher Microsoft.Azure.AzureHybridBenefit --vm-name myVMName --resource-group myResourceGroup
    
  2. After the extension is installed successfully, change the license type based on what you need:

    # This will enable Azure Hybrid Benefit to fetch software updates for RHEL base/regular repositories
    az vm update -g myResourceGroup -n myVmName --license-type RHEL_BASE
    
    # This will enable Azure Hybrid Benefit to fetch software updates for RHEL EUS repositories
    az vm update -g myResourceGroup -n myVmName --license-type RHEL_EUS
    
    # This will enable Azure Hybrid Benefit to fetch software updates for RHEL SAP APPS repositories
    az vm update -g myResourceGroup -n myVmName --license-type RHEL_SAPAPPS
    
    # This will enable Azure Hybrid Benefit to fetch software updates for RHEL SAP HA repositories
    az vm update -g myResourceGroup -n myVmName --license-type RHEL_SAPHA
    
    # This will enable Azure Hybrid Benefit to fetch software updates for RHEL BASE SAP APPS repositories
    az vm update -g myResourceGroup -n myVmName --license-type RHEL_BASESAPAPPS
    
    # This will enable Azure Hybrid Benefit to fetch software updates for RHEL BASE SAP HA repositories
    az vm update -g myResourceGroup -n myVmName --license-type RHEL_BASESAPHA
    
  3. If you desire to return to BYOS model, you need to set up license-type to "None", otherwise, it continues to be PAYG.

    # If the image started as BYOS and was converted to PAYG, the following command will revert it back to BYOS.
    az vm update -g myResourceGroup -n myVmName --license-type NONE
    

Multiple VMs

The following command converts the machines specified in the argument to BYOS.

# This will enable BYOS on a RHEL virtual machine. In this example, ids.txt is an
# existing text file that contains a delimited list of resource IDs corresponding
# to the virtual machines using Azure Hybrid Benefit
az vm update -g myResourceGroup -n myVmName --license-type RHEL_BYOS --ids $(cat ids.txt)

The following examples show two methods of getting a list of resource IDs: one at the resource group level, and one at the subscription level.

# To get a list of all the resource IDs in a resource group:
az vm list -g MyResourceGroup --query "[].id" -o tsv

# To get a list of all the resource IDs of virtual machines in a subscription:
az vm list -o json | jq '.[] | {VirtualMachineName: .name, ResourceID: .id}'

Operating system instructions

To start using Azure Hybrid Benefit for Red Hat:

  1. Install the AHBForRHEL extension on the virtual machine on which you want to apply the Azure Hybrid Benefit BYOS benefit. You can do this installation via the Azure CLI or PowerShell.

  2. Depending on the software updates that you want, change the license type to a relevant value. Here are the available license type values and the software updates associated with them:

    License type Software updates Allowed virtual machines
    RHEL_BASE Installs Red Hat regular/base repositories on your virtual machine. RHEL BYOS virtual machines, RHEL custom image virtual machines
    RHEL_EUS Installs Red Hat Extended Update Support (EUS) repositories on your virtual machine. RHEL BYOS virtual machines, RHEL custom image virtual machines
    RHEL_SAPAPPS Installs RHEL for SAP Business Apps repositories on your virtual machine. RHEL BYOS virtual machines, RHEL custom image virtual machines
    RHEL_SAPHA Installs RHEL for SAP with High Availability (HA) repositories on your virtual machine. RHEL BYOS virtual machines, RHEL custom image virtual machines
    RHEL_BASESAPAPPS Installs RHEL regular/base SAP Business Apps repositories on your virtual machine. RHEL BYOS virtual machines, RHEL custom image virtual machines
    RHEL_BASESAPHA Installs regular/base RHEL for SAP with HA repositories on your virtual machine. RHEL BYOS virtual machines, RHEL custom image virtual machines
  3. Wait one hour for the extension to read the license type value and install the repositories.

    Note

    If the extension isn't running by itself, you can run it on demand.

  4. You should now be connected to Azure Red Hat Update. The relevant repositories are installed on your machine.

  5. If you want to switch back to the bring-your-own-subscription model, just change the license type to None and run the extension. This action removes all Red Hat Update Infrastructure (RHUI) repositories from your virtual machine and stops the billing.

Note

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.

AHB for reserved instance VMs

Azure reservations (Azure Reserved Virtual Machine Instances) help you save money by committing to one-year or three-year plans for multiple products. Azure Hybrid Benefit for pay-as-you-go virtual machines is available for reserved instances.

If you've purchased compute costs at a discounted rate by using reserved instances, you can apply Azure Hybrid Benefit on the licensing costs for RHEL and SUSE on top of it. The steps to apply Azure Hybrid Benefit for a reserved instance remain exactly same as they are for a regular virtual machine.

Screenshot of the interface for purchasing reservations for virtual machines.

Note

If you've already purchased reservations for RHEL or SUSE pay-as-you-go software on Azure Marketplace, please wait for the reservation tenure to finish before using Azure Hybrid Benefit for pay-as-you-go virtual machines.

Compliance

Customers who use Azure Hybrid Benefit for pay-as-you-go RHEL virtual machines agree to the standard legal terms and privacy statement associated with the Azure Marketplace RHEL offers.

Customers who use Azure Hybrid Benefit for pay-as-you-go RHEL virtual machines have three options for providing software updates and patches to those virtual machines:

Customers can use RHUI as the main update source for Azure Hybrid Benefit for pay-as-you-go RHEL virtual machines without attaching subscriptions. Customers who choose the RHUI option are responsible for ensuring RHEL subscription compliance.

Customers who choose either Red Hat Satellite Server or Red Hat Subscription Manager should remove the RHUI configuration and then attach a cloud-access-enabled RHEL subscription to Azure Hybrid Benefit for PAYG RHEL virtual machines.

For more information about Red Hat subscription compliance, software updates, and sources for Azure Hybrid Benefit for pay-as-you-go RHEL virtual machines, see the Red Hat article about using RHEL subscriptions with Azure Hybrid Benefit.

Customers who use Azure Hybrid Benefit BYOS to PAYG capability for RHEL agree to the standard legal terms and privacy statement associated with the Azure Marketplace RHEL offerings.

Frequently asked questions

  • Q: Can I use a license type of RHEL_BYOS with a SLES image, or vice versa?

    • A: No, you can't. Trying to enter a license type that incorrectly matches the distribution running on your virtual machine won't update any billing metadata. But if you accidentally enter the wrong license type, updating your virtual machine again to the correct license type still enables Azure Hybrid Benefit.
  • 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?

    • 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.
  • 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?

    • A: Yes, you can use Azure Hybrid Benefit for BYOS virtual machines to do this. Learn more about this capability.
  • 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?

    • A: Yes, you can use Azure Hybrid Benefit for BYOS virtual machines to do this. Learn more about this capability.
  • 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?

    • 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.
  • Q: Can I use Azure Hybrid Benefit for pay-as-you-go virtual machines for Azure Marketplace RHEL and SLES SAP images?

    • 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.
  • Q: Can I use Azure Hybrid Benefit for pay-as-you-go virtual machines on Virtual Machine Scale Sets for RHEL and SLES?

    • 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.
  • Q: Can I use Azure Hybrid Benefit for pay-as-you-go virtual machines on reserved instances for RHEL and SLES?

    • A: Yes. Azure Hybrid Benefit for pay-as-you-go virtual machines on reserved instances for RHEL and SLES is available to all users.
  • 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?

    • A: No, you can't. There's no plan for supporting these virtual machines.
  • Q: Can I use Azure Hybrid Benefit on my RHEL for Virtual Datacenters subscription?

    • A: No. RHEL for Virtual Datacenters isn't supported on Azure at all, including Azure Hybrid Benefit.

Next steps