1
0
mirror of https://github.com/systemd/systemd.git synced 2024-10-27 18:55:40 +03:00

Merge pull request #2003 from eworm-de/virt

virt: add comment about order in virtualization detection
This commit is contained in:
Lennart Poettering 2015-11-23 21:01:01 +01:00
commit e429762faa

View File

@ -269,6 +269,13 @@ int detect_vm(void) {
if (cached_found >= 0)
return cached_found;
/* We have to use the correct order here:
* Some virtualization technologies do use KVM hypervisor but are
* expected to be detected as something else. So detect DMI first.
*
* An example is Virtualbox since version 5.0, which uses KVM backend.
* Detection via DMI works corretly, the CPU ID would find KVM
* only. */
r = detect_vm_dmi();
if (r < 0)
return r;