diff --git a/html/includes/print-vm.inc.php b/html/includes/print-vm.inc.php index e69730001..91b04b495 100644 --- a/html/includes/print-vm.inc.php +++ b/html/includes/print-vm.inc.php @@ -1,7 +1,5 @@ '; - echo ''; if (getidbyname($vm['vmwVmDisplayName'])) { @@ -12,7 +10,13 @@ else { } echo ''; -echo ''.$vm['vmwVmState'].''; + +if ($vm['vmwVmState'] == 'powered off') { + echo 'OFF'; +} +else { + echo 'ON'; +} if ($vm['vmwVmGuestOS'] == 'E: tools not installed') { echo 'Unknown (VMware Tools not installed)'; diff --git a/html/pages/device/vm.inc.php b/html/pages/device/vm.inc.php index 5dee674a5..699fb92f3 100644 --- a/html/pages/device/vm.inc.php +++ b/html/pages/device/vm.inc.php @@ -1,15 +1,11 @@ Server NamePower StatusOperating SystemMemoryCPU'; - +echo ''; $i = '1'; -foreach (dbFetchRows('SELECT * FROM vminfo WHERE device_id = ? ORDER BY vmwVmDisplayName', array($device['device_id'])) as $vm) { +foreach (dbFetchRows('SELECT `vmwVmDisplayName`,`vmwVmState`,`vmwVmGuestOS`,`vmwVmMemSize`,`vmwVmCpus` FROM `vminfo` WHERE `device_id` = ? ORDER BY `vmwVmDisplayName`', array($device['device_id'])) as $vm) { include 'includes/print-vm.inc.php'; - $i++; } echo '
Server NamePower StatusOperating SystemMemoryCPU
'; - $pagetitle[] = 'Virtual Machines';