RexOps / Rex

Rex, the friendly automation framework
https://www.rexify.org
717 stars 223 forks source link

update Rex::Hardware::VirtInfo to work in a cross platform manner #1599

Closed VVelox closed 1 year ago

VVelox commented 1 year ago

Previously Rex::Hardware::VirtInfo made heavy use of linuxisms and was not cross platform friendly.

This update uses /proc on Linux and dmidecode else where. For modules on FreeBSD kldstat is used. Unforftunately not aware of a good cross platform equivalent of the self_status check.

Also kvm module is now only looked for on Linux with vmm(bhyve) being looked for on FreeBSD.

Tested as working on FreeBSD bhyve host and guest as well as Linux kvm host.

This PR is a proposal to fix # by .

Checklist