[libvirt] libvirt build failure w/GNU make and automake.git (automake regression?)
by Jim Meyering
When I run ./autogen.sh && make, I see this:
(this arose because I had the latest automake.git/master tools --
commit c1b83e1af60b866cf5cdeebf77d0275019bad8b2 from today --
early in my path)
Generated 3 wrapper functions
CC libvirtmod_la-libvirt-override.lo
CC libvirtmod_la-typewrappers.lo
CC libvirtmod_la-libvirt.lo
CC libvirtmod_qemu_la-libvirt-qemu-override.lo
CC libvirtmod_qemu_la-typewrappers.lo
CC libvirtmod_qemu_la-libvirt-qemu.lo
CCLD libvirtmod_qemu.la
CCLD libvirtmod.la
make[3]: Leaving directory `/h/j/w/co/libvirt/python'
Making all in tests
make[3]: Entering directory `/h/j/w/co/libvirt/python/tests'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/h/j/w/co/libvirt/python/tests'
make[2]: Leaving directory `/h/j/w/co/libvirt/python'
Making all in tests
make[2]: Entering directory `/h/j/w/co/libvirt/tests'
Makefile:4355: *** Malformed target-specific variable definition. Stop.
make[2]: Leaving directory `/h/j/w/co/libvirt/tests'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/h/j/w/co/libvirt'
make: *** [all] Error 2
That is because of this automake-generated rule:
undefine.log: undefine
@p='undefine'; \
b='undefine'; \
$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
The trouble is that "undefine" is an operator in GNU make.
Here's that part of GNU make's documentation:
6.9 Undefining Variables
========================
If you want to clear a variable, setting its value to empty is usually
sufficient. Expanding such a variable will yield the same result (empty
string) regardless of whether it was set or not. However, if you are
using the `flavor' (*note Flavor Function::) and `origin' (*note Origin
Function::) functions, there is a difference between a variable that
was never set and a variable with an empty value. In such situations
you may want to use the `undefine' directive to make a variable appear
as if it was never set. For example:
foo := foo
bar = bar
undefine foo
undefine bar
$(info $(origin foo))
$(info $(flavor bar))
This example will print "undefined" for both variables.
If you want to undefine a command-line variable definition, you can
use the `override' directive together with `undefine', similar to how
this is done for variable definitions:
override undefine CFLAGS
The most pragmatic work-around is to rename the "undefine" test script.
However, Stephano, as automake maintainer, I think you will want to
fix automake not to prohibit the use of such test names.
12 years, 3 months
[libvirt] [libvirt-glib][PATCH v3 1/2] gobject: Introduce gvir_connection_get_hypervisor_name
by Michal Privoznik
which is basically a wrapper for virConnectGetType().
---
The list is sad as it hasn't delivered previous version.
examples/conn-test.c | 12 +++++++
libvirt-gobject/libvirt-gobject-connection.c | 45 ++++++++++++++++++++++++++
libvirt-gobject/libvirt-gobject-connection.h | 3 ++
libvirt-gobject/libvirt-gobject.sym | 5 +++
4 files changed, 65 insertions(+), 0 deletions(-)
diff --git a/examples/conn-test.c b/examples/conn-test.c
index 8c70997..b90d2b0 100644
--- a/examples/conn-test.c
+++ b/examples/conn-test.c
@@ -31,11 +31,23 @@ do_connection_open(GObject *source,
{
GVirConnection *conn = GVIR_CONNECTION(source);
GError *err = NULL;
+ gchar *hv_name = NULL;
if (!gvir_connection_open_finish(conn, res, &err)) {
g_error("%s", err->message);
+ goto cleanup;
}
g_print("Connected to libvirt\n");
+
+ if (!(hv_name = gvir_connection_get_hypervisor_name(conn, &err))) {
+ g_error("%s", err->message);
+ goto cleanup;
+ }
+
+ g_print("Hypervisor name: %s\n", hv_name);
+
+cleanup:
+ g_free(hv_name);
g_object_unref(conn);
}
diff --git a/libvirt-gobject/libvirt-gobject-connection.c b/libvirt-gobject/libvirt-gobject-connection.c
index d826905..75bf041 100644
--- a/libvirt-gobject/libvirt-gobject-connection.c
+++ b/libvirt-gobject/libvirt-gobject-connection.c
@@ -1025,6 +1025,51 @@ const gchar *gvir_connection_get_uri(GVirConnection *conn)
return conn->priv->uri;
}
+/**
+ * gvir_connection_get_hypervisor_name:
+ * @conn: a #GVirConnection
+ * @err: return location for any #GError
+ *
+ * Get name of current hypervisor used.
+ *
+ * Return value: new string that should be freed when no longer needed,
+ * or NULL upon error.
+ */
+gchar *
+gvir_connection_get_hypervisor_name(GVirConnection *conn,
+ GError **err)
+{
+ GVirConnectionPrivate *priv;
+ gchar *ret = NULL;
+ const char *type;
+
+ g_return_val_if_fail(GVIR_IS_CONNECTION(conn), NULL);
+ g_return_val_if_fail(err == NULL || *err == NULL, NULL);
+
+ priv = conn->priv;
+ /* Stop another thread closing the connection just at the minute */
+ virConnectRef(priv->conn);
+ if (!priv->conn) {
+ g_set_error_literal(err, GVIR_CONNECTION_ERROR, 0,
+ "Connection is not open");
+ goto cleanup;
+ }
+
+ type = virConnectGetType(priv->conn);
+ if (!type) {
+ gvir_set_error_literal(err, GVIR_CONNECTION_ERROR, 0,
+ "Unable to get hypervisor name");
+ goto cleanup;
+ }
+
+ ret = g_strdup(type);
+
+cleanup:
+ if (priv->conn)
+ virConnectClose(priv->conn);
+ return ret;
+}
+
static void gvir_domain_ref(gpointer obj, gpointer ignore G_GNUC_UNUSED)
{
g_object_ref(obj);
diff --git a/libvirt-gobject/libvirt-gobject-connection.h b/libvirt-gobject/libvirt-gobject-connection.h
index d658b01..62eb024 100644
--- a/libvirt-gobject/libvirt-gobject-connection.h
+++ b/libvirt-gobject/libvirt-gobject-connection.h
@@ -112,6 +112,9 @@ gboolean gvir_connection_fetch_domains_finish(GVirConnection *conn,
const gchar *gvir_connection_get_uri(GVirConnection *conn);
+gchar *gvir_connection_get_hypervisor_name(GVirConnection *conn,
+ GError **err);
+
GList *gvir_connection_get_domains(GVirConnection *conn);
GVirDomain *gvir_connection_get_domain(GVirConnection *conn,
diff --git a/libvirt-gobject/libvirt-gobject.sym b/libvirt-gobject/libvirt-gobject.sym
index 67e5a4f..2c2f1f4 100644
--- a/libvirt-gobject/libvirt-gobject.sym
+++ b/libvirt-gobject/libvirt-gobject.sym
@@ -194,4 +194,9 @@ LIBVIRT_GOBJECT_0.1.2 {
gvir_domain_resume_finish;
} LIBVIRT_GOBJECT_0.1.1;
+LIBVIRT_GOBJECT_0.1.3 {
+ global:
+ gvir_connection_get_hypervisor_name;
+} LIBVIRT_GOBJECT_0.1.2;
+
# .... define new API here using predicted next version number ....
--
1.7.8.6
12 years, 3 months
[libvirt] 'virsh snapshot-list' throws a segfault [with libvirt-0.9.13-3]
by Kashyap Chamarthy
Hi,
After creating a couple of external snapshots, running 'virsh snapshot-list $name' fails
with a segfault. I wonder what's going on here:
Host: Fedora-17
Guest: F18/rawhide
Version Info:
#--------------------------------------------------------#
[root@moon ~]# rpm -q libvirt qemu-kvm ; uname -r ; cat /etc/fedora-release
libvirt-0.9.13-3.fc17.x86_64
qemu-kvm-1.2-0.1.20120806git3e430569.fc17.x86_64
3.5.2-3.fc17.x86_64
Fedora release 17 (Beefy Miracle)
[root@moon ~]#
#--------------------------------------------------------#
#--------------------------------------------------------#
[root@moon ~]# virsh list
Id Name State
----------------------------------------------------
3 daisy running
[root@moon ~]#
#--------------------------------------------------------#
[root@moon ~]# virsh snapshot-create-as daisy snap1-daisy "snap1 description" --diskspec
vda,file=/export/vmimgs/snap1-daisy.qcow2 --disk-only --atomic
Domain snapshot snap1-daisy created
[root@moon ~]#
#--------------------------------------------------------#
[root@moon ~]# virsh snapshot-create-as daisy snap2-daisy "snap2 description" --diskspec
vda,file=/export/vmimgs/snap2-daisy.qcow2 --disk-only --atomic
Domain snapshot snap2-daisy created
[root@moon ~]#
#--------------------------------------------------------#
[root@moon ~]# virsh snapshot-list daisy
Segmentation fault
[root@moon ~]#
#--------------------------------------------------------#
[root@moon ~]# virsh snapshot-list --tree daisy
Segmentation fault
[root@moon ~]#
#--------------------------------------------------------#
>From /var/log/messages:
#--------------------------------------------------------#
Sep 12 15:01:49 moon kernel: [847381.051241] virsh[23174]: segfault at 67 ip
00007fbaa6e66751 sp 00007fff2e07e048 error 4 in libc-2.15.so[7fbaa6de1000+1ac000]
Sep 12 15:01:49 moon libvirtd[2276]: 2012-09-12 09:31:49.553+0000: 2276: error :
virNetSocketReadWire:1006 : End of file while reading data: Input/output error
Sep 12 15:06:09 moon kernel: [847640.758497] virsh[23364]: segfault at 35 ip
00007f11f1944751 sp 00007fff59beea58 error 4 in libc-2.15.so[7f11f18bf000+1ac000]
Sep 12 15:06:09 moon libvirtd[2276]: 2012-09-12 09:36:09.260+0000: 2276: error :
virNetSocketReadWire:1006 : End of file while reading data: Input/output error
#--------------------------------------------------------#
Any hints here?
--
/kashyap
12 years, 3 months
[libvirt] libvirt & git send-email
by Gene Czarcinski
I have (hopefully) figured out how to use git and have submitted three
emails: a cover, updates for IPv4 and updates for IPv6 ... in fact, I
have done this twice ... once yesterday around noon and again a few
minutes ago. I submitted them today because the emails had not appeared
on libvir-lst.
So, after sending them today my CC appeared and a minute or so later the
patches appeared on the mailing list. BUT, these emails were the ones I
sent yesterday, are dated such, have yesterday's subject line (today's
was very slightly different), and had the Message-id from yesterday.
Yes, both yesterday and today, I tested doing the "git send-email" by
specifying some different email addresses I have and I, indeed, received
two copies (TO and CC).
If anyone knows what happened, please tell me. If I screwed something
up, I would like to not do it again.
The from email address matches the email address that is subscribed to
this list so that should not be the problem.
If this remains a mystery, so be it.
Gene
12 years, 3 months
[libvirt] [PATCH 0/2] tell dnsmasq not to forward PTR queries
by gene@czarc.net
From: Gene Czarcinski <gene(a)czarc.net>
For networks which dnsmasq has "--listen-address" specified, add
the command line parameter so that any dns PTR queries for those
networks are not forwarded.
There are separate patches for IPv4 and IPv6.
Gene Czarcinski (2):
IPV4 local=/....in-addr.arpa/
IPv6 local=/...ip6.arpa/
src/network/bridge_driver.c | 32 ++++++++++++++++++++++
tests/networkxml2argvdata/isolated-network.argv | 1 +
.../networkxml2argvdata/nat-network-dns-hosts.argv | 1 +
.../nat-network-dns-srv-record-minimal.argv | 5 ++++
.../nat-network-dns-srv-record.argv | 5 ++++
.../nat-network-dns-txt-record.argv | 11 ++++++--
tests/networkxml2argvdata/nat-network.argv | 18 ++++++++++--
tests/networkxml2argvdata/nat-network.xml | 4 +++
tests/networkxml2argvdata/netboot-network.argv | 1 +
.../networkxml2argvdata/netboot-proxy-network.argv | 1 +
tests/networkxml2argvdata/routed-network.argv | 3 +-
11 files changed, 76 insertions(+), 6 deletions(-)
--
1.7.11.4
12 years, 3 months
[libvirt] [libvirt-glib 1/2] Use 1 GB of RAM in Python example (instead of 1 TB)
by Timo Juhani Lindfors
---
examples/config-demo.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/examples/config-demo.py b/examples/config-demo.py
index 92e8a89..016f9bb 100644
--- a/examples/config-demo.py
+++ b/examples/config-demo.py
@@ -4,7 +4,7 @@ from gi.repository import LibvirtGConfig;
domain = LibvirtGConfig.Domain.new()
domain.set_name("foo")
-domain.set_memory(1024*1024*1024)
+domain.set_memory(1024*1024)
domain.set_vcpus(2)
domain.set_lifecycle(LibvirtGConfig.DomainLifecycleEvent.ON_POWEROFF,
LibvirtGConfig.DomainLifecycleAction.DESTROY)
--
1.7.10.4
12 years, 3 months
[libvirt] [PATCH 0/5 v4] Atomic API to list host interfaces
by Osier Yang
v3 - v4:
- Just rebase on the top, split the API from v3's big set.
Osier Yang (5):
list: Define new API virConnectListAllInterfaces
list: Implemente RPC calls for virConnectListAllInterfaces
list: Implement listAllInterfaces
list: Use virConnectListAllInterfaces in virsh
list: Expose virConnectListAllInterfaces to Python binding
daemon/remote.c | 54 +++++++
include/libvirt/libvirt.h.in | 13 ++
python/generator.py | 1 +
python/libvirt-override-api.xml | 6 +
python/libvirt-override-virConnect.py | 12 ++
python/libvirt-override.c | 48 ++++++
src/driver.h | 5 +
src/interface/netcf_driver.c | 135 +++++++++++++++++
src/libvirt.c | 77 ++++++++++-
src/libvirt_public.syms | 1 +
src/remote/remote_driver.c | 64 ++++++++
src/remote/remote_protocol.x | 13 ++-
src/remote_protocol-structs | 12 ++
tools/virsh-interface.c | 257 +++++++++++++++++++++++----------
14 files changed, 621 insertions(+), 77 deletions(-)
--
1.7.7.3
12 years, 3 months
[libvirt] [libvirt-glib][PATCH 1/2] gobject: Introduce gvir_connection_get_hypervisor_name
by Michal Privoznik
which is basically a wrapper for virConnectGetType().
---
examples/conn-test.c | 12 ++++++
libvirt-gobject/libvirt-gobject-connection.c | 53 ++++++++++++++++++++++++++
libvirt-gobject/libvirt-gobject-connection.h | 3 +
libvirt-gobject/libvirt-gobject.sym | 5 ++
4 files changed, 73 insertions(+), 0 deletions(-)
diff --git a/examples/conn-test.c b/examples/conn-test.c
index 8c70997..b90d2b0 100644
--- a/examples/conn-test.c
+++ b/examples/conn-test.c
@@ -31,11 +31,23 @@ do_connection_open(GObject *source,
{
GVirConnection *conn = GVIR_CONNECTION(source);
GError *err = NULL;
+ gchar *hv_name = NULL;
if (!gvir_connection_open_finish(conn, res, &err)) {
g_error("%s", err->message);
+ goto cleanup;
}
g_print("Connected to libvirt\n");
+
+ if (!(hv_name = gvir_connection_get_hypervisor_name(conn, &err))) {
+ g_error("%s", err->message);
+ goto cleanup;
+ }
+
+ g_print("Hypervisor name: %s\n", hv_name);
+
+cleanup:
+ g_free(hv_name);
g_object_unref(conn);
}
diff --git a/libvirt-gobject/libvirt-gobject-connection.c b/libvirt-gobject/libvirt-gobject-connection.c
index d826905..f0be875 100644
--- a/libvirt-gobject/libvirt-gobject-connection.c
+++ b/libvirt-gobject/libvirt-gobject-connection.c
@@ -1025,6 +1025,59 @@ const gchar *gvir_connection_get_uri(GVirConnection *conn)
return conn->priv->uri;
}
+/**
+ * gvir_connection_get_hypervisor_name:
+ * @conn: a #GVirConnection
+ * @err: return location for any #GError
+ *
+ * Get name of current hypervisor used.
+ *
+ * Return value: new string that should be freed when no longer needed,
+ * or NULL upon error.
+ */
+gchar *
+gvir_connection_get_hypervisor_name(GVirConnection *conn,
+ GError **err)
+{
+ GVirConnectionPrivate *priv;
+ virConnectPtr vconn = NULL;
+ gchar *ret = NULL;
+ const char *type;
+
+ g_return_val_if_fail(GVIR_IS_CONNECTION(conn), NULL);
+
+ priv = conn->priv;
+ g_mutex_lock(priv->lock);
+ if (!priv->conn) {
+ g_set_error_literal(err, GVIR_CONNECTION_ERROR, 0,
+ "Connection is not open");
+ g_mutex_unlock(priv->lock);
+ goto cleanup;
+ }
+
+ vconn = priv->conn;
+ /* Stop another thread closing the connection just at the minute */
+ virConnectRef(vconn);
+ g_mutex_unlock(priv->lock);
+
+ type = virConnectGetType(priv->conn);
+ if (!type) {
+ gvir_set_error_literal(err, GVIR_CONNECTION_ERROR, 0,
+ "Unable to get hypervisor name");
+ goto cleanup;
+ }
+
+ ret = g_strdup(type);
+
+cleanup:
+ if (vconn) {
+ g_mutex_lock(priv->lock);
+ virConnectClose(vconn);
+ g_mutex_unlock(priv->lock);
+ }
+ return ret;
+}
+
static void gvir_domain_ref(gpointer obj, gpointer ignore G_GNUC_UNUSED)
{
g_object_ref(obj);
diff --git a/libvirt-gobject/libvirt-gobject-connection.h b/libvirt-gobject/libvirt-gobject-connection.h
index d658b01..62eb024 100644
--- a/libvirt-gobject/libvirt-gobject-connection.h
+++ b/libvirt-gobject/libvirt-gobject-connection.h
@@ -112,6 +112,9 @@ gboolean gvir_connection_fetch_domains_finish(GVirConnection *conn,
const gchar *gvir_connection_get_uri(GVirConnection *conn);
+gchar *gvir_connection_get_hypervisor_name(GVirConnection *conn,
+ GError **err);
+
GList *gvir_connection_get_domains(GVirConnection *conn);
GVirDomain *gvir_connection_get_domain(GVirConnection *conn,
diff --git a/libvirt-gobject/libvirt-gobject.sym b/libvirt-gobject/libvirt-gobject.sym
index 67e5a4f..2c2f1f4 100644
--- a/libvirt-gobject/libvirt-gobject.sym
+++ b/libvirt-gobject/libvirt-gobject.sym
@@ -194,4 +194,9 @@ LIBVIRT_GOBJECT_0.1.2 {
gvir_domain_resume_finish;
} LIBVIRT_GOBJECT_0.1.1;
+LIBVIRT_GOBJECT_0.1.3 {
+ global:
+ gvir_connection_get_hypervisor_name;
+} LIBVIRT_GOBJECT_0.1.2;
+
# .... define new API here using predicted next version number ....
--
1.7.8.6
12 years, 3 months
[libvirt] [PATCH 0/4] parallels: add support of containers
by Dmitry Guryanov
Parallels Cloud Server supports containers together with
fully virtualized VMs. Both types of virtual environments
managed by prlctl utility using the same commands and
options, where possible.
This patch series adds new domain type to the driver and
handles differences between containers and VMs where
it's needed.
Dmitry Guryanov (4):
parallels: add support of containers to the driver
parallels: handle unlimited cpus on containers
parallels: fix parallelsDomainDefineXML for existing containers
parallels: implement containers creation
.gnulib | 2 +-
src/parallels/parallels_driver.c | 92 ++++++++++++++++----
.../domain-parallels-ct-simple.xml | 28 ++++++
3 files changed, 105 insertions(+), 17 deletions(-)
create mode 100644 tests/domainschemadata/domain-parallels-ct-simple.xml
12 years, 3 months
[libvirt] [PATCH] docs: mention another iaas app built on libvirt
by Eric Blake
Reported on the libvirt-users list.
* docs/apps.html.in: Add Eucalyptus.
Reported by Eric Choi.
---
Any objections to this patch, turning your email into the needed
doc markup?
docs/apps.html.in | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/docs/apps.html.in b/docs/apps.html.in
index 10ea6bf..903b099 100644
--- a/docs/apps.html.in
+++ b/docs/apps.html.in
@@ -212,6 +212,14 @@
modular Web Services architecture.
</dd>
+ <dt><a href="http://www.eucalyptus.com">Eucalyptus</a></dt>
+ <dd>
+ Eucalyptus is an on-premise Infrastructure as a Service cloud
+ software platform that is open source and
+ AWS-compatible. Eucalyptus uses libivrt virtualization API to
+ directly interact with Xen and KVM hypervisors.
+ </dd>
+
<dt><a href="http://www.nimbusproject.org">Nimbus</a></dt>
<dd>
Nimbus is an open-source toolkit focused on providing
--
1.7.11.4
12 years, 3 months