diff --git a/html/includes/print-vm.inc.php b/html/includes/print-vm.inc.php
index e69730001..f068daf02 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) | ';
@@ -34,4 +38,4 @@ else {
echo ''.sprintf('%.2f', $vm['vmwVmMemSize']).' MB | ';
}
-echo ''.$vm['vmwVmCpus'].' CPU | ';
+echo ''.$vm['vmwVmCpus'].' CPU | ';
\ No newline at end of file
diff --git a/html/pages/device/vm.inc.php b/html/pages/device/vm.inc.php
index 5dee674a5..63b05b914 100644
--- a/html/pages/device/vm.inc.php
+++ b/html/pages/device/vm.inc.php
@@ -1,15 +1,11 @@
| Server Name | Power Status | Operating System | Memory | CPU |
';
-
+echo '| Server Name | Power Status | Operating System | Memory | CPU |
';
$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 '
';
-
-$pagetitle[] = 'Virtual Machines';
+$pagetitle[] = 'Virtual Machines';
\ No newline at end of file