A Microsoft offering that enables tracking of cloud usage and expenditures for Azure and other cloud providers.
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.confcontains:
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