[libvirt] [PATCH] util: clean up #includes of virnetdevopenvswitch.h
by Laine Stump
virnetdevopenvswitch.h declares a few functions that can be called to
add ports to and remove them from OVS bridges, and retrieve the
migration data for a port. It does not contain any data definitions
that are used by domain_conf.h. But for some reason, domain_conf.h
virnetdevopenvswitch.h should be directly #including it. This adds a
few lines to the project, but saves all the files that don't need it
from the extra computing, and makes the dependencies more clear cut.
---
src/conf/domain_conf.h | 1 -
src/lxc/lxc_driver.c | 1 +
src/lxc/lxc_process.c | 1 +
src/qemu/qemu_hotplug.c | 1 +
src/qemu/qemu_migration.c | 3 ++-
src/qemu/qemu_process.c | 1 +
6 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
index 4eb7742..9d314fa 100644
--- a/src/conf/domain_conf.h
+++ b/src/conf/domain_conf.h
@@ -42,7 +42,6 @@
# include "virnetdevmacvlan.h"
# include "virsysinfo.h"
# include "virnetdevvportprofile.h"
-# include "virnetdevopenvswitch.h"
# include "virnetdevbandwidth.h"
# include "virnetdevvlan.h"
# include "virobject.h"
diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c
index 98fbea8..245000d 100644
--- a/src/lxc/lxc_driver.c
+++ b/src/lxc/lxc_driver.c
@@ -49,6 +49,7 @@
#include "viralloc.h"
#include "virnetdevbridge.h"
#include "virnetdevveth.h"
+#include "virnetdevopenvswitch.h"
#include "nodeinfo.h"
#include "viruuid.h"
#include "virstats.h"
diff --git a/src/lxc/lxc_process.c b/src/lxc/lxc_process.c
index 1e90c16..6c23a0b 100644
--- a/src/lxc/lxc_process.c
+++ b/src/lxc/lxc_process.c
@@ -37,6 +37,7 @@
#include "virnetdev.h"
#include "virnetdevveth.h"
#include "virnetdevbridge.h"
+#include "virnetdevopenvswitch.h"
#include "virtime.h"
#include "domain_nwfilter.h"
#include "network/bridge_driver.h"
diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
index 32596a7..9e51f31 100644
--- a/src/qemu/qemu_hotplug.c
+++ b/src/qemu/qemu_hotplug.c
@@ -47,6 +47,7 @@
#include "virnetdev.h"
#include "virnetdevbridge.h"
#include "virnetdevtap.h"
+#include "virnetdevopenvswitch.h"
#include "virnetdevmidonet.h"
#include "device_conf.h"
#include "virstoragefile.h"
diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
index 83be435..992e192 100644
--- a/src/qemu/qemu_migration.c
+++ b/src/qemu/qemu_migration.c
@@ -1,7 +1,7 @@
/*
* qemu_migration.c: QEMU migration handling
*
- * Copyright (C) 2006-2014 Red Hat, Inc.
+ * Copyright (C) 2006-2015 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
@@ -45,6 +45,7 @@
#include "virerror.h"
#include "viralloc.h"
#include "virfile.h"
+#include "virnetdevopenvswitch.h"
#include "datatypes.h"
#include "fdstream.h"
#include "viruuid.h"
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index c395b5b..afa2f1d 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -62,6 +62,7 @@
#include "virprocess.h"
#include "virtime.h"
#include "virnetdevtap.h"
+#include "virnetdevopenvswitch.h"
#include "virnetdevmidonet.h"
#include "virbitmap.h"
#include "viratomic.h"
--
2.1.0
9 years, 8 months
[libvirt] [PATCH v3] qemu: read backing chain names from qemu
by Eric Blake
https://bugzilla.redhat.com/show_bug.cgi?id=1199182 documents that
after a series of disk snapshots into existing destination images,
followed by active commits of the top image, it is possible for
qemu 2.2 and earlier to end up tracking a different name for the
image than what it would have had when opening the chain afresh.
That is, when starting with the chain 'a <- b <- c', the name
associated with 'b' is how it was spelled in the metadata of 'c',
but when starting with 'a', taking two snapshots into 'a <- b <- c',
then committing 'c' back into 'b', the name associated with 'b' is
now the name used when taking the first snapshot.
Sadly, older qemu doesn't know how to treat different spellings of
the same filename as identical files (it uses strcmp() instead of
checking for the same inode), which means libvirt's attempt to
commit an image using solely the names learned from qcow2 metadata
fails with a cryptic:
error: internal error: unable to execute QEMU command 'block-commit': Top image file /tmp/images/c/../b/b not found
even though the file exists. Trying to teach libvirt the rules on
which name qemu will expect is not worth the effort (besides, we'd
have to remember it across libvirtd restarts, and track whether a
file was opened via metadata or via snapshot creation for a given
qemu process); it is easier to just always directly ask qemu what
string it expects to see in the first place.
As a safety valve, we validate that any name returned by qemu
still maps to the same local file as we have tracked it, so that
a compromised qemu cannot accidentally cause us to act on an
incorrect file.
* src/qemu/qemu_monitor.h (qemuMonitorDiskNameLookup): New
prototype.
* src/qemu/qemu_monitor_json.h (qemuMonitorJSONDiskNameLookup):
Likewise.
* src/qemu/qemu_monitor.c (qemuMonitorDiskNameLookup): New function.
* src/qemu/qemu_monitor_json.c (qemuMonitorJSONDiskNameLookup)
(qemuMonitorJSONDiskNameLookupOne): Likewise.
* src/qemu/qemu_driver.c (qemuDomainBlockCommit)
(qemuDomainBlockJobImpl): Use it.
Signed-off-by: Eric Blake <eblake(a)redhat.com>
---
v3: better sanity checks in qemu_monitor_json, rebase
and retested atop Peter's fixes for interlocking block jobs
src/qemu/qemu_driver.c | 28 ++++++------
src/qemu/qemu_monitor.c | 20 ++++++++-
src/qemu/qemu_monitor.h | 8 +++-
src/qemu/qemu_monitor_json.c | 102 ++++++++++++++++++++++++++++++++++++++++++-
src/qemu/qemu_monitor_json.h | 9 +++-
5 files changed, 149 insertions(+), 18 deletions(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index f4b8dab..9129531 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -16283,9 +16283,6 @@ qemuDomainBlockJobImpl(virDomainObjPtr vm,
goto endjob;
if (baseSource) {
- if (qemuGetDriveSourceString(baseSource, NULL, &basePath) < 0)
- goto endjob;
-
if (flags & VIR_DOMAIN_BLOCK_REBASE_RELATIVE) {
if (!virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_CHANGE_BACKING_FILE)) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
@@ -16323,8 +16320,12 @@ qemuDomainBlockJobImpl(virDomainObjPtr vm,
}
qemuDomainObjEnterMonitor(driver, vm);
- ret = qemuMonitorBlockJob(priv->mon, device, basePath, backingPath,
- speed, mode, async);
+ if (baseSource)
+ basePath = qemuMonitorDiskNameLookup(priv->mon, device, disk->src,
+ baseSource);
+ if (!baseSource || basePath)
+ ret = qemuMonitorBlockJob(priv->mon, device, basePath, backingPath,
+ speed, mode, async);
if (qemuDomainObjExitMonitor(driver, vm) < 0)
ret = -1;
if (ret < 0) {
@@ -17050,12 +17051,6 @@ qemuDomainBlockCommit(virDomainPtr dom,
VIR_DISK_CHAIN_READ_WRITE) < 0))
goto endjob;
- if (qemuGetDriveSourceString(topSource, NULL, &topPath) < 0)
- goto endjob;
-
- if (qemuGetDriveSourceString(baseSource, NULL, &basePath) < 0)
- goto endjob;
-
if (flags & VIR_DOMAIN_BLOCK_COMMIT_RELATIVE &&
topSource != disk->src) {
if (!virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_CHANGE_BACKING_FILE)) {
@@ -17086,9 +17081,14 @@ qemuDomainBlockCommit(virDomainPtr dom,
disk->mirrorJob = VIR_DOMAIN_BLOCK_JOB_TYPE_ACTIVE_COMMIT;
}
qemuDomainObjEnterMonitor(driver, vm);
- ret = qemuMonitorBlockCommit(priv->mon, device,
- topPath, basePath, backingPath,
- speed);
+ basePath = qemuMonitorDiskNameLookup(priv->mon, device, disk->src,
+ baseSource);
+ topPath = qemuMonitorDiskNameLookup(priv->mon, device, disk->src,
+ topSource);
+ if (basePath && topPath)
+ ret = qemuMonitorBlockCommit(priv->mon, device,
+ topPath, basePath, backingPath,
+ speed);
if (qemuDomainObjExitMonitor(driver, vm) < 0) {
ret = -1;
goto endjob;
diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c
index d869a72..cf7dc5e 100644
--- a/src/qemu/qemu_monitor.c
+++ b/src/qemu/qemu_monitor.c
@@ -1,7 +1,7 @@
/*
* qemu_monitor.c: interaction with QEMU monitor console
*
- * Copyright (C) 2006-2014 Red Hat, Inc.
+ * Copyright (C) 2006-2015 Red Hat, Inc.
* Copyright (C) 2006 Daniel P. Berrange
*
* This library is free software; you can redistribute it and/or
@@ -3458,6 +3458,24 @@ qemuMonitorSupportsActiveCommit(qemuMonitorPtr mon)
}
+/* Determine the name that qemu is using for tracking the backing
+ * element TARGET within the chain starting at TOP. */
+char *
+qemuMonitorDiskNameLookup(qemuMonitorPtr mon,
+ const char *device,
+ virStorageSourcePtr top,
+ virStorageSourcePtr target)
+{
+ if (!mon->json) {
+ virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
+ _("JSON monitor is required"));
+ return NULL;
+ }
+
+ return qemuMonitorJSONDiskNameLookup(mon, device, top, target);
+}
+
+
/* Use the block-job-complete monitor command to pivot a block copy
* job. */
int
diff --git a/src/qemu/qemu_monitor.h b/src/qemu/qemu_monitor.h
index b30da34..e67d800 100644
--- a/src/qemu/qemu_monitor.h
+++ b/src/qemu/qemu_monitor.h
@@ -1,7 +1,7 @@
/*
* qemu_monitor.h: interaction with QEMU monitor console
*
- * Copyright (C) 2006-2014 Red Hat, Inc.
+ * Copyright (C) 2006-2015 Red Hat, Inc.
* Copyright (C) 2006 Daniel P. Berrange
*
* This library is free software; you can redistribute it and/or
@@ -734,6 +734,12 @@ int qemuMonitorBlockCommit(qemuMonitorPtr mon,
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3)
ATTRIBUTE_NONNULL(4);
bool qemuMonitorSupportsActiveCommit(qemuMonitorPtr mon);
+char *qemuMonitorDiskNameLookup(qemuMonitorPtr mon,
+ const char *device,
+ virStorageSourcePtr top,
+ virStorageSourcePtr target)
+ ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3)
+ ATTRIBUTE_NONNULL(4);
int qemuMonitorArbitraryCommand(qemuMonitorPtr mon,
const char *cmd,
diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c
index c16f3ca..8994d5a 100644
--- a/src/qemu/qemu_monitor_json.c
+++ b/src/qemu/qemu_monitor_json.c
@@ -1,7 +1,7 @@
/*
* qemu_monitor_json.c: interaction with QEMU monitor console
*
- * Copyright (C) 2006-2014 Red Hat, Inc.
+ * Copyright (C) 2006-2015 Red Hat, Inc.
* Copyright (C) 2006 Daniel P. Berrange
*
* This library is free software; you can redistribute it and/or
@@ -3883,6 +3883,106 @@ qemuMonitorJSONDrivePivot(qemuMonitorPtr mon, const char *device,
}
+static char *
+qemuMonitorJSONDiskNameLookupOne(virJSONValuePtr image,
+ virStorageSourcePtr top,
+ virStorageSourcePtr target)
+{
+ virJSONValuePtr backing;
+ char *ret;
+
+ /* The caller will report a generic message if we return NULL
+ * without an error; but in some cases we can improve by reporting
+ * a more specific message. */
+ if (!top || !image)
+ return NULL;
+ if (top != target) {
+ backing = virJSONValueObjectGet(image, "backing-image");
+ return qemuMonitorJSONDiskNameLookupOne(backing, top->backingStore,
+ target);
+ }
+ if (VIR_STRDUP(ret, virJSONValueObjectGetString(image, "filename")) < 0)
+ return NULL;
+ /* Sanity check - the name qemu gave us should resolve to the same
+ file tracked by our target description. */
+ if (virStorageSourceIsLocalStorage(target) &&
+ STRNEQ(ret, target->path) &&
+ !virFileLinkPointsTo(ret, target->path)) {
+ virReportError(VIR_ERR_INTERNAL_ERROR,
+ _("qemu block name '%s' doesn't match expected '%s'"),
+ ret, target->path);
+ VIR_FREE(ret);
+ }
+ return ret;
+}
+
+
+char *
+qemuMonitorJSONDiskNameLookup(qemuMonitorPtr mon,
+ const char *device,
+ virStorageSourcePtr top,
+ virStorageSourcePtr target)
+{
+ char *ret = NULL;
+ virJSONValuePtr cmd = NULL;
+ virJSONValuePtr reply = NULL;
+ virJSONValuePtr devices;
+ size_t i;
+
+ cmd = qemuMonitorJSONMakeCommand("query-block", NULL);
+ if (!cmd)
+ return NULL;
+ if (qemuMonitorJSONCommand(mon, cmd, &reply) < 0)
+ goto cleanup;
+
+ devices = virJSONValueObjectGet(reply, "return");
+ if (!devices || devices->type != VIR_JSON_TYPE_ARRAY) {
+ virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("block info reply was missing device list"));
+ goto cleanup;
+ }
+
+ for (i = 0; i < virJSONValueArraySize(devices); i++) {
+ virJSONValuePtr dev = virJSONValueArrayGet(devices, i);
+ virJSONValuePtr inserted;
+ virJSONValuePtr image;
+ const char *thisdev;
+
+ if (!dev || dev->type != VIR_JSON_TYPE_OBJECT) {
+ virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("block info device entry was not in expected format"));
+ goto cleanup;
+ }
+
+ if (!(thisdev = virJSONValueObjectGetString(dev, "device"))) {
+ virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("block info device entry was not in expected format"));
+ goto cleanup;
+ }
+
+ if (STREQ(thisdev, device)) {
+ if ((inserted = virJSONValueObjectGet(dev, "inserted")) &&
+ (image = virJSONValueObjectGet(inserted, "image"))) {
+ ret = qemuMonitorJSONDiskNameLookupOne(image, top, target);
+ }
+ break;
+ }
+ }
+ /* Guarantee an error when returning NULL, but don't override a
+ * more specific error if one was already generated. */
+ if (!ret && !virGetLastError())
+ virReportError(VIR_ERR_INTERNAL_ERROR,
+ _("unable to find backing name for device %s"),
+ device);
+
+ cleanup:
+ virJSONValueFree(cmd);
+ virJSONValueFree(reply);
+
+ return ret;
+}
+
+
int qemuMonitorJSONArbitraryCommand(qemuMonitorPtr mon,
const char *cmd_str,
char **reply_str,
diff --git a/src/qemu/qemu_monitor_json.h b/src/qemu/qemu_monitor_json.h
index 8ceea8a..49392b6 100644
--- a/src/qemu/qemu_monitor_json.h
+++ b/src/qemu/qemu_monitor_json.h
@@ -1,7 +1,7 @@
/*
* qemu_monitor_json.h: interaction with QEMU monitor console
*
- * Copyright (C) 2006-2009, 2011-2014 Red Hat, Inc.
+ * Copyright (C) 2006-2009, 2011-2015 Red Hat, Inc.
* Copyright (C) 2006 Daniel P. Berrange
*
* This library is free software; you can redistribute it and/or
@@ -277,6 +277,13 @@ int qemuMonitorJSONBlockCommit(qemuMonitorPtr mon,
unsigned long long bandwidth)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
+char *qemuMonitorJSONDiskNameLookup(qemuMonitorPtr mon,
+ const char *device,
+ virStorageSourcePtr top,
+ virStorageSourcePtr target)
+ ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3)
+ ATTRIBUTE_NONNULL(4);
+
int qemuMonitorJSONArbitraryCommand(qemuMonitorPtr mon,
const char *cmd_str,
char **reply_str,
--
2.1.0
9 years, 8 months
[libvirt] [PATCH 0/5] Couple of virDomainInterfaceAddresses fixes
by Michal Privoznik
While testing the new API I've noticed some leaks and other
errors. The very first patch changes the RPC protocol, but hey -
on an unreleased procedure yet!
Michal Privoznik (5):
RPC: Allow HW address in remote_domain_interface struct to be NULL
virsh: Adapt to new HW address scenario
qemuAgentGetInterfaces: Don't error out on missing HW address
cmdDomIfAddr: Free @ip_addr_str
qemuGetDHCPInterfaces: Don't leak @network
daemon/remote.c | 5 ++++-
include/libvirt/libvirt-domain.h | 2 +-
src/libvirt-domain.c | 3 ++-
src/qemu/qemu_agent.c | 7 -------
src/qemu/qemu_driver.c | 6 +++++-
src/remote/remote_driver.c | 3 ++-
src/remote/remote_protocol.x | 2 +-
src/remote_protocol-structs | 2 +-
tools/virsh-domain-monitor.c | 11 +++++++----
9 files changed, 23 insertions(+), 18 deletions(-)
--
2.0.5
9 years, 8 months
[libvirt] [PATCH] Add support for Midonet virtual ports
by Antoni Segura Puimedon
Up until now, to plug VMs into the Midonet virtual networks it was
necessary to use the 'last resort' 'ethernet' type. That implied
having the domain tainted and having to deal witht the tap lifecycle
outside of libvirt/VM lifecycle.
With the patch I submit, a new virtualport type will be accepted by
libvirt that will always require an interfaceid (as it is essential
for binding a tap device to a virtual port that the virtual port
itself exists and has a UUID). With that interfaceid, libvirt will
delegate the binding on the Midonet userspace tools.
Antoni Segura Puimedon (1):
Add support for the midonet virtualport type
configure.ac | 4 ++
docs/schemas/networkcommon.rng | 12 +++++
src/Makefile.am | 1 +
src/conf/domain_conf.h | 1 +
src/conf/netdev_vport_profile_conf.c | 3 +-
src/libvirt_private.syms | 5 ++
src/qemu/qemu_hotplug.c | 25 +++++++---
src/qemu/qemu_process.c | 13 +++--
src/util/virnetdevmidonet.c | 97 ++++++++++++++++++++++++++++++++++++
src/util/virnetdevmidonet.h | 37 ++++++++++++++
src/util/virnetdevtap.c | 11 ++--
src/util/virnetdevvportprofile.c | 1 +
src/util/virnetdevvportprofile.h | 5 +-
13 files changed, 197 insertions(+), 18 deletions(-)
create mode 100644 src/util/virnetdevmidonet.c
create mode 100644 src/util/virnetdevmidonet.h
--
2.3.0
9 years, 8 months
[libvirt] [PATCH 0/7] Fix ejecting of network backed cdroms via virsh
by Peter Krempa
It turned out that not only virsh was broken ...
Peter Krempa (7):
virsh: domain: Don't use vshPrepareDiskXML for creating XML to detach
disk
virsh: domain: Add --print-xml flag for command change-media
virsh: domain: Fix the change-media command
qemu: hotplug: Use checker function to check if disk is empty
qemu: driver: Fix cold-update of removable storage devices
util: storage: Fix check for empty storage device
conf: disk: Simplify checking if source definition was parsed
src/conf/domain_conf.c | 12 ++--
src/qemu/qemu_driver.c | 16 ++---
src/qemu/qemu_hotplug.c | 2 +-
src/util/virstoragefile.c | 4 ++
tools/virsh-domain.c | 171 ++++++++++++++++++++++++----------------------
tools/virsh.pod | 7 +-
6 files changed, 112 insertions(+), 100 deletions(-)
--
2.2.2
9 years, 8 months
[libvirt] [PATCH v2] parallels: minor cleanup
by Maxim Nestratov
v2 change:
rebased to the current master
indentation is fixed, unnecessary error message removed,
unnecessary job freeing removed
Signed-off-by: Maxim Nestratov <mnestratov(a)parallels.com>
---
src/parallels/parallels_sdk.c | 5 +----
1 files changed, 1 insertions(+), 4 deletions(-)
diff --git a/src/parallels/parallels_sdk.c b/src/parallels/parallels_sdk.c
index ee71bd6..a0b62cd 100644
--- a/src/parallels/parallels_sdk.c
+++ b/src/parallels/parallels_sdk.c
@@ -701,7 +701,7 @@ prlsdkGetNetInfo(PRL_HANDLE netAdapter, virDomainNetDefPtr net, bool isCt)
goto cleanup;
pret = PrlVmDevNet_GetHostInterfaceName(netAdapter, net->ifname, &buflen);
- prlsdkCheckRetGoto(pret, cleanup);
+ prlsdkCheckRetGoto(pret, cleanup);
if (isCt && netAdapterIndex == (PRL_UINT32) -1) {
/* venet devices don't have mac address and
@@ -1350,7 +1350,6 @@ prlsdkLoadDomains(parallelsConnPtr privconn)
error:
PrlHandle_Free(result);
- PrlHandle_Free(job);
return -1;
}
@@ -1730,8 +1729,6 @@ prlsdkDomainChangeState(virDomainPtr domain,
pdom = dom->privateData;
pret = chstate(privconn, pdom->sdkdom);
- virReportError(VIR_ERR_OPERATION_FAILED,
- _("Can't change domain state: %d"), pret);
if (PRL_FAILED(pret)) {
virResetLastError();
--
1.7.1
9 years, 8 months
[libvirt] [PULL 13/13] migration: Expose 'cancelling' status to user
by Juan Quintela
From: zhanghailiang <zhang.zhanghailiang(a)huawei.com>
'cancelling' status was introduced by commit 51cf4c1a, mainly to avoid a
possible start of a new migration process while the previous one still exists.
But we didn't expose this status to user, instead we returned the 'active' state.
Here, we expose it to the user (such as libvirt), 'cancelling' status only
occurs for a short window before the migration aborts, so for users,
if they cancel a migration process, it will observe 'cancelling' status
occasionally.
Testing revealed that with older libvirt (anything 1.2.13 or less) will
print an odd error message if the state is seen, but that the migration
is still properly cancelled. Newer libvirt will be patched to recognize
the new state without the odd error message.
Signed-off-by: zhanghailiang <zhang.zhanghailiang(a)huawei.com>
Reviewed-by: Eric Blake <eblake(a)redhat.com>
Cc: libvir-list(a)redhat.com
Signed-off-by: Juan Quintela <quintela(a)redhat.com>
---
migration/migration.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/migration/migration.c b/migration/migration.c
index d7a1e7d..bc42490 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -195,13 +195,11 @@ MigrationInfo *qmp_query_migrate(Error **errp)
break;
case MIGRATION_STATUS_SETUP:
info->has_status = true;
- info->status = MIGRATION_STATUS_SETUP;
info->has_total_time = false;
break;
case MIGRATION_STATUS_ACTIVE:
case MIGRATION_STATUS_CANCELLING:
info->has_status = true;
- info->status = MIGRATION_STATUS_ACTIVE;
info->has_total_time = true;
info->total_time = qemu_clock_get_ms(QEMU_CLOCK_REALTIME)
- s->total_time;
@@ -237,7 +235,6 @@ MigrationInfo *qmp_query_migrate(Error **errp)
get_xbzrle_cache_stats(info);
info->has_status = true;
- info->status = MIGRATION_STATUS_COMPLETED;
info->has_total_time = true;
info->total_time = s->total_time;
info->has_downtime = true;
@@ -259,13 +256,12 @@ MigrationInfo *qmp_query_migrate(Error **errp)
break;
case MIGRATION_STATUS_FAILED:
info->has_status = true;
- info->status = MIGRATION_STATUS_FAILED;
break;
case MIGRATION_STATUS_CANCELLED:
info->has_status = true;
- info->status = MIGRATION_STATUS_CANCELLED;
break;
}
+ info->status = s->state;
return info;
}
--
2.1.0
9 years, 8 months
[libvirt] [PATCH v2 0/4] parallels: fixes and cleanups
by Maxim Nestratov
From: Maxim Nestratov <mnestratov(a)parallels.com>
v2 change:
- rebased
Maxim Nestratov (3):
parallels: don't forget to unlock domain if unregister fails
parallels: fix home directory for VMs
parallels: minor cleanup
Mikhail Feoktistov (1):
parallels: set cpu mode when applying xml configuration
9 years, 8 months
[libvirt] [PATCH 0/6] parallels: implement managed save
by Dmitry Guryanov
This patch is intended to implement all needed code, so
that suspend/resume in openstack nova will work.
It implements .domainHasManagedSaveImage, .domainManagedSave
and .domainManagedSaveRemove functions. Also it adds
workaround to parallelsDomainDefineXMLFlags to skip
applying configuration, if VM is in managed save state and
config hasn't been changed, because it's not possible
to change VM config in suspended state in PCS.
Dmitry Guryanov (6):
parallels: fix headers in parallels_sdk.h
parallels: split prlsdkDomainChangeState function
parallels: implement virDomainManagedSave
parallels: report, that cdroms are readonly
parallels: add controllers in prlsdkLoadDomain
parallels: fix virDomainDefineXML for domain in saved state
src/parallels/parallels_driver.c | 101 +++++++++++++++++++++++++++++++++++++--
src/parallels/parallels_sdk.c | 65 ++++++++++++++++++-------
src/parallels/parallels_sdk.h | 17 +++++--
3 files changed, 157 insertions(+), 26 deletions(-)
--
2.1.0
9 years, 8 months
[libvirt] [PATCH v2 0/4] Fix errors with memory balloon stats period
by Martin Kletzander
Nothing big, just some cleanup and then the fix in last patch. More
info in particular commit messages.
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1140958
v1 is here:
https://www.redhat.com/archives/libvir-list/2015-March/msg00665.html
Martin Kletzander (4):
util: Make sure the comment about virBufferAddBuffer is true
conf: Reorder elements inside memballoon
qemu: Don't duplicate errors when settings stats period
conf: Use correct type for balloon stats period
docs/formatdomain.html.in | 2 ++
docs/schemas/domaincommon.rng | 28 ++++++++--------
src/conf/domain_conf.c | 37 ++++++++++++----------
src/conf/domain_conf.h | 2 +-
src/qemu/qemu_monitor.c | 31 ++++++++++++------
src/qemu/qemu_process.c | 2 +-
src/util/virbuffer.c | 14 +++++---
.../qemuxml2xmlout-balloon-device-period.xml | 30 ++++++++++++++++++
tests/qemuxml2xmltest.c | 1 +
9 files changed, 101 insertions(+), 46 deletions(-)
create mode 100644 tests/qemuxml2xmloutdata/qemuxml2xmlout-balloon-device-period.xml
--
2.3.2
9 years, 8 months