0

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.

Bart C
  • 211
  • 1
  • 2
  • 8

2 Answers2

0

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.

Jeter-work
  • 845
  • 4
  • 15
  • I've tried that, in the whole of /etc there is not a single mention of localhost.localdomain in any type of settings. The only files that come up are scripts which check for this string. – Bart C Jul 19 '17 at 15:58
  • @BartC perhaps search for just `localhost` and separately `localdomain`? – Jeter-work Jul 20 '17 at 15:21
0

Still not sure how it picked up localhost.localdomain but forcing the registration again helped.

subscription-manager register --force

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.

Bart C
  • 211
  • 1
  • 2
  • 8