change indicator used for later versions of VirtualBox (#21127)
authorGreg Zuro <gregzuro@users.noreply.github.com>
Wed, 27 Oct 2021 04:02:37 +0000 (21:02 -0700)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 10 Nov 2021 14:01:30 +0000 (15:01 +0100)
commit7459b7f4a63de87a6e76e9187893c65291b7931f
tree874fffd96add0cd88c25f57510767d7b54694e03
parent06444b314b863facdb173f10f2d1ff11196755d2
change indicator used for later versions of VirtualBox (#21127)

Detection of VirtualBox is accomplished in the existing code by *either* `innotek GmbH`
or `Oracle Corporation` existing in any of:

- /sys/class/dmi/id/product_name
- /sys/class/dmi/id/sys_vendor
- /sys/class/dmi/id/board_vendor
- /sys/class/dmi/id/bios_vendor

With Oracle's physical servers, both `/sys/class/dmi/id/sys_vendor` and
`/sys/class/dmi/id/board_vendor` contain `Oracle Corporation`, so those
servers are detected as `oracle` (VirtualBox).

VirtualBox has the following values in the latest versions:

- /sys/class/dmi/id/product_name: `VirtualBox`
- /sys/class/dmi/id/sys_vendor: `innotek GmbH`
- /sys/class/dmi/id/board_vendor: `Oracle Corporation`
- /sys/class/dmi/id/bios_vendor: `innotek GmbH`

Presumably the existing check for `innotek GmbH` is meant to detect
older versions of VirtualBox, while changing the second checked value
from `Oracle Corporation` to `VirtualBox` will reliably detect later and future
versions.

(cherry picked from commit cfee6b955154c30be31ffcf0e3b7b89374a52fff)
src/basic/virt.c