Unable to apply Azure Hybrid Benefit (AHUB) for Red Hat Enterprise Linux on our virtual machines.

Chavalit Tirakitti 0 Reputation points
2026-10-30T03:04:58.71+00:00

I am currently unable to apply Azure Hybrid Benefit (AHUB) for Red Hat Enterprise Linux on our virtual machines. Whenever we select "Red Hat Enterprise Linux" as the License Type and apply, the portal reverts it back to "Other".

Symptoms & Troubleshooting Performed:

The Azure Portal displays the VM agent status as "Not provisioned" for both VMs.

We have already logged into the guest OS, successfully installed, and started the WALinuxAgent. The service is actively running inside the OS.

  1. Despite the agent running, it appears unable to communicate with Azure portal, The portal status remains out of sync, which blocks the AHUB assignment.

Because of this issue, we are currently being charged for RHEL Pay-As-You-Go licenses (Double billing with our on-premise subscription).

Request: Please assist us in investigating the root cause of the VM Agent communication failure and help us get the AHUB license successfully applied to these VMs.

Thank you.

Cost Management
Cost Management

A Microsoft offering that enables tracking of cloud usage and expenditures for Azure and other cloud providers.

0 comments No comments

1 answer

Sort by: Oldest
  1. AI answer

    2026-10-30T03:07:16.0466667+00:00

    Restart the running Azure Linux Agent, wait several minutes for its status to refresh, and then install the required AHBForRHEL extension before setting the VM license type to RHEL_BYOS.

    1. Restore VM-agent communication

    Since the agent is already installed and running, do not reinstall it initially. Restart it and inspect the resulting status and log:

    sudo systemctl restart walinuxagent 2>/dev/null \
      || sudo systemctl restart waagent
    
    sleep 180
    sudo systemctl status walinuxagent --no-pager 2>/dev/null \
      || sudo systemctl status waagent --no-pager
    sudo tail -n 100 /var/log/waagent.log
    

    The documented next check is connectivity to Azure’s Fabric Controller at [IP Address]. This address must not be blocked or sent through a proxy; the required outbound ports are 80, 443, and 32526.^1^

    sudo curl --connect-timeout 10 \
      http://168.63.129.16/?comp=versions
    
    for port in 80 443 32526; do
      timeout 5 bash -c \
        "cat < /dev/null > /dev/tcp/[IP Address]/$port" \
        && echo "$port reachable" || echo "$port blocked"
    done
    

    The curl request validates the HTTP WireServer endpoint; the loop separately tests all three required TCP ports.

    If any test fails:

    • Check the guest firewall, iptables/nftables, proxy configuration, and guest routing.
    • Allow direct outbound communication to [IP Address] on ports 80, 443, and 32526.
    • Check /etc/waagent.conf contains:
    AutoUpdate.Enabled=y
    

    Also check the installed agent version is supported. The Azure Linux Agent is responsible for running VM extensions, so AHBForRHEL cannot complete while the agent remains unavailable.^2^

    For deeper diagnostics, download VM assist by following its documented README and run sudo ./vmassist.sh. It checks the WireServer, Instance Metadata Service, agent configuration, packages, and system state. The VM must reach the full operating system and you need root access.^3^

    2. Verify AHUB eligibility independently

    The portal reverting the setting does not by itself establish that agent communication is the only problem. Confirm these licensing prerequisites:

    • The Azure account is registered with Red Hat Cloud Access.
    • For PAYG-to-BYOS conversion, the VM uses an eligible RHEL image published by Red Hat, Inc. Images from other vendors are unsupported.
    • If this VM was uploaded from on-premises, it is already treated as BYOS and incurs only Azure infrastructure charges; it should not be converted as though it were a Marketplace PAYG image.
    • Cloud Access registration can take time to propagate. If it still fails after one business day, contact Microsoft Support.^4^

    Inspect the image reference:

    az vm show \
      --resource-group <RG> \
      --name <VM_NAME> \
      --query storageProfile.imageReference
    

    3. Apply AHUB through Azure CLI

    Sign in to Azure CLI with an identity authorized to update the VM and install VM extensions. First check whether the RHEL AHUB feature is enabled:

    az feature list --namespace Microsoft.Compute \
      --query "[?name=='Microsoft.Compute/AHBEnabledForRHEL']"
    

    After the agent reports healthy, install the required extension:

    az vm extension set \
      --resource-group <RG> \
      --vm-name <VM_NAME> \
      --name AHBForRHEL \
      --publisher Microsoft.Azure.AzureHybridBenefit
    

    Do not continue unless this command reports successful provisioning. Then convert the eligible PAYG VM to BYOS:

    az vm update \
      --resource-group <RG> \
      --name <VM_NAME> \
      --license-type RHEL_BYOS
    

    Verify both the billing metadata and extension state:

    az vm get-instance-view \
      --resource-group <RG> \
      --name <VM_NAME> \
      --query "{licenseType:licenseType,extensions:extensions[].{name:name,status:statuses[0].displayStatus}}"
    

    Expect licenseType to be RHEL_BYOS and AHBForRHEL to show successful provisioning. Allow time for the portal and billing views to reflect the update.

    If conversion still fails

    If the extension cannot install repositories or the license value does not persist, return the license type to NONE and open a Microsoft support request rather than leaving an uncertain billing configuration:

    az vm update \
      --resource-group <RG> \
      --name <VM_NAME> \
      --license-type NONE
    

    Include /var/log/waagent.log, VM assist output, extension provisioning status, VM resource ID, image publisher/offer/SKU, and the conversion timestamp. Because PAYG software charges are continuing, request both VM Agent/extension investigation and RHEL billing review promptly. Microsoft directs RHEL Marketplace-image problems to Microsoft Support.^5^


    References

    1. Troubleshoot the Azure Linux Agent
    2. Virtual machine extensions and features for Linux
    3. Troubleshooting Tool for Linux Guest Agent - VM assist
    4. Azure Hybrid Benefit for Linux virtual machines
    5. Overview of Red Hat Enterprise Linux images
    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.