diff --git a/CHANGELOG.md b/CHANGELOG.md
index 2f4fc25..67c91bd 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -77,6 +77,7 @@ For major (breaking) changes - **version 4, 3 and 2** - see end of page.
| Version | Date | Comment |
| -------------- | -------------- | -------- |
+| 5.7.2 | 2021-05-24 | `system()` virtual detection improvement |
| 5.7.1 | 2021-05-20 | `graphics()` Check for qwMemorySize on Windows |
| 5.7.0 | 2021-05-20 | `diskLayout()` added smartdata for win (if istalled) |
| 5.6.22 | 2021-05-18 | `diskLayout()` fixed to small buffer smartdata (linux) |
diff --git a/docs/history.html b/docs/history.html
index ee228f1..1c10a63 100644
--- a/docs/history.html
+++ b/docs/history.html
@@ -56,6 +56,11 @@
+
+ | 5.7.2 |
+ 2021-05-24 |
+ system() virtual detection improvement |
+
| 5.7.1 |
2021-05-20 |
diff --git a/docs/index.html b/docs/index.html
index b197849..302d7ea 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -170,7 +170,7 @@
systeminformation
- New Version: 5.7.1
+ New Version: 5.7.2
diff --git a/lib/system.js b/lib/system.js
index e42ce7b..3e39c98 100644
--- a/lib/system.js
+++ b/lib/system.js
@@ -159,22 +159,22 @@ 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" | grep -vi "Nested Virtualization"');
+ const stdout = execSync('dmesg 2>/dev/null | grep -iE "virtual|hypervisor" | grep -iE "vmware|qemu|kvm|xen" | grep -viE "Nested Virtualization|/virtual/"');
// detect virtual machines
let lines = stdout.toString().split('\n');
if (lines.length > 0) {
if (result.model === 'Computer') { result.model = 'Virtual machine'; }
result.virtual = true;
- if (stdout.toString().toLowerCase().indexOf('vmware') && !result.virtualHost) {
+ if (stdout.toString().toLowerCase().indexOf('vmware') >= 0 && !result.virtualHost) {
result.virtualHost = 'VMware';
}
- if (stdout.toString().toLowerCase().indexOf('qemu') && !result.virtualHost) {
+ if (stdout.toString().toLowerCase().indexOf('qemu') >= 0 && !result.virtualHost) {
result.virtualHost = 'QEMU';
}
- if (stdout.toString().toLowerCase().indexOf('xen') && !result.virtualHost) {
+ if (stdout.toString().toLowerCase().indexOf('xen') >= 0 && !result.virtualHost) {
result.virtualHost = 'Xen';
}
- if (stdout.toString().toLowerCase().indexOf('kvm') && !result.virtualHost) {
+ if (stdout.toString().toLowerCase().indexOf('kvm') >= 0 && !result.virtualHost) {
result.virtualHost = 'KVM';
}
}