Uptime - VM Test
In most virtualized environments, it is essential to monitor the uptime of VMs hosting critical server applications in the infrastructure. By tracking the uptime of each of the VMs, administrators can determine what percentage of time a VM has been up. Comparing this value with service level targets, administrators can determine the most trouble-prone areas of the virtualized infrastructure.
In some environments, administrators may schedule periodic reboots of their VM. By knowing that a specific VM has been up for an unusually long time, an administrator may come to know that the scheduled reboot task is not working on a VM.
This test included in the eG agent monitors the uptime of each VM on a XenServer host.
Target of the test : A XenServer host
Agent deploying the test : An internal/remote agent
Outputs of the test : One set of results for every guest on a Citrix XenServer
Configurable parameters for the test
|
Measurements made by the test
Measurement | Description | Measurement Unit | Interpretation |
---|---|---|---|
Has the VM been rebooted?: |
Indicates whether the VM has been rebooted during the last measurement period or not.
|
Boolean |
If this measure shows 1, it means that the guest was rebooted during the last measurement period. By checking the time periods when this metric changes from 0 to 1, an administrator can determine the times when this guest was rebooted. |
Uptime of VM during the last measure period: |
Indicates the time period that the VM has been up since the last time this test ran. |
Secs |
If the guest has not been rebooted during the last measurement period and the agent has been running continuously, this value will be equal to the measurement period. If the guest was rebooted during the last measurement period, this value will be less than the measurement period of the test. For example, if the measurement period is 300 secs, and if the guest was rebooted 120 secs back, this metric will report a value of 120 seconds. The accuracy of this metric is dependent on the measurement period - the smaller the measurement period, greater the accuracy. |
Total uptime of the VM: |
Indicates the total time that the VM has been up since its last reboot. |
Mins |
Administrators may wish to be alerted if a guest has been running without a reboot for a very long period. Setting a threshold for this metric allows administrators to determine such conditions. |
Note:
- If a value less than a minute is configured as the test period of the Uptime - VM test, then, the Uptime during the last measure period measure will report the value 0 for Unix VMs (only) until the minute boundary is crossed. For instance, if you configure the Uptime - VM test to run every 10 seconds, then, for the first 5 test execution cyles (i.e., 10 x 5 = 50 seconds), the Uptime during the last measure period measure will report the value 0 for Unix VMs; however, the sixth time the test executes (i.e, when test execution touches the 1 minute boundary), this measure will report the value 60 seconds for the same VMs. Thereafter, every sixth measurement period will report 60 seconds as the uptime of the Unix VMs. This is because, Unix-based operating systems report uptime only in minutes and not in seconds.
-
For VMs running Windows 8 (or above), the Uptime - VM test may sometimes report incorrect values. This is because of the 'Fast Startup' feature, which is enabled by default for Windows 8 (and above) operating systems. This feature ensures that the Windows operating system is NOT SHUTDOWN COMPLETELY, when the VM is shutdown. Instead, the operating system saves the image of the Windows kernel and loaded drivers to the file, C:\hiberfil.sys, upon shutdown. When the Windows VM is later started, the operating system simply loads hiberfil.sys into memory to resume operations, instead of performing a clean start. Because of this, the Windows system will not record this event as an actual 'reboot'. As a result, the Uptime - VM test will not be able to correctly report if any reboot happened recently ; neither will it be able to accurately compute the time since the last reboot.
To avoid this, you need to disable the Fast Startup feature on VMs running Windows 8 (and above). The steps to achieve this are outlined below:
- Login to the target Windows VM.
-
Edit the Windows Registry. Look for the following registry entry:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Power
- Locate the HiberbootEnabled key under the entry mentioned above.
-
Change the value of this key to 0 to turn off Fast Startup. By default, its value will be 1, as Fast Startup is enabled by default.
Also, note that the Fast Startup feature does not work if the VM is “restarted”; it works only when the VM is shutdown and then started.