summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@baturin.org>2018-12-22 17:45:25 +0100
committerDaniil Baturin <daniil@baturin.org>2018-12-22 17:45:25 +0100
commitef692a5a846e287e3a509828cfcc339eec48ff1f (patch)
treefeee14ba2afb50b948c4e94486634ad74dfff7b8
parent82e894e11825451ea93998dcdfb7b516a9ffbdd6 (diff)
downloadhvinfo-ef692a5a846e287e3a509828cfcc339eec48ff1f.tar.gz
hvinfo-ef692a5a846e287e3a509828cfcc339eec48ff1f.zip
Add support for correctly detecting VirtualBox using KVM or Hyper-V as its backend.
-rw-r--r--src/hvinfo.adb10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/hvinfo.adb b/src/hvinfo.adb
index e545427..342a53e 100644
--- a/src/hvinfo.adb
+++ b/src/hvinfo.adb
@@ -91,9 +91,15 @@ begin
IO.Put_Line ("CPUID hypervisor bit is set");
UIO.Put_Line ("Hypervisor identifier is """ & Get_Vendor_String & """");
end if;
- end;
- Hypervisor_Name := Get_Vendor_Name;
+ Hypervisor_Name := Get_Vendor_Name;
+
+ -- VirtualBox may use KVM or Hyper-V as its backend,
+ -- but still exposes its own graphics card so that setup can be detected
+ if VirtualBox_PCI_Present then
+ Hypervisor_Name := "VirtualBox (using " & Hypervisor_Name & ")";
+ end if
+ end;
elsif DMI_Available then
-- VirtualBox, Parallels, and possible others only
-- mark their presence by setting SMBIOS vendor string