mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
allow VMWare freeform OS description and survive VM sleep OS switches, patch by Sander Steffann, fixes OBSERVIUM-22
git-svn-id: http://www.observium.org/svn/observer/trunk@3017 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -23,9 +23,15 @@ if ($vm['vmwVmGuestOS'] == "E: tools not installed")
|
|||||||
else if ($vm['vmwVmGuestOS'] == "")
|
else if ($vm['vmwVmGuestOS'] == "")
|
||||||
{
|
{
|
||||||
echo('<td class="box-desc"><i>(Unknown)</i></td>');
|
echo('<td class="box-desc"><i>(Unknown)</i></td>');
|
||||||
} else {
|
}
|
||||||
|
elseif (isset($config['vmware_guestid'][$vm['vmwVmGuestOS']]))
|
||||||
|
{
|
||||||
echo('<td class="list">' . $config['vmware_guestid'][$vm['vmwVmGuestOS']] . "</td>");
|
echo('<td class="list">' . $config['vmware_guestid'][$vm['vmwVmGuestOS']] . "</td>");
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
echo('<td class="list">' . $vm['vmwVmGuestOS'] . "</td>");
|
||||||
|
}
|
||||||
|
|
||||||
if ($vm['vmwVmMemSize'] >= 1024)
|
if ($vm['vmwVmMemSize'] >= 1024)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -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)
|
foreach ($vm_info as $property => $value)
|
||||||
|
|||||||
Reference in New Issue
Block a user