X

Technical articles, news, and insights
for Oracle's Infrastructure Software offerings

Oracle VM 3.4: collect VM statistics by Oracle VM messaging system

Simon Coter
Director of Product Management

Based on a customer request, I've built a very simple solution on how to collect custom information and/or statistics on VMs running on Oracle VM 3.4; the same solution can be used by any 3rd party utility with the target to collect any kind of information from Virtual Machines running on Oracle VM 3.4.

The entire process is based on Oracle VM messaging system, a solution able to grant messages between the Host (Oracle VM dom0), the Oracle VM Manager and the Virtual Machine running on the same architecture; the solution I'm going to propose here is displayed in the picture below:

So, by leveraging a simple batch running within the VM (possibly scheduled by OS scheduler) I can collect a specific information and get the same shared and available by Oracle VM Manager interfaces (WS-API, CLI and BUI).

Requirements to get this setup correctly working:

  • On Linux VMs, install "ovmd" RPM and verify that proper service is running.
  • On Microsoft Windows VMs, install WinPV Drivers for Oracle VM and verify that proper service is running.

In the example below, I'm going to collect the VM Memory available information for a VM running:

Linux Example

FreePhysicalMemory=`cat /proc/meminfo |grep "MemAvailable" |awk '{print $2}’`
ovmd -p FreePhysicalMemory=$FreePhysicalMemory

MS Windows Example

set echo off
set PATH=%PATH%;C:\Program Files (x86)\Oracle Corporation\Oracle VM Windows PV Drivers;
for /f "skip=1" %%v in ('wmic os get freephysicalmemory') do (
  set m=%%v
  goto :done
)
:done

ovmcmd_64.exe sendmessage FreePhysicalMemory %m%

 

Then by the Oracle VM Manager (here an example from CLI) I can get the information shared:

Oracle VM Manager CLI

OVM> getVmReceivedMessages Vm name=win10efi
Command: getVmReceivedMessages Vm name=win10efi
Status: Success
Time: 2018-08-06 16:28:35,252 CEST
Data:
  Key:FreePhysicalMemory  Value:7234412
OVM>

OVM> getVmReceivedMessages Vm name=ol7-rpmbuild
Command: getVmReceivedMessages Vm name=ol7-rpmbuild
Status: Success
Time: 2018-08-06 16:33:13,884 CEST
Data:
  Key:FreePhysicalMemory  Value:1435982
OVM>

and here an other example from Oracle VM Manager BUI:

Here we saw an example related to the memory availability but by leveraging the same method you can collect all the information required.

As usual, feedback and comment are welcome!

Be the first to comment

Comments ( 0 )
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.