diff --git a/html/includes/print-vm.inc.php b/html/includes/print-vm.inc.php
index 16720aa46..3ecedd4e0 100644
--- a/html/includes/print-vm.inc.php
+++ b/html/includes/print-vm.inc.php
@@ -23,9 +23,15 @@ if ($vm['vmwVmGuestOS'] == "E: tools not installed")
else if ($vm['vmwVmGuestOS'] == "")
{
echo('
(Unknown) | ');
-} else {
+}
+elseif (isset($config['vmware_guestid'][$vm['vmwVmGuestOS']]))
+{
echo('' . $config['vmware_guestid'][$vm['vmwVmGuestOS']] . " | ");
}
+else
+{
+ echo('' . $vm['vmwVmGuestOS'] . " | ");
+}
if ($vm['vmwVmMemSize'] >= 1024)
{
diff --git a/includes/polling/os/vmware.inc.php b/includes/polling/os/vmware.inc.php
index 4c573dd73..fe2dc43f8 100644
--- a/includes/polling/os/vmware.inc.php
+++ b/includes/polling/os/vmware.inc.php
@@ -59,7 +59,16 @@ foreach ($db_info_list as $db_info)
}
/*
- * Proceess all the VMware Virtual Machine properties.
+ * If VMware Tools is not running then don't overwrite the GuesOS with the error
+ * message, but just leave it as it currently is.
+ */
+ if (stristr($vm_info["vmwVmGuestOS"], 'tools not running') !== FALSE)
+ {
+ $vm_info["vmwVmGuestOS"] = $db_info["vmwVmGuestOS"];
+ }
+
+ /*
+ * Process all the VMware Virtual Machine properties.
*/
foreach ($vm_info as $property => $value)