Skip to content

Commit

Permalink
Properly detect running as a Parallels guest
Browse files Browse the repository at this point in the history
  • Loading branch information
jrgp committed Jul 2, 2021
1 parent ee17104 commit 64deb1a
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/Linfo/OS/Linux.php
Original file line number Diff line number Diff line change
Expand Up @@ -1604,12 +1604,19 @@ public function getVirtualization()
return array('type' => 'guest', 'method' => 'OpenVZ');
}

$bios_vendor = Common::getContents('/sys/devices/virtual/dmi/id/bios_vendor');

// Veertu guest?
if (Common::getContents('/sys/devices/virtual/dmi/id/bios_vendor') == 'Veertu') {
if ($bios_vendor == 'Veertu') {
return array('type' => 'guest', 'method' => 'Veertu');
}

// LXC guest?
// Parallels guest?
if (strpos($bios_vendor, 'Parallels') === 0) {
return array('type' => 'guest', 'method' => 'Parallels');
}

// LXC guest?
if (strpos(Common::getContents('/proc/mounts'), 'lxcfs /proc/') !== false) {
return array('type' => 'guest', 'method' => 'LXC');
}
Expand Down

0 comments on commit 64deb1a

Please sign in to comment.