diff --git a/host/host_linux.go b/host/host_linux.go index 205d1e5..5018622 100644 --- a/host/host_linux.go +++ b/host/host_linux.go @@ -566,6 +566,16 @@ func VirtualizationWithContext(ctx context.Context) (string, string, error) { } } + filename = common.HostProc("bus/pci/devices") + if common.PathExists(filename) { + contents, err := common.ReadLines(filename) + if err == nil { + if common.StringsContains(contents, "virtio-pci") { + role = "guest" + } + } + } + filename = common.HostProc() if common.PathExists(filepath.Join(filename, "bc", "0")) { system = "openvz"