[libvirt] [PATCH] docs: add a note that spice channel is ignoret without spice graphics
by Pavel Hrdina
To prevent a confusion about missing chardev argument in qemu
command line add a note about that behavior into documentation.
Signed-off-by: Pavel Hrdina <phrdina(a)redhat.com>
---
docs/formatdomain.html.in | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
index fb0a0d1..cd179a6 100644
--- a/docs/formatdomain.html.in
+++ b/docs/formatdomain.html.in
@@ -5372,6 +5372,10 @@ qemu-kvm -net nic,model=? /dev/null
under a channel name specified in the <code>channel</code>
attribute. <span class="since">Since 1.2.2</span>
</p>
+ <p>
+ NOTE: if spice graphics is not defined the spice channel will
+ be ignored.
+ </p>
<pre>
...
--
2.0.5
9 years, 10 months
[libvirt] Adding timestamps for all emulator output
by Andrey Korolyov
Hello,
I think it would be useful if libvirt will be able to prefix all
messages from emulator pipes with the date stamping, for example I am
trying to catch very rare and non-fatal race with
virtio-serial-bus: Guest failure in adding device virtio-serial0.0
which is specific to the Windows guests on qemu-kvm. I have supporting
infrastructure which can tell me exact times for every action upon
this VM, but as bug is not frequent, the continuous monitoring looks
like an overkill for a desired goal - find a correlation between
emulator event and message from stderr. Patching emulator itself is
barely an option, as it is ugly, requires refresh of the running code
via loopback migration and completely non-universal, as every
hypervisor should be modified seperately.
I`d highly appreciate positive consideration for such functionality
addition or can write a patch shortly, if needed. Thanks!
9 years, 10 months
[libvirt] [PATCH 0/2] For 1.2.13 - Fix crash with gluster URIs
by Peter Krempa
Peter Krempa (2):
util: storagefile: Don't crash on gluster URIs without path
util: storage: Fix error type in virStorageSourceParseBackingURI
src/util/virstoragefile.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
--
2.2.2
9 years, 10 months
[libvirt] [PATCHv2 00/10] Add support for memory hotplug
by Peter Krempa
Version 2 fixes review comments and rebases to the current state. This series
applies on top of:
[PATCHv2 0/7] Automaticaly fill <memory> element for NUMA enabled guests
For convenience you can fetch the changes at:
git fetch git://pipo.sk/pipo/libvirt.git memory-hotplug-2
Peter Krempa (10):
conf: Add support for parsing and formatting max memory and slot count
qemu: Implement setup of memory hotplug parameters
conf: Add device address type for dimm devices
conf: Add interface to parse and format memory device information
qemu: memdev: Add infrastructure to load memory device information
qemu: migration: Forbid migration with memory modules lacking info
qemu: add support for memory devices
qemu: conf: Add support for memory device cold(un)plug
qemu: Implement memory device hotplug
qemu: Implement memory device hotunplug
docs/formatdomain.html.in | 98 ++++
docs/schemas/domaincommon.rng | 76 +++
src/bhyve/bhyve_domain.c | 9 +-
src/conf/domain_conf.c | 564 ++++++++++++++++++++-
src/conf/domain_conf.h | 59 +++
src/libvirt_private.syms | 7 +
src/libxl/libxl_domain.c | 8 +
src/lxc/lxc_domain.c | 8 +
src/openvz/openvz_driver.c | 14 +-
src/parallels/parallels_driver.c | 6 +-
src/phyp/phyp_driver.c | 6 +-
src/qemu/qemu_command.c | 166 +++++-
src/qemu/qemu_command.h | 15 +
src/qemu/qemu_domain.c | 80 +++
src/qemu/qemu_domain.h | 5 +
src/qemu/qemu_driver.c | 29 ++
src/qemu/qemu_hotplug.c | 177 +++++++
src/qemu/qemu_hotplug.h | 6 +
src/qemu/qemu_migration.c | 14 +
src/qemu/qemu_monitor.c | 42 ++
src/qemu/qemu_monitor.h | 14 +
src/qemu/qemu_monitor_json.c | 122 +++++
src/qemu/qemu_monitor_json.h | 5 +
src/qemu/qemu_process.c | 4 +
src/uml/uml_driver.c | 9 +-
src/vbox/vbox_common.c | 6 +-
src/vmware/vmware_driver.c | 6 +-
src/vmx/vmx.c | 6 +-
src/xen/xen_driver.c | 7 +
src/xenapi/xenapi_driver.c | 9 +-
tests/domainschemadata/maxMemory.xml | 19 +
.../qemuxml2argv-memory-hotplug-dimm.args | 11 +
.../qemuxml2argv-memory-hotplug-dimm.xml | 50 ++
.../qemuxml2argv-memory-hotplug-nonuma.xml | 22 +
.../qemuxml2argv-memory-hotplug.args | 6 +
.../qemuxml2argv-memory-hotplug.xml | 34 ++
tests/qemuxml2argvtest.c | 6 +
tests/qemuxml2xmltest.c | 4 +
38 files changed, 1706 insertions(+), 23 deletions(-)
create mode 100644 tests/domainschemadata/maxMemory.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-memory-hotplug-dimm.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-memory-hotplug-dimm.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-memory-hotplug-nonuma.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-memory-hotplug.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-memory-hotplug.xml
--
2.2.2
9 years, 10 months
[libvirt] [PATCH] util: do not take it as wrong if no PortData is found while getting migrateData
by Zhang Bo
The function virNetDevOpenvswitchGetMigrateData() uses the cmd ovs-vsctl to
get portdata. If no portdata is available, rather than failure in running
the cmd, we think we should just print a warning message here, rather than
taking it as wrong, because PortData is just optional for an ovs interface.
If we take it as wrong anyway, in function qemuMigrationBakeCookie() it will
terminate in the middle, and cookies such as NBD would not be baked, further
more errors would happen, such as nbd ports get overflowed, etc.
Thus, we add an if branch in virNetDevOpenvswitchGetMigrateData() to just warn
if portdata is unavailable.
Signed-off-by: Zhang Bo <oscar.zhangbo(a)huawei.com>
Signed-off-by: Zhou Yimin <zhouyimin(a)huawei.com>
---
src/util/virnetdevopenvswitch.c | 28 ++++++++++++++++++++++++----
1 file changed, 24 insertions(+), 4 deletions(-)
diff --git a/src/util/virnetdevopenvswitch.c b/src/util/virnetdevopenvswitch.c
index e5c87bb..6116377 100644
--- a/src/util/virnetdevopenvswitch.c
+++ b/src/util/virnetdevopenvswitch.c
@@ -30,9 +30,12 @@
#include "virerror.h"
#include "virmacaddr.h"
#include "virstring.h"
+#include "virlog.h"
#define VIR_FROM_THIS VIR_FROM_NONE
+VIR_LOG_INIT("util.netdevopenvswitch");
+
/**
* virNetDevOpenvswitchAddPort:
* @brname: the bridge name
@@ -204,18 +207,29 @@ int virNetDevOpenvswitchRemovePort(const char *brname ATTRIBUTE_UNUSED, const ch
int virNetDevOpenvswitchGetMigrateData(char **migrate, const char *ifname)
{
virCommandPtr cmd = NULL;
+ char *errbuf = NULL;
int ret = -1;
cmd = virCommandNewArgList(OVSVSCTL, "--timeout=5", "get", "Interface",
ifname, "external_ids:PortData", NULL);
virCommandSetOutputBuffer(cmd, migrate);
+ virCommandSetErrorBuffer(cmd, &errbuf);
/* Run the command */
- if (virCommandRun(cmd, NULL) < 0) {
- virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Unable to run command to get OVS port data for "
- "interface %s"), ifname);
+ ret = virCommandRun(cmd, NULL);
+ if (ret < 0) {
+ /*PortData is optional, thus do not take it as wrong if the PortData is not found.*/
+ if (strstr(errbuf, "no key \"PortData\" in Interface record")) {
+ VIR_WARN("Can't find OVS port data for interface %s", ifname);
+ if (*migrate)
+ VIR_FREE(*migrate);
+ ret = 0;
+ } else {
+ virReportError(VIR_ERR_INTERNAL_ERROR,
+ _("Unable to run command to get OVS port data for "
+ "interface %s"), ifname);
+ }
goto cleanup;
}
@@ -223,6 +237,7 @@ int virNetDevOpenvswitchGetMigrateData(char **migrate, const char *ifname)
(*migrate)[strlen(*migrate) - 1] = '\0';
ret = 0;
cleanup:
+ VIR_FREE(errbuf);
virCommandFree(cmd);
return ret;
}
@@ -241,6 +256,11 @@ int virNetDevOpenvswitchSetMigrateData(char *migrate, const char *ifname)
virCommandPtr cmd = NULL;
int ret = -1;
+ if (NULL == migrate) {
+ VIR_INFO("There is no need to set OVS port data for interface %s", ifname);
+ return 0;
+ }
+
cmd = virCommandNewArgList(OVSVSCTL, "--timeout=5", "set",
"Interface", ifname, NULL);
virCommandAddArgFormat(cmd, "external_ids:PortData=%s", migrate);
--
1.7.12.4
9 years, 10 months
[libvirt] [PATCH] conf: error out on missing dhcp host attributes
by Ján Tomko
In virNetworkDHCPHostDefParseXML an error is reported
when partialOkay == true, and none of ip, mac, name
were supplied.
Add the missing goto and error out in this case.
---
src/conf/network_conf.c | 1 +
1 file changed, 1 insertion(+)
Pushed as trivial.
diff --git a/src/conf/network_conf.c b/src/conf/network_conf.c
index 52fcf3d..0f4fc1e 100644
--- a/src/conf/network_conf.c
+++ b/src/conf/network_conf.c
@@ -746,6 +746,7 @@ virNetworkDHCPHostDefParseXML(const char *networkName,
"must be specified for static host definition "
"in network '%s' "),
networkName);
+ goto cleanup;
}
} else {
/* normal usage - you need at least name (IPv6) or one of MAC
--
2.0.5
9 years, 10 months
[libvirt] [PATCH] conf: fix not jump to cleanup when parse a host id is invalid
by Luyao Huang
https://bugzilla.redhat.com/show_bug.cgi?id=1196503
We already check whether the host id is valid or not, add a jump
to forbid invalid host id.
Signed-off-by: Luyao Huang <lhuang(a)redhat.com>
---
src/conf/network_conf.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/conf/network_conf.c b/src/conf/network_conf.c
index 3d8bf05..52fcf3d 100644
--- a/src/conf/network_conf.c
+++ b/src/conf/network_conf.c
@@ -717,6 +717,7 @@ virNetworkDHCPHostDefParseXML(const char *networkName,
virReportError(VIR_ERR_XML_ERROR,
_("Invalid character '%c' in id '%s' of network '%s'"),
*cp, id, networkName);
+ goto cleanup;
}
}
--
1.8.3.1
9 years, 10 months
[libvirt] [PATCH 0/2] check for null ifname when setting/clearing bandwidth
by Laine Stump
When John Ferlan ran the Coverity static checker on my patches to fix
the problem with nicindexes, it began complaining about calling the
virNetDevBandwidth* functions with a null ifname. Investigation
pointed out some real problems with this that are fixed by these two
patches (which will be pushed *before* the nicindex fix patch).
Laine Stump (2):
network: only clear bandwidth if it has been set
util: check for null ifname inside virNetDevBandwidthSet()
src/conf/netdev_bandwidth_conf.c | 6 ++++--
src/lxc/lxc_driver.c | 7 ++++++-
src/network/bridge_driver.c | 6 ++++--
src/qemu/qemu_hotplug.c | 4 +++-
src/util/virnetdevbandwidth.c | 9 ++++++++-
src/util/virnetdevbandwidth.h | 4 ++--
6 files changed, 27 insertions(+), 9 deletions(-)
--
2.1.0
9 years, 10 months
[libvirt] Entering freeze for libvirt-1.2.13
by Daniel Veillard
As suggested yesterday, and hearing no opposition, I have just tagged
Redlease Candidate 1 for libvirt-1.2.13 in git and signed tarballs and
rpms for it available at the usual place:
ftp://libvirt.org/libvirt/
Based on my own but minimal testing this seems to work, but obviously
please give it a try so we can squash bugs and portability issues in
time.
A candidate release 2 on Thursday and a final 1.2.13 release next
Monday is the schedule assumeing no major issue is found,
so please give it a test !
Thanks,
Daniel
--
Daniel Veillard | Open Source and Standards, Red Hat
veillard(a)redhat.com | libxml Gnome XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ | virtualization library http://libvirt.org/
9 years, 10 months
[libvirt] [PATCH 1/3] utils: Implement virCommandPassFDGetFDIndex
by Stefan Berger
Implement virCommandPassFDGetFDIndex to determine the index a given
file descriptor will have when passed to the child process. When this
function is called, a flag is set to prevent the reordering of the
file descriptors.
Signed-off-by: Stefan Berger <stefanb(a)linux.vnet.ibm.com>
---
src/libvirt_private.syms | 1 +
src/util/vircommand.c | 33 +++++++++++++++++++++++++++++++++
src/util/vircommand.h | 3 +++
3 files changed, 37 insertions(+)
diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index c156b40..aadb833 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -1213,6 +1213,7 @@ virCommandNewArgList;
virCommandNewArgs;
virCommandNonblockingFDs;
virCommandPassFD;
+virCommandPassFDGetFDIndex;
virCommandPassListenFDs;
virCommandRawStatus;
virCommandRequireHandshake;
diff --git a/src/util/vircommand.c b/src/util/vircommand.c
index 6527d85..2616446 100644
--- a/src/util/vircommand.c
+++ b/src/util/vircommand.c
@@ -67,6 +67,7 @@ enum {
VIR_EXEC_RUN_SYNC = (1 << 3),
VIR_EXEC_ASYNC_IO = (1 << 4),
VIR_EXEC_LISTEN_FDS = (1 << 5),
+ VIR_EXEC_FIXED_FDS = (1 << 6),
};
typedef struct _virCommandFD virCommandFD;
@@ -214,6 +215,12 @@ virCommandReorderFDs(virCommandPtr cmd)
if (!cmd || cmd->has_error || !cmd->npassfd)
return;
+ if ((cmd->flags & VIR_EXEC_FIXED_FDS)) {
+ virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("The fds are fixed and cannot be reordered"));
+ goto error;
+ }
+
for (i = 0; i < cmd->npassfd; i++)
maxfd = MAX(cmd->passfd[i].fd, maxfd);
@@ -1019,6 +1026,32 @@ virCommandPassListenFDs(virCommandPtr cmd)
cmd->flags |= VIR_EXEC_LISTEN_FDS;
}
+/*
+ * virCommandPassFDGetFDIndex:
+ * @cmd: pointer to virCommand
+ * @fd: FD to get index of
+ *
+ * Determine the index of the FD in the transfer set.
+ *
+ * Returns index >= 0 if @set contains @fd,
+ * -1 otherwise.
+ */
+int
+virCommandPassFDGetFDIndex(virCommandPtr cmd, int fd)
+{
+ size_t i = 0;
+
+ while (i < cmd->npassfd) {
+ if (cmd->passfd[i].fd == fd) {
+ cmd->flags |= VIR_EXEC_FIXED_FDS;
+ return i;
+ }
+ i++;
+ }
+
+ return -1;
+}
+
/**
* virCommandSetPidFile:
* @cmd: the command to modify
diff --git a/src/util/vircommand.h b/src/util/vircommand.h
index bf65de4..198da2f 100644
--- a/src/util/vircommand.h
+++ b/src/util/vircommand.h
@@ -62,6 +62,9 @@ void virCommandPassFD(virCommandPtr cmd,
void virCommandPassListenFDs(virCommandPtr cmd);
+int virCommandPassFDGetFDIndex(virCommandPtr cmd,
+ int fd);
+
void virCommandSetPidFile(virCommandPtr cmd,
const char *pidfile) ATTRIBUTE_NONNULL(2);
--
1.9.3
9 years, 10 months