$device['device_id'], 'vm_type' => 'vmware', 'vmwVmVMID' => $oid, 'vmwVmDisplayName' => mres($vmwVmDisplayName), 'vmwVmGuestOS' => mres($vmwVmGuestOS), 'vmwVmMemSize' => mres($vmwVmMemSize), 'vmwVmCpus' => mres($vmwVmCpus), 'vmwVmState' => mres($vmwVmState)), 'vminfo'); log_event(mres($vmwVmDisplayName)." ($vmwVmMemSize GB / $vmwVmCpus vCPU) Discovered", $device, 'system', $vmid); echo '+'; // FIXME eventlog } else { echo '.'; } // FIXME update code! /* * Save the discovered Virtual Machine. */ $vmw_vmlist[] = $oid; }//end foreach }//end if /* * Get a list of all the known Virtual Machines for this host. */ $sql = "SELECT id, vmwVmVMID, vmwVmDisplayName FROM vminfo WHERE device_id = '".$device['device_id']."' AND vm_type='vmware'"; foreach (dbFetchRows($sql) as $db_vm) { /* * Delete the Virtual Machines that are removed from the host. */ if (!in_array($db_vm['vmwVmVMID'], $vmw_vmlist)) { dbDelete('vminfo', '`id` = ?', array($db_vm['id'])); log_event(mres($db_vm['vmwVmDisplayName']).' Removed', $device, 'system', $db_vm['vmwVmVMID']); echo '-'; // FIXME eventlog } } /* * Finished discovering VMware information. */ echo "\n"; }//end if