OpenNebula information drivers

The OpenNebula controller node does periodic polling of the configured VM hosts.
If your OpenNebula controller can't connect to a system you'll see output like this:

oneadmin@one-controller:~$ onehost list
ID NAME               RVM   TCPU   FCPU   ACPU   TMEM   FMEM   AMEM   STAT
4 egal                 0    600    548    600   7.8G   5.8G   7.8G     on
5 waxh0015             0      0      0    100     0K     0K     0K    err

that is to be monitored you'll see the following errors in your /var/log/one/oned.log

Mon Oct 31 22:43:33 2011 [InM][I]: Monitoring host waxh0015 (5)
Mon Oct 31 22:43:33 2011 [InM][E]: Could not find information driver im_xen

The information drivers are transport mechanisms that are set in your ONE config file at /etc/one/oned.conf. While at it, you can also reduce the polling interval, that is 600 seconds per default. OpenNebula only transfers very little data anyway!

You have to enable all that you want to configure in your onehost create command. 

Afterwards you must restart your ONE daemons.

/etc/init.d/opennebula stop
/etc/init.d/opennebula start

If you also run into the following error, that is a quite funny one:
I was not booting into Xen by default...

Mon Oct 31 22:54:05 2011 [InM][I]: Command execution fail: 'if [ -x "/var/tmp/one/im/run_probes" ]; then /var/tmp/one/im/run_probes xen 5 waxh0015; else                              exit 42; fi'
Mon Oct 31 22:54:05 2011 [InM][I]: WARNING!  Can't find hypervisor information in sysfs!
Mon Oct 31 22:54:05 2011 [InM][I]: xc: error: Could not obtain handle on privileged command interface (2 = No such file or directory): Internal error
Mon Oct 31 22:54:05 2011 [InM][I]: xc_interface_open: No such file or directory
Mon Oct 31 22:54:05 2011 [InM][I]: Failed to initialize xenstat library
Mon Oct 31 22:54:05 2011 [InM][E]: Error executing xen.rb
Mon Oct 31 22:54:05 2011 [InM][I]: ExitCode: 255
Mon Oct 31 22:54:05 2011 [InM][E]: Error monitoring host 5 : MONITOR FAILURE 5 Error executing xen.rb

Mon Oct 31 22:54:08 2011 [InM][I]: ExitCode: 0
Mon Oct 31 22:54:08 2011 [InM][D]: Host 4 successfully monitored.

After rebooting into Xen and waiting one polling interval you should see OpenNebula has updated the performance info:

oneadmin@one-controller:~$ onehost list
  ID NAME               RVM   TCPU   FCPU   ACPU   TMEM   FMEM   AMEM   STAT
   4 egal                 0    600    557    600   7.8G   5.8G   7.8G     on
   5 waxh0015             0   2400   2399   2400    96G   636M    96G     on

Other bugs:

libvirt / KVM socket permissions

OpenNebula oneadmin user needs to be in libvirt-bin group on your Ubuntu KVM boxes, otherwise there will be permission denied error on accessing the libvirt socket.

%cloud    ALL=(ALL) NOPASSWD: /usr/sbin/xm *
%cloud    ALL=(ALL) NOPASSWD: /usr/sbin/xentop *

Sudoers entries

On Debian, the oneadmin user has a incorrect sudoers entry and he's not in the right group in /etc.

cloud:x:109:oneadmin

Of course, there is a Debian bug for this. Of course, it's still not ok. I love the Debian way.