I have an ESXi 6.0 hypervisor and am in the process of installing datacenter licenses for RedHat. I installed and configured virt-who RHEL7 VM as per How to use "virt-who" to register Esxi hosts with "Virtual Datacenter" entitlements ?
While going through the instructions in the above link I noticed that /etc/sysconfig/virt-who
file states
# Following configuration is now deprecated. Please use configuration file
# in /etc/virt-who.d/. See virt-who-config(5) for details how to configure it.
I followed man page instructions for virt-who-config and used /etc/virt-who.d/
instead. In there I created a file
cat /etc/virt-who.d/ops-esxi.conf
[ops-esxi]
type=esx
server=ops-esxi.mydomain.com
username=root
#password=
encrypted_password=afcfb5fjhdgjgdb14d5c8hetdgstghh1b6
owner=11111111
env=ops
hypervisor_id=hostname
It appears to be working after restarting the virt-who service.
The only issue is that on access.redhat.com Customer Portal all my machines, including the hypervisor, are called localhost.localdomain
I have no idea where is this coming from but sure am curious how to fix this.
UPDATE: subscription-manager reports incorrect hostname
subscription-manager identity
system identity: xxxxxxxxxxxxxxxxx
name: localhost.localdomain
org name: 1111111
org ID: 111111
Any help would be much appreciated.
On each host, the networking configuration you use determines where the hostname and fqdn are stored. You can use grep to find which files contain 'localhost.localdomain'. Replacing the correct one should resolve this issue.
Still not sure how it picked up
localhost.localdomain
but forcing the registration again helped.Now the
subscription-manager identity
as well as Customer Portal show correct hostname.This method can also be used to update hostname on Red Hat Customer Portal. It's obvious but I thought it would be useful for search engines.