Closed wwng2333 closed 8 months ago
package main
import (
"fmt"
"github.com/shirou/gopsutil/v3/host"
)
func main() {
hi, _ := host.Info()
fmt.Printf("cpuType: %v\r\n", hi.VirtualizationSystem)
fmt.Println(hi)
}
After print virtualizationRole, i know it's a host.
Describe the bug Report a bare-meteral machine as KVM at host.Info
To Reproduce
Expected behavior My host is running kvm for guest vm, but it's not a real vm.
Environment (please complete the following information):
ver
]/etc/os-release
and the result ofuname -a
]sw_vers
anduname -a
freebsd-version -k -r -u
anduname -a
]uname -a
]/etc/os-release
:Additional context [Cross-compiling? Paste the command you are using to cross-compile and the result of the corresponding
go env
]