[host]linux: add #688 diff which is removed after merging #689

tags/v2.19.05
shirou 6 years ago
parent b2cbc26504
commit 07863cab0c

@ -164,6 +164,16 @@ func VirtualizationWithContext(ctx context.Context) (string, string, error) {
}
}
filename = HostProc("bus/pci/devices")
if PathExists(filename) {
contents, err := ReadLines(filename)
if err == nil {
if StringsContains(contents, "virtio-pci") {
role = "guest"
}
}
}
filename = HostProc()
if PathExists(filepath.Join(filename, "bc", "0")) {
system = "openvz"

Loading…
Cancel
Save