[libvirt] make check fails on CentOS 5
by Daniel Berteaud
Hi.
I'm using libvirt on a CentOS 5.4 x86_64 host without issue, until
libvirt 0.8.1.
I usually just rebuild the available src rpm with the following args:
--without xen --without xen-proxy \
--without lxc --without vbox --without esx \
--without phyp --without one --without avahi \
--without openvz --without uml
(I only use KVM)
But, with libvirt 0.8.1, the buiild process now include make check, and one of the check fails: interfaceschematest
Attached is the full build log, you can see the failure line 1841.
I really don't know how to debug this.
For now, I've just added interfaceschematest to the list of check to skip in the spec file
(for i in nodeinfotest daemon-conf seclabeltest interfaceschematest).
With this modification, everything works, and I'm actually using it this way.
Anybody knows why this test fails ?
Regards, Daniel
--
Daniel Berteaud
FIREWALL-SERVICES SARL.
Société de Services en Logiciels Libres
Technopôle Montesquieu
33650 MARTILLAC
Tel : 05 56 64 15 32
Fax : 05 56 64 15 32
Mail: daniel(a)firewall-services.com
Web : http://www.firewall-services.com
14 years, 4 months
[libvirt] Ask for help about libvirt error: can't get physical interface data for kvm.
by Feng Dan Liu
Hi
I find this mail address from the internet and hope I can get the reply
from anyone of you, that will be very appreciated.
I'm using virsh to manage the KVM(qemu-kvm 0.12.4, libvirt 0.8.1), but I
encounter an error as below:
I saw both libvirt api and virsh commands support to get the physical
interfaces data, but it always fail when I using them for KVM hypervisor.
I was thought that it was due to the old version of libvirt/KVM
hypervisor, but the error still exist when using the latest libvirt and
kvm hypervisor.
So I wonder if the following functions of libvirt haven't been implemented
for KVM, could you pls help me get the answer about this? Thanks in
advance!
virConnectListInterfaces
virConnectNumOfDefinedInterfaces
virConnectNumOfInterfaces
virConnectListDefinedInterfaces
virInterfaceLookupByName
Best Regards,
Fengdan Liu
Tivoli ITCAM Solution, IBM China Software Development Lab,
Tel: 13811762746
Email: liufengd(a)cn.ibm.com
3/F, Haohai Bldg., No.7, 5th Street, Shangdi,
Haidian District, Beijing 100085, P.R.China
14 years, 4 months
[libvirt] Maintenance of ruby bindings
by Neil Wilson
Hi,
Is there anybody looking after the Ruby bindings? Are you still taking
patches? It seems quite out of date wrt. the current interface.
Rgs
Neil Wilson
14 years, 4 months
[libvirt] Update on PHP libvirt
by Radek Hladik
I would like to post some update about PHP bindings for libvirt I
started last year. As usual I do not have enough time to work on it
however the last version 0.3 seems to be quite stable. I did get some
reports from people using it and it seems that the code is working
without problems. I will probably change the status from alpha to beta.
The code (available at http://phplibvirt.cybersales.cz/ ) implements
basic Libvirt functions for readonly access and machine live-cycle
management. I should be able to add any other libvirt function but i do
not know all the libvirt functions so well. So if you miss some function
and you are willing to test it I can implement it.
I would appreciate any feedback and suggestions on this code.
Radek
14 years, 4 months
[libvirt] [PATCH] cgroup: Fix compilation broken on MinGW due to dirent->d_type
by Ryota Ozaki
As pointed out by Eric Blake, using dirent->d_type breaks
compilation on MinGW. This patch addresses this by using
'#if defined' as same as doing for virCgroupForDriver.
---
src/util/cgroup.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/src/util/cgroup.c b/src/util/cgroup.c
index 9fa64dc..024036a 100644
--- a/src/util/cgroup.c
+++ b/src/util/cgroup.c
@@ -608,6 +608,7 @@ cleanup:
}
#endif
+#if defined _DIRENT_HAVE_D_TYPE
static int virCgroupRemoveRecursively(char *grppath)
{
DIR *grpdir;
@@ -656,6 +657,13 @@ static int virCgroupRemoveRecursively(char *grppath)
return rc;
}
+#else
+static int virCgroupRemoveRecursively(char *grppath ATTRIBUTE_UNUSED)
+{
+ /* Claim no support */
+ return -ENXIO;
+}
+#endif
/**
* virCgroupRemove:
--
1.6.5.2
14 years, 4 months
[libvirt] [PATCH] virsh: tweak help output for VSH_OT_DATA
by Eric Blake
https://bugzilla.redhat.com/show_bug.cgi?id=609044 complained
that 'virsh help pool-create-as' didn't document the shortcut
that you can do 'virsh pool-create-as $name $type --target $target'
rather than having to supply the four optional source- arguments
in order to fill out the necessary positional arguments.
This one-liner changes the help output to hopefully make this more obvious:
NAME
pool-create-as - create a pool from a set of args
SYNOPSIS
pool-create-as <name> [--print-xml] <type> [<source-host>] [<source-path>] [<source-dev>] [<source-name>] [<target>] [--source-format <string>]
DESCRIPTION
Create a pool.
OPTIONS
[--name] <string> name of the pool
--print-xml print XML document, but don't define/create
[--type] <string> type of the pool
[--source-host] <string> source-host for underlying storage
[--source-path] <string> source path for underlying storage
[--source-dev] <string> source device for underlying storage
[--source-name] <string> source name for underlying storage
[--target] <string> target for underlying storage
--source-format <string> format for underlying storage
* tools/virsh.c (vshCmddefHelp): Make it more obvious that data
arguments may, but not must, be specified by option leaders.
---
Wow - the commit message is 30 times bigger than the commit itself!
If additionally wanted, I could make the help output wrap if the
left column is long, so that the right column lines up, looking more like:
OPTIONS
[--name] <string> name of the pool
--print-xml print XML document, but don't define/create
[--type] <string> type of the pool
[--source-host] <string>
source-host for underlying storage
[--source-path] <string>
source path for underlying storage
[--source-dev] <string>
source device for underlying storage
[--source-name] <string>
source name for underlying storage
[--target] <string> target for underlying storage
--source-format <string>
format for underlying storage
tools/virsh.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/tools/virsh.c b/tools/virsh.c
index f1bb295..cdac9c0 100644
--- a/tools/virsh.c
+++ b/tools/virsh.c
@@ -9558,7 +9558,7 @@ vshCmddefHelp(vshControl *ctl, const char *cmdname)
else if (opt->type == VSH_OT_STRING)
snprintf(buf, sizeof(buf), _("--%s <string>"), opt->name);
else if (opt->type == VSH_OT_DATA)
- snprintf(buf, sizeof(buf), "<%s>", opt->name);
+ snprintf(buf, sizeof(buf), "[--%s] <string>", opt->name);
fprintf(stdout, " %-15s %s\n", buf, _(opt->help));
}
--
1.7.0.1
14 years, 5 months
[libvirt] [PATCH] Avoid invoking the qemu monitor destroy callback if the constructor fails
by Daniel P. Berrange
Some, but not all, codepaths in the qemuMonitorOpen() method
would trigger the destroy callback. The caller does not expect
this to be invoked if construction fails, only during normal
release of the monitor. This resulted in a possible double-unref
of the virDomainObjPtr, because the caller explicitly unrefs
the virDomainObjPtr if qemuMonitorOpen() fails
* src/qemu/qemu_monitor.c: Don't invoke destroy callback from
qemuMonitorOpen() failure paths
---
src/qemu/qemu_monitor.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c
index f428665..ff613a0 100644
--- a/src/qemu/qemu_monitor.c
+++ b/src/qemu/qemu_monitor.c
@@ -671,6 +671,12 @@ qemuMonitorOpen(virDomainObjPtr vm,
return mon;
cleanup:
+ /* We don't want the 'destroy' callback invoked during
+ * cleanup from construction failure, because that can
+ * give a double-unref on virDomainObjPtr in the caller,
+ * so kill the callbacks now.
+ */
+ mon->cb = NULL;
qemuMonitorUnlock(mon);
qemuMonitorClose(mon);
return NULL;
--
1.6.6.1
14 years, 5 months
[libvirt] [PATCH] cgroup: Add missing errno == ENOENT check in virCgroupRemoveRecursively
by Ryota Ozaki
ENOENT happens normally when a subsystem is enabled with any other
subsystems and the directory of the target group has already removed
in a prior loop. In that case, the function should just return without
leaving an error message.
NB this is the same behavior as before introducing virCgroupRemoveRecursively.
---
src/util/cgroup.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/src/util/cgroup.c b/src/util/cgroup.c
index 62b1446..9fa64dc 100644
--- a/src/util/cgroup.c
+++ b/src/util/cgroup.c
@@ -616,6 +616,8 @@ static int virCgroupRemoveRecursively(char *grppath)
grpdir = opendir(grppath);
if (grpdir == NULL) {
+ if (errno == ENOENT)
+ return 0;
VIR_ERROR(_("Unable to open %s (%d)"), grppath, errno);
rc = -errno;
return rc;
--
1.6.5.2
14 years, 5 months
[libvirt] [PATCH] vbox: Let configure detect/set the XPCOMC directory
by Matthias Bolte
This allows the user to give an explicit path to configure
./configure --with-vbox=/path/to/virtualbox
instead of having the VirtualBox driver probe a set of possible
paths at runtime. If no explicit path is specified then configure
probes the set of "known" paths.
https://bugzilla.redhat.com/show_bug.cgi?id=609185
---
configure.ac | 73 +++++++++++++++++++++++++++++++++++++++++++-
src/Makefile.am | 1 +
src/vbox/vbox_XPCOMCGlue.c | 22 ++-----------
3 files changed, 76 insertions(+), 20 deletions(-)
diff --git a/configure.ac b/configure.ac
index 691ef69..a1ba2f3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -232,7 +232,7 @@ AC_ARG_WITH([phyp],
AC_ARG_WITH([xenapi],
AC_HELP_STRING([--with-xenapi], [add XenAPI support @<:@default=check@:>@]),[],[with_xenapi=check])
AC_ARG_WITH([vbox],
- AC_HELP_STRING([--with-vbox], [add VirtualBox support @<:@default=yes@:>@]),[],[with_vbox=yes])
+ AC_HELP_STRING([--with-vbox=@<:@PFX@:>@], [VirtualBox XPCOMC location @<:@default=check@:>@]),[],[with_vbox=check])
AC_ARG_WITH([lxc],
AC_HELP_STRING([--with-lxc], [add Linux Container support @<:@default=check@:>@]),[],[with_lxc=check])
AC_ARG_WITH([one],
@@ -315,6 +315,77 @@ if test "$with_openvz" = "yes"; then
fi
AM_CONDITIONAL([WITH_OPENVZ], [test "$with_openvz" = "yes"])
+
+dnl
+dnl check for VirtualBox XPCOMC location
+dnl
+
+vbox_xpcomc_dir=
+
+if test "x$with_vbox" = "xyes" || test "x$with_vbox" = "xcheck"; then
+ AC_MSG_CHECKING([for VirtualBox XPCOMC location])
+
+ if test -f /usr/lib/virtualbox/VBoxXPCOMC.so; then
+ vbox_xpcomc_dir=/usr/lib/virtualbox
+ else
+ if test -f /usr/lib/VirtualBox/VBoxXPCOMC.so; then
+ vbox_xpcomc_dir=/usr/lib/VirtualBox
+ else
+ if test -f /opt/virtualbox/VBoxXPCOMC.so; then
+ vbox_xpcomc_dir=/opt/virtualbox
+ else
+ if test -f /opt/virtualbox/VBoxXPCOMC.so; then
+ vbox_xpcomc_dir=/opt/virtualbox
+ else
+ if test -f /opt/VirtualBox/i386/VBoxXPCOMC.so; then
+ vbox_xpcomc_dir=/opt/VirtualBox/i386
+ else
+ if test -f /opt/VirtualBox/amd64/VBoxXPCOMC.so; then
+ vbox_xpcomc_dir=/opt/VirtualBox/amd64
+ else
+ if test -f /usr/local/lib/virtualbox/VBoxXPCOMC.so; then
+ vbox_xpcomc_dir=/usr/local/lib/virtualbox
+ else
+ if test -f /usr/lib/local/VirtualBox/VBoxXPCOMC.so; then
+ vbox_xpcomc_dir=/usr/lib/local/VirtualBox
+ else
+ if test -f /Application/VirtualBox.app/Contents/MacOS/VBoxXPCOMC.dylib; then
+ vbox_xpcomc_dir=/Application/VirtualBox.app/Contents/MacOS
+ fi
+ fi
+ fi
+ fi
+ fi
+ fi
+ fi
+ fi
+ fi
+
+ if test -n "$vbox_xpcomc_dir"; then
+ AC_MSG_RESULT([$vbox_xpcomc_dir])
+ with_vbox=yes
+ else
+ if test "x$with_vbox" = "xcheck"; then
+ AC_MSG_RESULT([not found, disabling VirtualBox driver])
+ with_vbox=no
+ else
+ AC_MSG_RESULT([not found])
+ AC_MSG_ERROR([VirtualBox XPCOMC is required for the VirtualBox driver])
+ fi
+ fi
+else
+ if test "x$with_vbox" != "xno"; then
+ if test -f ${with_vbox}/VBoxXPCOMC.so || test -f ${with_vbox}/VBoxXPCOMC.dylib; then
+ vbox_xpcomc_dir=$with_vbox
+ with_vbox=yes
+ else
+ AC_MSG_ERROR([$with_vbox does not contain VirtualBox XPCOMC])
+ fi
+ fi
+fi
+
+AC_SUBST([vbox_xpcomc_dir])
+
if test "x$with_vbox" = "xyes"; then
AC_SEARCH_LIBS([dlopen], [dl], [], [AC_MSG_ERROR([Unable to find dlopen()])])
case $ac_cv_search_dlopen in
diff --git a/src/Makefile.am b/src/Makefile.am
index ece18a6..d3c7087 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -19,6 +19,7 @@ INCLUDES = \
-DPKGDATADIR=\""$(pkgdatadir)"\" \
-DLOCAL_STATE_DIR=\""$(localstatedir)"\" \
-DGETTEXT_PACKAGE=\"$(PACKAGE)\" \
+ -DVBOX_XPCOMC_DIR=\"$(vbox_xpcomc_dir)\" \
$(WARN_CFLAGS) \
$(LOCK_CHECKING_CFLAGS) \
-DIN_LIBVIRT \
diff --git a/src/vbox/vbox_XPCOMCGlue.c b/src/vbox/vbox_XPCOMCGlue.c
index 0987c1b..fcae0cb 100644
--- a/src/vbox/vbox_XPCOMCGlue.c
+++ b/src/vbox/vbox_XPCOMCGlue.c
@@ -192,28 +192,12 @@ int VBoxCGlueInit(void)
return tryLoadOne(pszHome, 0);
/*
- * Try the known standard locations.
+ * Try the configured location.
*/
g_szVBoxErrMsg[0] = '\0';
-#if defined(__gnu__linux__) || defined(__linux__)
- if (tryLoadOne("/opt/VirtualBox", 1) == 0)
- return 0;
- if (tryLoadOne("/usr/lib/virtualbox", 1) == 0)
- return 0;
-#elif defined(__sun__)
- if (tryLoadOne("/opt/VirtualBox/amd64", 1) == 0)
- return 0;
- if (tryLoadOne("/opt/VirtualBox/i386", 1) == 0)
- return 0;
-#elif defined(__APPLE__)
- if (tryLoadOne("/Application/VirtualBox.app/Contents/MacOS", 1) == 0)
- return 0;
-#elif defined(__FreeBSD__)
- if (tryLoadOne("/usr/local/lib/virtualbox", 1) == 0)
+
+ if (tryLoadOne(VBOX_XPCOMC_DIR, 1) == 0)
return 0;
-#else
-# error "port me"
-#endif
/*
* Finally try the dynamic linker search path.
--
1.7.0.4
14 years, 5 months