fix virtualization detection (#15)

This commit is contained in:
UUBulb 2024-05-05 00:06:50 +08:00 committed by GitHub
parent f57634fca0
commit 25ee86800c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -54,7 +54,11 @@ func GetHost(agentConfig *model.AgentConfig) *model.Host {
ret.Platform = hi.Platform ret.Platform = hi.Platform
ret.PlatformVersion = hi.PlatformVersion ret.PlatformVersion = hi.PlatformVersion
ret.Arch = hi.KernelArch ret.Arch = hi.KernelArch
ret.Virtualization = hi.VirtualizationSystem if cpuType == "Physical" {
ret.Virtualization = ""
} else {
ret.Virtualization = hi.VirtualizationSystem
}
ret.BootTime = hi.BootTime ret.BootTime = hi.BootTime
} }