1
0
mirror of https://github.com/shirou/gopsutil.git synced 2025-05-02 22:17:08 +08:00

Merge pull request #1336 from johanburati/job043

Add hostinfo Virtualization hyperv
This commit is contained in:
shirou 2022-09-30 17:33:58 +09:00 committed by GitHub
commit 16b3aac6ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -149,6 +149,9 @@ func VirtualizationWithContext(ctx context.Context) (string, string, error) {
if StringsContains(contents, "kvm") {
system = "kvm"
role = "host"
} else if StringsContains(contents, "hv_util") {
system = "hyperv"
role = "guest"
} else if StringsContains(contents, "vboxdrv") {
system = "vbox"
role = "host"