VMWare and Xen Management with BixData - Page 2

Want to support HowtoForge? Become a subscriber!
 
Submitted by Jed (Contact Author) (Forums) on Wed, 2006-11-01 15:28. ::

VM Reports

In addition to getting real-time information on the VMs in the virtualization view I can also create reports that are automatically generated at some interval and published to my web page. I'll just go to the Reporting view in BixDesktop then I'll make a simple Unix Load report on the machines I tagged earlier. Just click the + button to add a line and put in the following information.


New Report Created

After a few minutes I can see my graphs:


Example Graphs

VM Actions

BixServer can also make actions happen in response to the state of VM Hosts/Guests. You do this in the Notifications view of BixDesktop.

Here I'll have the Agents shut themselves down if their CPU usage goes above 50%. First I'll make a service check. I'll choose Remote Agent CPU to watch a BixAgent's CPU usage.


Creating a new Service Check

We need to check our VMTest tagged hosts. The rest of the default values are fine.


Select what machines to check

Now we make an action that happens if this service check fails. I'll make a shutdown action so if any of these VM guests go over 50% CPU, they'll shut themselves down.

Creating a new Action

Now I just make a notification to tie the service check to the desired action. A service check can be up or down. In our example if CPU goes above 50% the service check is down. When the service check goes down it will go from the “While Up” state into the “Up->Down” transition and finally into the “While Down” state. Since I just want the machines to turn themselves off when it goes above 50% I'll just put the Shut Down Computer action in the “Up->Down” transition. I could put it in the “While Down” state with some timers, this would let me set it up so I could have it only shutdown if CPU went over 50% for 10 minutes or something, but I'm keeping this example simple.

 


Creating a Notification

And that's it. Now I can easily check up on my VMs and I can set things up so they can take care of themselves. You can download and get more information at: www.bixdata.com

Notes

In general having the date and time on all your machines set correctly is important. Especially with VMWare some VMs system clock can be out of date. On Linux the most used commands to correct date and time are rdate and ntpdate

rdate -s time.nist.gov
ntpdate ntp.ubuntu.com

Xen

On Ubuntu and some distros you have to run the command:

mkdir /var/run/xenstored

before starting xend because some distros automatically delete items in /var/run. If you see an error like “Device could not be connected. Backend device not found" run the command:

modprobe loop

If you see an error like “Unable to open hypervisor connection”: Edit your /etc/xen/xend-config.sxp and make sure it says:

(xend-http-server yes)

then restart xend with:

xend restart

BixServer

If you have problems with libstdc++ go to http://www.bixdata.com/node/56 for details on how to update your libraries.


Please do not use the comment function to ask for help! If you need help, please use our forum.
Comments will be published after administrator approval.