Azure Hybrid Benefit (AHB) for Linux is a powerful feature that allows you to easily switch between pay-as-you-go (PAYG) and bring-your-own-subscription (BYOS) licensing models for your Linux virtual machines. With AHB, you can remove licensing costs by bringing your existing Red Hat and SUSE Linux subscriptions directly to Azure, or utilize a PAYG model where you pay for subscriptions as you use them.

This comprehensive guide will walk you through the key concepts of PAYG and BYOS licensing, how to enable AHB on new and existing VMs, how to check the current licensing model of an AHB-enabled VM, and the step-by-step process for converting between PAYG and BYOS models. We’ll also cover important compliance considerations, frequently asked questions, and next steps to help you get the most out of this feature.

Defining PAYG and BYOS

In Azure, there are two main licensing options: ‘pay-as-you-go’ (PAYG) and ‘bring-your-own-subscription’ (BYOS). PAYG is a pricing model where you pay for the resources you use on an hourly or monthly basis, scaling up or down as needed. BYOS, on the other hand, allows you to use your existing licenses for certain software, such as RHEL and SLES, on Azure virtual machines without having to purchase new ones.

The key difference is that PAYG VMs incur both an infrastructure fee and a software fee, while BYOS VMs only incur the infrastructure fee since you’re using your existing licenses. You can use Azure Hybrid Benefit to switch between these two models at any time.

Enabling AHB

You can enable AHB when creating a new VM or on an existing VM. The process is slightly different for each, but the core steps are the same:

  1. For new VMs, select the ‘Use existing RHEL/SLES subscription’ option during VM creation and confirm your subscription is eligible.
  2. For existing VMs, navigate to the ‘Operating System’ > ‘Licensing’ section and enable the Azure Hybrid Benefit conversion.

In both cases, you’ll need to install the appropriate extension (AHBForRHEL or AHBForSLES) on the VM to complete the process.

Checking the Licensing Model

To determine the current licensing model of an AHB-enabled VM, you can use the Azure CLI or PowerShell. Look for the installed extension and the reported license type. RHEL_BASE, RHEL_EUS, SLES, SLES_SAP, etc. indicate a PAYG model, while RHEL_BYOS and SLES_BYOS indicate a BYOS model.

Converting Between PAYG and BYOS

Converting from PAYG to BYOS is straightforward - you simply apply the RHEL_BYOS or SLES_BYOS license type to the VM. Conversely, to move from BYOS to PAYG, you’ll need to install the AHB extension and then update the license type to one of the PAYG options.

Make sure to register the VM with Red Hat or SUSE accordingly after any conversion to ensure proper software updates and compliance.

Compliance and FAQs

Customers using AHB for RHEL or SLES agree to the standard legal terms and privacy statements associated with the Azure Marketplace offerings. There are also specific compliance requirements around software updates and subscription management that you’ll need to be aware of.

The FAQ section covers common questions around using AHB, such as cross-distro license types, RHEL for Virtual Datacenters support, and AHB with reserved instances and SQL Server VMs.

Next Steps

To get started, check out the Azure CLI commands for creating and updating VMs with AHB, as well as the information on using AHB with Virtual Machine Scale Sets. With this guide, you’ll be well on your way to optimizing your Linux VM costs and enjoying the benefits of Azure Hybrid Benefit.

Source: Azure Hybrid Benefit for Linux virtual machines