Bare metal hosts incorrectly listed as VMware

I have two bare metal hosts that are listed with a manufacturer of VMware. I’ve verified that the facts both on the hosts and in Katello show is_virtual as false, and all manufacturer/model facts show HPE and ProLiant. There are no facts anywhere that have VMware in the value. How can I fix this?

I do have other bare metal servers that list manufacturer and model correctly as HPE ProLiant servers.

Forman version 3.5.1.

Could it be the hosts that are incorrectly listed as VMWare hosts are in a hostgroup that has a compute resource set, and the ones that are correctly listed as bare-metal are not?
If so, I opened a bug report for this several years ago: Bug #29701: Overriding inherrited Compute Resource from Hostgroup with nil (Bare Metal) does not work properly - Foreman
In my case, the hosts all have the correct model saved in the DB, but also have a compute_resource_id associated to them.

If this matches your situation and causes active problems on your end (like you need to query whether a host is physical or virtual in templates for example), I was able to solve such problems by manually setting compute_resource_id to NULL in the DB for the affected hosts. Though I should probably mention that tampering with the DB manually is not a great solution and should be avoided and handled with care.

Both of them are indeed part of a hostgroup with a compute resource set, and I’m experiencing the same thing with being unable to override. The odd thing is that the unaffected hosts are in a hostgroup configured exactly the same way.

Your workaround with the manual DB edit appears to have worked perfectly, with no adverse side effects so far. Crossing my fingers.

Thank you! I wish that bug would get addressed after nearly 3 years…

1 Like