[libvirt] [PATCH] conf: fix missing spaces in message
by Eric Blake
I got an off-list report about a bad diagnostic:
Target network card mac 52:54:00:49:07:ccdoes not match source 52:54:00:49:07:b8
True to form, I've added a syntax check rule to prevent it
from recurring, and found several other offenders.
* cfg.mk (sc_require_whitespace_in_translation): New rule.
* src/conf/domain_conf.c (virDomainNetDefCheckABIStability): Add
space.
* src/esx/esx_util.c (esxUtil_ParseUri): Likewise.
* src/qemu/qemu_command.c (qemuCollectPCIAddress): Likewise.
* src/qemu/qemu_driver.c (qemuDomainSetMetadata)
(qemuDomainGetMetadata): Likewise.
* src/qemu/qemu_hotplug.c (qemuDomainChangeNetBridge): Likewise.
* src/rpc/virnettlscontext.c
(virNetTLSContextCheckCertDNWhitelist): Likewise.
* src/vmware/vmware_driver.c (vmwareDomainResume): Likewise.
* src/vbox/vbox_tmpl.c (vboxDomainGetXMLDesc, vboxAttachDrives):
Avoid false negatives.
* tools/virsh-domain.c (info_save_image_dumpxml): Reword.
Based on a report by Luwen Su.
---
Too big to use the trivial rule, so I'll wait for a review.
cfg.mk | 9 +++++++++
src/conf/domain_conf.c | 5 +++--
src/esx/esx_util.c | 7 ++++---
src/qemu/qemu_command.c | 5 +++--
src/qemu/qemu_driver.c | 6 +++---
src/qemu/qemu_hotplug.c | 2 +-
src/rpc/virnettlscontext.c | 6 +++---
src/vbox/vbox_tmpl.c | 14 ++++++++------
src/vmware/vmware_driver.c | 4 ++--
tools/virsh-domain.c | 4 ++--
10 files changed, 38 insertions(+), 24 deletions(-)
diff --git a/cfg.mk b/cfg.mk
index bca363c..0dd58df 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -597,6 +597,15 @@ sc_prohibit_useless_translation:
halt='no translations in tests or examples' \
$(_sc_search_regexp)
+# When splitting a diagnostic across lines, ensure that there is a space
+# or \n on one side of the split.
+sc_require_whitespace_in_translation:
+ @grep -n -A1 '"$$' $$($(VC_LIST_EXCEPT)) \
+ | sed -ne ':l; /"$$/ {N;b l;}; s/"\n[^"]*"/""/g; s/\\n/ /g' \
+ -e '/_(.*[^\ ]""[^\ ]/p' | grep . && \
+ { echo '$(ME): missing whitespace at line split' 1>&2; \
+ exit 1; } || :
+
# Enforce recommended preprocessor indentation style.
sc_preprocessor_indentation:
@if cppi --version >/dev/null 2>&1; then \
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 0e71b06..292cc9a 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -9846,7 +9846,8 @@ static bool virDomainDeviceInfoCheckABIStability(virDomainDeviceInfoPtr src,
src->addr.pci.slot != dst->addr.pci.slot ||
src->addr.pci.function != dst->addr.pci.function) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("Target device PCI address %04x:%02x:%02x.%02x does not match source %04x:%02x:%02x.%02x"),
+ _("Target device PCI address %04x:%02x:%02x.%02x "
+ "does not match source %04x:%02x:%02x.%02x"),
dst->addr.pci.domain, dst->addr.pci.bus,
dst->addr.pci.slot, dst->addr.pci.function,
src->addr.pci.domain, src->addr.pci.bus,
@@ -10044,7 +10045,7 @@ static bool virDomainNetDefCheckABIStability(virDomainNetDefPtr src,
if (virMacAddrCmp(&src->mac, &dst->mac) != 0) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("Target network card mac %02x:%02x:%02x:%02x:%02x:%02x"
- "does not match source %02x:%02x:%02x:%02x:%02x:%02x"),
+ " does not match source %02x:%02x:%02x:%02x:%02x:%02x"),
dst->mac.addr[0], dst->mac.addr[1], dst->mac.addr[2],
dst->mac.addr[3], dst->mac.addr[4], dst->mac.addr[5],
src->mac.addr[0], src->mac.addr[1], src->mac.addr[2],
diff --git a/src/esx/esx_util.c b/src/esx/esx_util.c
index 9288218..9d84a6a 100644
--- a/src/esx/esx_util.c
+++ b/src/esx/esx_util.c
@@ -2,7 +2,7 @@
/*
* esx_util.c: utility functions for the VMware ESX driver
*
- * Copyright (C) 2010-2011 Red Hat, Inc.
+ * Copyright (C) 2010-2012 Red Hat, Inc.
* Copyright (C) 2009-2011 Matthias Bolte <matthias.bolte(a)googlemail.com>
* Copyright (C) 2009 Maximilian Wilhelm <max(a)rfc2324.org>
*
@@ -159,8 +159,9 @@ esxUtil_ParseUri(esxUtil_ParsedUri **parsedUri, virURIPtr uri)
(*parsedUri)->proxy_port < 1 ||
(*parsedUri)->proxy_port > 65535) {
virReportError(VIR_ERR_INVALID_ARG,
- _("Query parameter 'proxy' has unexpected port"
- "value '%s' (should be [1..65535])"), tmp);
+ _("Query parameter 'proxy' has unexpected "
+ "port value '%s' (should be [1..65535])"),
+ tmp);
goto cleanup;
}
}
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index a83d6de..cd4ee93 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -1044,8 +1044,9 @@ static int qemuCollectPCIAddress(virDomainDefPtr def ATTRIBUTE_UNUSED,
if (virHashLookup(addrs->used, addr)) {
virReportError(VIR_ERR_XML_ERROR,
- _("Attempted double use of PCI Address '%s'"
- "(need \"multifunction='off'\" for device on function 0)"),
+ _("Attempted double use of PCI Address '%s' "
+ "(need \"multifunction='off'\" for device "
+ "on function 0)"),
addr);
goto cleanup;
}
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 8e8e00c..a410521 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -13271,7 +13271,7 @@ qemuDomainSetMetadata(virDomainPtr dom,
break;
case VIR_DOMAIN_METADATA_ELEMENT:
virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED, "%s",
- _("QEmu driver does not support modifying"
+ _("QEmu driver does not support modifying "
"<metadata> element"));
goto cleanup;
break;
@@ -13299,7 +13299,7 @@ qemuDomainSetMetadata(virDomainPtr dom,
break;
case VIR_DOMAIN_METADATA_ELEMENT:
virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED, "%s",
- _("QEMU driver does not support"
+ _("QEMU driver does not support "
"<metadata> element"));
goto cleanup;
default:
@@ -13367,7 +13367,7 @@ qemuDomainGetMetadata(virDomainPtr dom,
break;
case VIR_DOMAIN_METADATA_ELEMENT:
virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED, "%s",
- _("QEMU driver does not support"
+ _("QEMU driver does not support "
"<metadata> element"));
goto cleanup;
break;
diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
index a8a904c..d4d08ac 100644
--- a/src/qemu/qemu_hotplug.c
+++ b/src/qemu/qemu_hotplug.c
@@ -1278,7 +1278,7 @@ int qemuDomainChangeNetBridge(virDomainObjPtr vm,
virDomainAuditNet(vm, NULL, olddev, "attach", ret == 0);
if (ret < 0) {
virReportError(VIR_ERR_OPERATION_FAILED,
- _("unable to recover former state by adding port"
+ _("unable to recover former state by adding port "
"to bridge %s"), oldbridge);
}
return -1;
diff --git a/src/rpc/virnettlscontext.c b/src/rpc/virnettlscontext.c
index 9fe6eb1..dee4334 100644
--- a/src/rpc/virnettlscontext.c
+++ b/src/rpc/virnettlscontext.c
@@ -1,7 +1,7 @@
/*
* virnettlscontext.c: TLS encryption/x509 handling
*
- * Copyright (C) 2010-2011 Red Hat, Inc.
+ * Copyright (C) 2010-2012 Red Hat, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -393,8 +393,8 @@ virNetTLSContextCheckCertDNWhitelist(const char *dname,
virReportError(VIR_ERR_SYSTEM_ERROR, "%s",
_("Client's Distinguished Name is not on the list "
"of allowed clients (tls_allowed_dn_list). Use "
- "'certtool -i --infile clientcert.pem' to view the"
- "Distinguished Name field in the client certificate,"
+ "'certtool -i --infile clientcert.pem' to view the "
+ "Distinguished Name field in the client certificate, "
"or run this daemon with --verbose option."));
return 0;
}
diff --git a/src/vbox/vbox_tmpl.c b/src/vbox/vbox_tmpl.c
index 48f371f..4f2d025 100644
--- a/src/vbox/vbox_tmpl.c
+++ b/src/vbox/vbox_tmpl.c
@@ -3752,8 +3752,9 @@ static int vboxDomainCreateWithFlags(virDomainPtr dom, unsigned int flags) {
ret = vboxStartMachine(dom, i, machine, &iid);
} else {
virReportError(VIR_ERR_OPERATION_FAILED, "%s",
- _("machine is not in poweroff|saved|"
- "aborted state, so couldn't start it"));
+ _("machine is not in "
+ "poweroff|saved|aborted state, so "
+ "couldn't start it"));
ret = -1;
}
}
@@ -4280,8 +4281,9 @@ vboxAttachDrives(virDomainDefPtr def, vboxGlobalData *data, IMachine *machine)
&devicePort,
&deviceSlot)) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("can't get the port/slot number of harddisk/"
- "dvd/floppy to be attached: %s, rc=%08x"),
+ _("can't get the port/slot number of "
+ "harddisk/dvd/floppy to be attached: "
+ "%s, rc=%08x"),
def->disks[i]->src, (unsigned)rc);
VBOX_RELEASE(medium);
VBOX_UTF16_FREE(mediumUUID);
@@ -4303,8 +4305,8 @@ vboxAttachDrives(virDomainDefPtr def, vboxGlobalData *data, IMachine *machine)
if (NS_FAILED(rc)) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("could not attach the file as harddisk/"
- "dvd/floppy: %s, rc=%08x"),
+ _("could not attach the file as "
+ "harddisk/dvd/floppy: %s, rc=%08x"),
def->disks[i]->src, (unsigned)rc);
} else {
DEBUGIID("Attached HDD/DVD/Floppy with UUID", mediumUUID);
diff --git a/src/vmware/vmware_driver.c b/src/vmware/vmware_driver.c
index 1607018..557b917 100644
--- a/src/vmware/vmware_driver.c
+++ b/src/vmware/vmware_driver.c
@@ -1,6 +1,6 @@
/*---------------------------------------------------------------------------*/
/*
- * Copyright (C) 2011 Red Hat, Inc.
+ * Copyright (C) 2011-2012 Red Hat, Inc.
* Copyright 2010, diateam (www.diateam.net)
*
* This library is free software; you can redistribute it and/or
@@ -484,7 +484,7 @@ vmwareDomainResume(virDomainPtr dom)
if (driver->type == TYPE_PLAYER) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
- _("vmplayer does not support libvirt suspend/resume"
+ _("vmplayer does not support libvirt suspend/resume "
"(vmware pause/unpause) operation "));
return ret;
}
diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c
index 409eb24..c6695b3 100644
--- a/tools/virsh-domain.c
+++ b/tools/virsh-domain.c
@@ -2945,8 +2945,8 @@ cleanup:
*/
static const vshCmdInfo info_save_image_dumpxml[] = {
{"help", N_("saved state domain information in XML")},
- {"desc", N_("Output the domain information for a saved state file,\n"
- "as an XML dump to stdout.")},
+ {"desc",
+ N_("Dump XML of domain information for a saved state file to stdout.")},
{NULL, NULL}
};
--
1.7.11.4
12 years, 8 months
[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, 8 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, 8 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, 8 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, 8 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, 8 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, 8 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, 8 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, 8 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, 8 months