$info .= 'maximum ' . $ci['hypervisor_maxvcpus'] . ' vcpus per guest, '; } if (strlen($info) > 2) { $info[strlen($info) - 2] = ' '; } echo "<h2>Host information</h2>\n\t\t\t <table>\n\t\t\t\t<tr>\n\t\t\t\t\t<td>Hypervisor: </td>\n\t\t\t\t\t<td>{$ci['hypervisor_string']}</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td>Connection information: </td>\n\t\t\t\t\t<td>{$info}</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td>Architecture: </td>\n\t\t\t\t\t<td>{$tmp['model']}</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td>Total memory installed: </td>\n\t\t\t\t\t<td>" . number_format($tmp['memory'] / 1048576, 2, '.', ' ') . "GB </td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td>Total processor count: </td>\n\t\t\t\t\t<td>{$tmp['cpus']}</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td>Processor speed: </td>\n\t\t\t\t\t<td>{$tmp['mhz']} MHz</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td>Processor nodes: </td>\n\t\t\t\t\t<td>{$tmp['nodes']}</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td>Processor sockets: </td>\n\t\t\t\t\t<td>{$tmp['sockets']}</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td>Processor cores: </td>\n\t\t\t\t\t<td>{$tmp['cores']}</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td>Processor threads: </td>\n\t\t\t\t\t<td>{$tmp['threads']}</td>\n\t\t\t\t</tr>\n\t\t\t </table>\n\t\t\t"; unset($tmp); } else { if ($action == 'domain-information') { $subaction = array_key_exists('subaction', $_GET) ? $_GET['subaction'] : false; $ret = false; $die = false; $domName = $lv->domain_get_name_by_uuid($_GET['uuid']); if ($subaction == 'disk-remove') { if (array_key_exists('confirm', $_GET) && $_GET['confirm'] == 'yes') { $ret = $lv->domain_disk_remove($domName, $_GET['dev']) ? 'Disk has been removed successfully' : 'Cannot remove disk: ' . $lv->get_last_error(); } else { $ret = '<table> <tr> <td colspan="2"> <b>Do you really want to delete disk <i>' . $_GET['dev'] . ' from the guest</i> ?</b><br /> </td> </tr> <tr align="center"> <td> <a href="' . $_SERVER['REQUEST_URI'] . '&confirm=yes">Yes, delete it</a> </td> <td> <a href="?action=' . $action . '&uuid=' . $_GET['uuid'] . '">No, go back</a> </td> </tr>';