system() fixed vm detection (linux)

This commit is contained in:
Sebastian Hildebrandt
2021-05-07 19:10:25 +02:00
parent 9520b43d6d
commit ea18f0b4e4
4 changed files with 9 additions and 3 deletions
+1 -1
View File
@@ -159,7 +159,7 @@ function system(callback) {
result.model = 'Docker Container';
}
try {
const stdout = execSync('dmesg 2>/dev/null | grep -iE "virtual|hypervisor" | grep -iE "vmware|qemu|kvm|xen"');
const stdout = execSync('dmesg 2>/dev/null | grep -iE "virtual|hypervisor" | grep -iE "vmware|qemu|kvm|xen" | grep -vi "Nested Virtualization"');
// detect virtual machines
let lines = stdout.toString().split('\n');
if (lines.length > 0) {