RHEL Virtual Datacenter Licensing on ESXi – Explained

At our organization, we deploy Red Hat Enterprise Linux as our Linux flavor of choice for our Enterprise applications.  We have recently decided to migrate from Standard licensing to Unlimited licensing.  Although the licensing is a lot more expensive, it allows you to increase the density of your virtual machine guests on each host.

Historically, all we needed to do was to spin up a guest, and run subscription-manager commands to clean, register, and attach an update repository.  This process is mainly for a Standard licensing scheme.

The below steps will assist you in getting a Virtual Datacenter Licensing scheme set up that will allow you to license unlimited Red Hat VMs running on your host.  For our purposes, we are allowing Red Hat VMs to be properly licensed on ESXi 5.0, but this process should work if you have ESXi 5.1 or ESXi 5.5.

Step 1:  Spin up a Red Hat VM

Installing a RHEL “utility” VM or host will allow you to leverage the virt-who service to scan vCenter Server for hypervisors (hosts) to be licensed with unlimited Red Hat Enterprise Linux.  This utility VM needs to be able to communicate with vCenter Server’s Web Services SDK (more on that in a bit).  This system can also have another role in your environment, but we chose to dedicate a system to this role.

Step 2: The virt-who service

Connect the aforementioned RHEL utility server to a yum repository using legacy subscription methods, and install the virt-who service and it’s dependencies by entering:

sudo yum install virt-who

Restart the VM and make sure the virt-who service is running.  It should be enabled within at least runlevel 3 inside your VMs chkconfig.

Step 3: Document the virt-who server identity

When the VM comes back up, enter the command:

sudo subscription-manager identity

Write down the org name/org ID

Step 4: Special note for vCenter 5.0 users

Per VMware KB article 2010507, there is a known issue where sometimes the vSphere Web Services SDK WSDL files obtained from vCenter Server do not contain all the necessary files.  This prevents you from using the server-based WSDL and SOAP toolkit necessary to allow virt-who to discover all hypervisor UUIDs for licensing purposes.

The KB article contains a link to the vSphere Web Services SDK.  Extract the files and copy any missing files from VMware-vSphere-SDK-5.0.0-429209\SDK\vsphere-ws\wsdl\vim25 to your c:\programdata\VMware\VMware VirtualCenter\docroot\sdk folder on your vCenter Server (assuming it is installed on your C drive).

There is no need to restart any services on your vCenter Server.

Step 5: Configure virt-who

The virt-who config file allows you to configure management points for Red Hat Enterprise Virtualization, VMware ESXi, and Hyper-V.  We are a VMware shop, so these steps will outline the process for licensing unlimited RHEL guests on ESXi.

Once virt-who is installed, type

sudo vi /etc/sysconfig/virt-who

Make sure the following lines are uncommented and configured as follows:

VIRTWHO_ESX_OWNER=[type orgID number from step 3]
VIRTWHO_ESX_ENV=[Your company name]
VIRTWHO_ESX_SERVER=[your vCenter Server FQDN]
VIRTWHO_ESX_USERNAME=[vCenter user with the ability to see host UUIDs]
VIRTWHO_ESX_PASSWORD=[above user’s password]

Save the above virt-who config file.  Note that I turned on the debugger.  This is optional, but I like to make sure things are working without having to go back and turn it on if needed.  It is a good idea to open a new SSH session to your utility server and run:

tail -f /var/log/rhsm/rhsm.log

This is where our virt-who logs will go, and they will be logging in debug mode.  To restart the virt-who service, type:

sudo service virt-who restart

…and monitor your tail command for errors.  If all is well, feel free to turn the debugger off in your virt-who config file


Step 6: Hypervisor licensing assignment

Log in to your Red Hat Support portal at https://access.redhat.com/home using the same username and password you used to subscription-manager register your utility VM.

Go to Subscriptions – > Subscription Management – > Units and click on the “Hypervisors” tab.

Select drop down to display “ALL” hypervisors.  You should see all UUIDs for every host vCenter Server can see.  This doesn’t mean you need licenses for every host, but you will be attaching a subscription to the correct hosts in a future step.

Step 7: Compile a list of ESXi host UUIDs

Using the ESXi Managed Object Browser located at:
https://hostname.fqdn/mob/?moid=ha-host&doPath=hardware.systemInfo (EDIT: I noticed that on vSphere 5.5, this path has changed to https://hostname.fqdn/mob/?moid=ha%2dhost&doPath=hardware%2esystemInfo )

Log in using your host’s root login/password to view your hardware system information, and the host UUID.  The page will look similar to below:


Connect to the Host System Info page for every host you would like to license, and document them.

Step 8: Attach a subscription to your ESXi host

Back on the Red Hat subscription management portal, click to display ALL hypervisors and sort by name.  You should have a bunch of UUIDs listed under your Hypervisors tab under units.


Click on a UUID (Name) that matches one of the UUIDs on your list.

On the lower-right hand corner of the subsequent page, attach a subscription.  Be sure to attach the one labeled “Red Hat Enterprise Linux for Virtual Datacenters”.

Step 9: License your Virtual Machine Guests

Once you have all of your subscriptions attached, you can go back to your Virtual Machine guests and re-license them.  If you had applied standard licensing to your hosts beforehand, you will need to do a remove and clean command as per the screen capture below.  If the VM you are licensing is brand new, you only need to register and attach.


I took the extra step to jot down the UUID for each VM, along with it’s host name.  I then went back and cleaned up all duplicate VMs in the portal.

I hope this helps!  If you are a Linux / DevOps veteran, please feel free to add any tips/tricks that I might have missed!  Red Hat also has a nice article on how to set up Virtual Datacenter Licensing at: https://access.redhat.com/site/articles/480693




  1. Brian

    Note that a Red Hat Customer Portal user needs the “organizational administrator” permission to see Hypervisors added by virt-who. Add this permission by navigating to

  2. rob


    I was following the directions on your blog because I have a similar setup. But I noticed that my virt-who cannot make a connection to the Vcenter, I am getting a invalid login error. I checked the user name and password and it works fine. This is a windows domain user and has admin rights. I was just wondering if this was the problem, do I need a local admin account?

    1. Bram


      Make sure your username is set as ” username@FQDN ” (without quotes offcourse). It wont work if you only use “username” or FQDN\username.

      So for example: service_rhel@company.com

      1. Ian

        You can use FQDN\\username — just make sure to escape the backslash.

  3. Mohamed Sahal

    Hi , Thanks for this post.

  4. Bram


    Thanks for this very clear and detailed guide! Especially the part of how to find your host UUID’s. I couldnt figure this part out for quite a while and red hat dont have this documentated themselfs. They really should put this as a tip in the official guides.

  5. Thanks

    This was helpful. What’s not known is why they couldn’t have grabbed the esxi hostname vs. the uuid. That would have saved a lot of confusion in my mind. You also can’t rename the uuids currently for the esxi hostname which is unfortunate

  6. Question

    My environment is completely VMware, but not all the hosts are used as RHEL Datacenter hosts. Is there a way to have virt-who only send Redhat the UUIDs of the specific RHEL Datacenter hosts?

    My subscription management portal gets flooded with hypervisor entries 99.99% of which aren’t ever going to be RHEL Datacenter hosts.

    1. Filip

      You should create a vCenter user which is able to access only RHEL ESX hosts. In that case the virt-who will see only them and report only them.

  7. Peter

    I am getting following error while configuring the virt-who:
    @virt.py:303 – Virt backend ‘env/cmdline’ fails with error: Server raised fault: ‘Cannot complete login due to an incorrect user name or password.

    But I am pretty sure that my credentials for Vcenter are correct

  8. Laurent

    This was extremely useful. Thank you for sharing this ! 🙂


Leave a Comment

Your email address will not be published. Required fields are marked *