Discussion:
[libvirt-users] libvirt-snmp on Ubuntu
george john
2013-05-01 14:59:34 UTC
Permalink
Hi,
Are there packages of "libvirt-snmp" for Ubuntu? Or instructions to compile libvirt-snmp on Ubuntu?
Looks like the instructions given at http://wiki.libvirt.org/page/Libvirt-snmp are for RedHat.

Thank you,
George
Michal Privoznik
2013-05-02 07:52:21 UTC
Permalink
Post by george john
Hi,
Are there packages of "libvirt-snmp" for Ubuntu? Or instructions to compile libvirt-snmp on Ubuntu?
Looks like the instructions given at http://wiki.libvirt.org/page/Libvirt-snmp are for RedHat.
Thank you,
George
You can use:

./autobuild && sudo make install

The autobuild script runs rpmbuild iff the /usr/bin/rpmbuild binary
exists. Unfortunately, I am not that familiar with Ubuntu to make .deb
package.

Michal
george john
2013-05-02 15:45:49 UTC
Permalink
Thank you Michal. I verified the binary rpmbuild exists at /usr/bin/rpmbuild and ran autobuild but it failed with these errors:
***@machine:/tmp/libvirt-snmp-0.0.3# ./autobuild.sh

test -n "$1" && RESULTS=$1 || RESULTS=results.log
: ${AUTOBUILD_INSTALL_ROOT=$HOME/builder}

# Make things clean.
test -f Makefile && make -k distclean || :

rm -rf build
mkdir build
cd build

MIBDIR=$AUTOBUILD_INSTALL_ROOT/share/snmp/mibs
mkdir -p $MIBDIR

../autogen.sh --prefix=$AUTOBUILD_INSTALL_ROOT \
--with-mibdir=$MIBDIR
Can't exec "libtoolize": No such file or directory at /usr/bin/autoreconf line 196.
Use of uninitialized value in pattern match (m//) at /usr/bin/autoreconf line 196.
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking whether gcc and cc understand -c and -o together... yes
checking for memset... yes
checking for strdup... yes
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for stdlib.h... (cached) yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible malloc... yes
checking for size_t... yes
checking for an ANSI C-conforming const... yes
checking return type of signal handlers... void
../configure: line 4433: syntax error near unexpected token `LIBVIRT,'
../configure: line 4433: `PKG_CHECK_MODULES(LIBVIRT, libvirt >= $LIBVIRT_REQUIRED)'
***@nv-kvm02:/tmp/libvirt-snmp-0.0.3#

Thanks.
Subject: Re: [libvirt-users] libvirt-snmp on Ubuntu
Date: Thursday, May 2, 2013, 12:52 AM
On 01.05.2013 16:59, george john
Post by george john
Hi,
Are there packages of "libvirt-snmp" for Ubuntu? Or
instructions to compile libvirt-snmp on Ubuntu?
Post by george john
Looks like the instructions given at http://wiki.libvirt.org/page/Libvirt-snmp
are for RedHat.
Post by george john
Thank you,
George
./autobuild && sudo make install
The autobuild script runs rpmbuild iff the /usr/bin/rpmbuild
binary
exists. Unfortunately, I am not that familiar with Ubuntu to
make .deb
package.
Michal
Eric Blake
2013-05-02 16:00:12 UTC
Permalink
Post by george john
../autogen.sh --prefix=$AUTOBUILD_INSTALL_ROOT \
--with-mibdir=$MIBDIR
Can't exec "libtoolize": No such file or directory at /usr/bin/autoreconf line 196.
Use of uninitialized value in pattern match (m//) at /usr/bin/autoreconf line 196.
Do you have libtool properly installed?
Post by george john
checking return type of signal handlers... void
../configure: line 4433: syntax error near unexpected token `LIBVIRT,'
../configure: line 4433: `PKG_CHECK_MODULES(LIBVIRT, libvirt >= $LIBVIRT_REQUIRED)'
Are you sure you have pkg-config properly installed?
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
george john
2013-05-07 18:33:48 UTC
Permalink
Thank you.
I was able to compile/install libvirt-snmp on Ubuntu by mainly following the instructions on:
http://lost-and-found-narihiro.blogspot.com/2013/01/how-to-install-libvirt-snmp-on-ubuntu.html

When I check the data returned by snmpwalk, I find that values for the UUID of the Virtual Guest, libvirtGuestUUID(1.3.6.1.4.1.12345.1.1.1.1) are not getting populated. This is a key piece of information. Does anyone know why this is not being populated?

Also I noticed that the value returned by libvirtGuestMemoryCurrent (current memory usage by VirtualGuest) is not the correct value. The value returned by this is same as libvirtGuestMemoryLimit (The maximum amount of memory (in MiB) that can be used by the virtual guest.).

Thanks.
Subject: Re: [libvirt-users] libvirt-snmp on Ubuntu
Date: Thursday, May 2, 2013, 9:00 AM
On 05/02/2013 09:45 AM, george john
Post by george john
Thank you Michal. I verified the binary rpmbuild exists
at  /usr/bin/rpmbuild and ran autobuild but it failed
Post by george john
../autogen.sh --prefix=$AUTOBUILD_INSTALL_ROOT \
   --with-mibdir=$MIBDIR
Can't exec "libtoolize": No such file or directory at
/usr/bin/autoreconf line 196.
Post by george john
Use of uninitialized value in pattern match (m//) at
/usr/bin/autoreconf line 196.
Do you have libtool properly installed?
Post by george john
checking return type of signal handlers... void
../configure: line 4433: syntax error near unexpected
token `LIBVIRT,'
Post by george john
../configure: line 4433: `PKG_CHECK_MODULES(LIBVIRT,
libvirt >= $LIBVIRT_REQUIRED)'
Are you sure you have pkg-config properly installed?
--
Eric Blake   eblake redhat com   
+1-919-301-3266
Libvirt virtualization library http://libvirt.org
Loading...