I write a custom Kickstart as a Foreman provisioning template.
One of my problems is that I haven't found a way to determine if the new host will be installed on a bare metal or on a Hypervisor.
The @host.model
works on ESXi hypervisors, but Libvirt reports "Standard PC (i440FX + PIIX, 1996)"
As a work around, I use this string as libvirt identifier, but, it's not safe and it's a workaround.
So, which parameter should I use to determine if the server will be a virtual one or not?
This will check if the host is linked to a compute resource:
You can use the
virt-what(1)
command to determine if you are on bare-metal or a virtualised environment.