Skip to content

Commit

Permalink
Detect bochs hypervisor
Browse files Browse the repository at this point in the history
  • Loading branch information
zcalusic committed Sep 30, 2018
1 parent 8fa951c commit f6a3223
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
6 changes: 6 additions & 0 deletions hypervisor.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,11 @@ func (si *SysInfo) getHypervisor() {
return
}

// getBIOSInfo() must have run first, to detect BIOS vendor
if si.BIOS.Vendor == "Bochs" {
si.Node.Hypervisor = "bochs"
return
}

si.Node.Hypervisor = "unknown"
}
8 changes: 5 additions & 3 deletions sysinfo.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,16 @@ func (si *SysInfo) GetSysInfo() {
si.getProductInfo()
si.getBoardInfo()
si.getChassisInfo()
si.getBIOSInfo()

// SMBIOS info
si.getMemoryInfo()

// Node info
si.getNodeInfo()
si.getNodeInfo() // depends on BIOS info

// Hardware info
si.getBIOSInfo()
si.getCPUInfo() // depends on Node info
si.getMemoryInfo()
si.getStorageInfo()
si.getNetworkInfo()

Expand Down

0 comments on commit f6a3223

Please sign in to comment.