$device['device_id'], '`vm_type`' => 'vmware', '`vmwVmVMID`' => $oid,'`vmwVmDisplayName`' => mres($vmwVmDisplayName), '`vmwVmGuestOS`' => mres($vmwVmGuestOS), '`vmwVmMemSize`' => mres($vmwVmMemSize), '`vmwVmCpus`' => mres($vmwVmCpus), '`vmwVmState`' => mres($vmwVmState)), 'vminfo'); echo("+"); // FIXME eventlog } else { echo("."); } // FIXME update code! /* * Save the discovered Virtual Machine. */ $vmw_vmlist[] = $oid; } } /* * Get a list of all the known Virtual Machines for this host. */ $sql = "SELECT id, vmwVmVMID 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'])); echo("-"); // FIXME eventlog } } /* * Finished discovering VMware information. */ echo("\n"); } ?>