[libvirt] [PATCH v4] Add machine parameter qemu-kvm-migration for live migrate compatibility with qemu-kvm
by Alex Bligh
This patch series adds inbound migrate capability from qemu-kvm version
1.0. The main ideas are those set out in Cole Robinson's patch here:
http://pkgs.fedoraproject.org/cgit/qemu.git/tree/0001-Fix-migration-from-...
however, rather than patching statically (and breaking inbound
migration on existing machine types), I have added a new machine
parameter (qemu-kvm-migration) which when turned on affects the pc-1.0
machine type. Usage:
-machine pc-1.0,qemu-kvm-migration=on
Three aproaches are taken:
* cirrus-vga.vgamem_mb defaults to 16 rather than 8. In order to
keep -global cirrus-vga.vgamem_mb working even with
qemu-kvm-migration=on, this is monkey-patched into the default
value of the MachineState structure's compat_props list.
* In hw/timer/i8254_common.c, the VMSTATE_UINT32_TEST macro
is used to test the version for the irq_disable flags,
allowing version 3 or more, or version 2 for an inbound
migrate from qemu-kvm (only).
* In hw/acpi/piix4.c, qemu-kvm incorrectly uses version 2 for
a version 3 structure, causing acpi_load_old to be used.
acpi_load_old detects this situation based on the machine type
and restarts the attempt to load the vmstate using a
customised VMStateDescription. The above cleaner approach is
unavailable here.
The above monkey-patching must be done between the selection of
the MachineClass and the processing of the machine parameters
(on the one hand) and the processing of the compat_props list
and the globals on the command line. To do this I have added
an earlyinit function to MachineState and QEMUMachine.
I developed this on qemu 2.0 but have forward ported it (trivially)
to master. My testing has been on a VM live-migrated-to-file from
Ubuntu Precise qemu-kvm 1.0.
I have given this a moderate degree of testing but it could do
with more.
Note that certain hardware devices (including QXL) will not
migrate properly due to a fundamental difference in their internal
state between versions.
Also note that (as expected) migration from qemu-2.x to qemu-1.0
will not work, even if the machine types are the same.
Changes since v1:
* Do not use a machine type, use a machine parameter.
Alex Bligh (1):
Add machine parameter qemu-kvm-migration for live migrate
compatibility with qemu-kvm
hw/acpi/piix4.c | 47 +++++++++++++++++++++++++++++++++++++++++++++--
hw/core/machine.c | 16 ++++++++++++++++
hw/i386/pc.c | 1 +
hw/i386/pc_piix.c | 25 +++++++++++++++++++++++++
hw/timer/i8254_common.c | 11 ++++++++++-
include/hw/boards.h | 7 +++++++
vl.c | 7 +++++++
7 files changed, 111 insertions(+), 3 deletions(-)
--
1.7.9.5
10 years, 1 month
[libvirt] [PATCH] Add machine type pc-1.0-qemu-kvm for live migrate compatibility with qemu-kvm
by Alex Bligh
Add a machine type pc-1.0-qemu-kvm for live migrate compatibility
with qemu-kvm version 1.0.
This patch adds inbound migrate capability from qemu-kvm version
1.0. The main ideas are those set out in Cole Robinson's patch here:
http://pkgs.fedoraproject.org/cgit/qemu.git/tree/0001-Fix-migration-from-...
however, rather than patching statically (and breaking inbound
migration on existing machine types), I have added a new machine
type (pc-1.0-qemu-kvm) without affecting any other machine types.
The existing pc-1.0 machine type is renamed to pc-1.0-qemu-git,
with pc-1.0 becoming an alias for one or another, as selected
by a configure option (defaulting to pc-1.0-qemu-git, IE no
change).
Two aproaches are taken:
* In hw/timer/i8254_common.c, the VMSTATE_UINT32_TEST macro
is used to test the version for the irq_disable flags,
allowing version 3 or more, or version 2 for an inbound
migrate from qemu-kvm (only).
* In hw/acpi/piix4.c, qemu-kvm incorrectly uses version 2 for
a version 3 structure, causing acpi_load_old to be used.
acpi_load_old detects this situation based on the machine type
and restarts the attempt to load the vmstate using a
customised VMStateDescription. The above cleaner approach is
unavailable here.
I developed this on qemu 2.0 but have forward ported it (trivially)
to master. My testing has been on a VM live-migrated-to-file from
Ubuntu Precise qemu-kvm 1.0.
I have given this a moderate degree of testing but it could do
with more.
Note that certain hardware devices (including QXL) will not
migrate properly due to a fundamental difference in their internal
state between versions.
Also note that (as expected) migration from qemu-2.x to qemu-1.0
will not work, even if the machine types are the same.
Changes from v4
* Revert to using a machine type, but do not add alias machine types,
configure options, or (potentially) change the meaning of
pc-1.0 - leave this for distributions to ponder
* Add compat_props for qemu-kvm-migration to the PIIX4_PM driver
and the i8259 pit-common driver.
Signed-off-by: Alex Bligh <alex(a)alex.org.uk>
---
hw/acpi/piix4.c | 26 +++++++++++++++++++++++---
hw/i386/pc_piix.c | 27 +++++++++++++++++++++++++++
hw/timer/i8254_common.c | 18 +++++++++++++++++-
include/hw/i386/pc.h | 8 ++++++++
include/hw/timer/i8254_internal.h | 1 +
5 files changed, 76 insertions(+), 4 deletions(-)
diff --git a/hw/acpi/piix4.c b/hw/acpi/piix4.c
index b72b34e..5c68d69 100644
--- a/hw/acpi/piix4.c
+++ b/hw/acpi/piix4.c
@@ -86,6 +86,8 @@ typedef struct PIIX4PMState {
Notifier cpu_added_notifier;
MemHotplugState acpi_memory_hotplug;
+
+ bool qemu_kvm_migration;
} PIIX4PMState;
#define TYPE_PIIX4_PM "PIIX4_PM"
@@ -200,12 +202,26 @@ static const VMStateDescription vmstate_pci_status = {
}
};
+static const VMStateDescription vmstate_acpi;
+
static int acpi_load_old(QEMUFile *f, void *opaque, int version_id)
{
PIIX4PMState *s = opaque;
int ret, i;
uint16_t temp;
+ /* If we are expecting the inbound migration to come from
+ * qemu-kvm 1.0, it will have a version_id of 2 but really
+ * be version 3, so call back the original vmstate_load_state
+ * with a different more tolerant vmstate descriptor
+ */
+ if (version_id == 2 && s->qemu_kvm_migration) {
+ VMStateDescription vmstate_acpi_compat = vmstate_acpi;
+ vmstate_acpi_compat.minimum_version_id = 2;
+ return vmstate_load_state(f, &vmstate_acpi_compat,
+ opaque, version_id);
+ }
+
ret = pci_device_load(PCI_DEVICE(s), f);
if (ret < 0) {
return ret;
@@ -267,9 +283,11 @@ static const VMStateDescription vmstate_memhp_state = {
};
/* qemu-kvm 1.2 uses version 3 but advertised as 2
- * To support incoming qemu-kvm 1.2 migration, change version_id
- * and minimum_version_id to 2 below (which breaks migration from
- * qemu 1.2).
+ * To support incoming qemu-kvm 1.2 migration, we support
+ * via a command line option a change to minimum_version_id
+ * of 2 in a _compat structure; we can't do this all the time
+ * as using a minimum_version_id of 2 (rather than 3) would
+ * break migration from qemu-git 1.2.
*
*/
static const VMStateDescription vmstate_acpi = {
@@ -589,6 +607,8 @@ static Property piix4_pm_properties[] = {
use_acpi_pci_hotplug, true),
DEFINE_PROP_BOOL("memory-hotplug-support", PIIX4PMState,
acpi_memory_hotplug.is_enabled, true),
+ DEFINE_PROP_BOOL("qemu-kvm-migration", PIIX4PMState,
+ qemu_kvm_migration, false),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index 7081c08..56555c1 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -644,6 +644,32 @@ static QEMUMachine pc_machine_v1_0 = {
.hw_version = "1.0",
};
+#define PC_COMPAT_1_0_QEMU_KVM \
+ PC_COMPAT_1_0,\
+ {\
+ .driver = "cirrus-vga",\
+ .property = "vgamem_mb",\
+ .value = stringify(16),\
+ },{\
+ .driver = "pit-common",\
+ .property = "qemu-kvm-migration",\
+ .value = "on",\
+ },{\
+ .driver = "PIIX4_PM",\
+ .property = "qemu-kvm-migration",\
+ .value = "on",\
+ }
+
+static QEMUMachine pc_machine_v1_0_qemu_kvm = {
+ PC_I440FX_1_2_MACHINE_OPTIONS,
+ .name = "pc-1.0-qemu-kvm",
+ .compat_props = (GlobalProperty[]) {
+ PC_COMPAT_1_0_QEMU_KVM,
+ { /* end of list */ }
+ },
+ .hw_version = "1.0",
+};
+
#define PC_COMPAT_0_15 \
PC_COMPAT_1_0
@@ -886,6 +912,7 @@ static void pc_machine_init(void)
qemu_register_pc_machine(&pc_machine_v1_2);
qemu_register_pc_machine(&pc_machine_v1_1);
qemu_register_pc_machine(&pc_machine_v1_0);
+ qemu_register_pc_machine(&pc_machine_v1_0_qemu_kvm);
qemu_register_pc_machine(&pc_machine_v0_15);
qemu_register_pc_machine(&pc_machine_v0_14);
qemu_register_pc_machine(&pc_machine_v0_13);
diff --git a/hw/timer/i8254_common.c b/hw/timer/i8254_common.c
index 07345f6..7f3e4e3 100644
--- a/hw/timer/i8254_common.c
+++ b/hw/timer/i8254_common.c
@@ -257,6 +257,14 @@ static int pit_dispatch_post_load(void *opaque, int version_id)
return 0;
}
+static bool has_irq_disabled(void *opaque, int version_id)
+{
+ PITCommonState *s = opaque;
+ return (version_id >= 3) ||
+ (version_id == 2 &&
+ s->qemu_kvm_migration);
+}
+
static const VMStateDescription vmstate_pit_common = {
.name = "i8254",
.version_id = 3,
@@ -266,7 +274,8 @@ static const VMStateDescription vmstate_pit_common = {
.pre_save = pit_dispatch_pre_save,
.post_load = pit_dispatch_post_load,
.fields = (VMStateField[]) {
- VMSTATE_UINT32_V(channels[0].irq_disabled, PITCommonState, 3),
+ VMSTATE_UINT32_TEST(channels[0].irq_disabled, PITCommonState,
+ has_irq_disabled),
VMSTATE_STRUCT_ARRAY(channels, PITCommonState, 3, 2,
vmstate_pit_channel, PITChannelState),
VMSTATE_INT64(channels[0].next_transition_time,
@@ -275,6 +284,12 @@ static const VMStateDescription vmstate_pit_common = {
}
};
+static Property pit_common_properties[] = {
+ DEFINE_PROP_BOOL("qemu-kvm-migration", PITCommonState,
+ qemu_kvm_migration, false),
+ DEFINE_PROP_END_OF_LIST(),
+};
+
static void pit_common_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
@@ -287,6 +302,7 @@ static void pit_common_class_init(ObjectClass *klass, void *data)
* done by board code.
*/
dc->cannot_instantiate_with_device_add_yet = true;
+ dc->props = pit_common_properties;
}
static const TypeInfo pit_common_type = {
diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
index 1c0c382..e420dbc 100644
--- a/include/hw/i386/pc.h
+++ b/include/hw/i386/pc.h
@@ -346,6 +346,14 @@ bool e820_get_entry(int, uint32_t, uint64_t *, uint64_t *);
.driver = "ioh3420",\
.property = COMPAT_PROP_PCP,\
.value = "off",\
+ },{\
+ .driver = "pit-common",\
+ .property = "qemu-kvm-migration",\
+ .value = "off",\
+ },{\
+ .driver = "PIIX4_PM",\
+ .property = "qemu-kvm-migration",\
+ .value = "off",\
}
#define PC_COMPAT_1_7 \
diff --git a/include/hw/timer/i8254_internal.h b/include/hw/timer/i8254_internal.h
index 61a1bfb..5f7ee36 100644
--- a/include/hw/timer/i8254_internal.h
+++ b/include/hw/timer/i8254_internal.h
@@ -55,6 +55,7 @@ typedef struct PITCommonState {
MemoryRegion ioports;
uint32_t iobase;
PITChannelState channels[3];
+ bool qemu_kvm_migration;
} PITCommonState;
#define TYPE_PIT_COMMON "pit-common"
--
1.7.9.5
10 years, 1 month
[libvirt] [PATCH] minor shmem clean-ups
by Martin Kletzander
Signed-off-by: Martin Kletzander <mkletzan(a)redhat.com>
---
Notes:
Pushed as trivial.
This was pointed out by Eric in the shmem series after I've pushed it.
docs/formatdomain.html.in | 2 +-
src/conf/domain_conf.c | 5 ++---
src/qemu/qemu_command.c | 5 ++---
3 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
index 8e50b8c..45b0f61 100644
--- a/docs/formatdomain.html.in
+++ b/docs/formatdomain.html.in
@@ -5587,7 +5587,7 @@ qemu-kvm -net nic,model=? /dev/null
<p>
A shared memory device allows to share a memory region between
different virtual machines and the host.
- <span class="since">Since 1.2.9, QEMU and KVM only</span>
+ <span class="since">Since 1.2.10, QEMU and KVM only</span>
</p>
<pre>
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 6c07ed6..a9c6f05 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -17603,7 +17603,7 @@ virDomainShmemDefFormat(virBufferPtr buf,
virDomainShmemDefPtr def,
unsigned int flags)
{
- virBufferAsprintf(buf, "<shmem name='%s'", def->name);
+ virBufferEscapeString(buf, "<shmem name='%s'", def->name);
if (!def->size &&
!def->server.enabled &&
@@ -17618,8 +17618,7 @@ virDomainShmemDefFormat(virBufferPtr buf,
virBufferAdjustIndent(buf, 2);
if (def->size)
- virBufferAsprintf(buf, "<size unit='M'>%llu</size>\n",
- VIR_DIV_UP(def->size, 1024 * 1024));
+ virBufferAsprintf(buf, "<size unit='M'>%llu</size>\n", def->size >> 20);
if (def->server.enabled) {
virBufferAddLit(buf, "<server");
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 6c22630..8cb0865 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -7549,7 +7549,7 @@ qemuBuildShmemDevCmd(virCommandPtr cmd,
/*
* Thanks to our parsing code, we have a guarantee that the
* size is power of two and is at least a mebibyte in size.
- * But because it may change inthe future, the checks are
+ * But because it may change in the future, the checks are
* doubled in here.
*/
if (shmem->size & (shmem->size - 1)) {
@@ -7562,8 +7562,7 @@ qemuBuildShmemDevCmd(virCommandPtr cmd,
_("shmem size must be at least 1 MiB"));
goto error;
}
- virBufferAsprintf(&buf, ",size=%llum",
- VIR_DIV_UP(shmem->size, 1024 * 1024));
+ virBufferAsprintf(&buf, ",size=%llum", shmem->size >> 20);
}
if (!shmem->server.enabled) {
--
2.1.2
10 years, 1 month
[libvirt] [PATCH] qemu: support nospace reason in io error event
by Eric Blake
Aeons ago (commit 34dcbbb4, v0.8.2), we added a new libvirt event
(VIR_DOMAIN_EVENT_ID_IO_ERROR_REASON) in order to tell the user WHY
the guest halted. This is because at least VDSM wants to react
differently to ENOSPC events (resize the lvm partition to be larger,
and resume the guest as if nothing had happened) from all other events
(I/O is hosed, throw up our hands and flag things as broken). At the
time this was done, downstream RHEL qemu added a vendor extension
'__com.redhat_reason', which would be exactly one of these strings:
"enospc", "eperm", "eio", and "eother". In our stupidity, we exposed
those exact strings to clients, rather than an enum, and we also
return "" if we did not have access to a reason (which was the case
for upstream qemu).
Fast forward to now: upstream qemu commit c7c2ff0c (will be qemu 2.2)
FINALLY adds a 'nospace' boolean, after discussion with multiple
projects determined that VDSM really doesn't care about distinction
between any other error types. So this patch converts 'nospace' into
the string "enospc" for compatibility with RHEL clients that were
already used to the downstream extension, while leaving the reason
blank for all other cases (no change from the status quo).
See also https://bugzilla.redhat.com/show_bug.cgi?id=1119784
* src/qemu/qemu_monitor_json.c (qewmuMonitorJSONHandleIOError):
Parse reason field from modern qemu.
* include/libvirt/libvirt.h.in
(virConnectDomainEventIOErrorReasonCallback): Document it.
Signed-off-by: Eric Blake <eblake(a)redhat.com>
---
include/libvirt/libvirt.h.in | 6 ++++++
src/qemu/qemu_monitor_json.c | 16 ++++++----------
2 files changed, 12 insertions(+), 10 deletions(-)
diff --git a/include/libvirt/libvirt.h.in b/include/libvirt/libvirt.h.in
index c9018c0..c910b31 100644
--- a/include/libvirt/libvirt.h.in
+++ b/include/libvirt/libvirt.h.in
@@ -4884,6 +4884,12 @@ typedef void (*virConnectDomainEventIOErrorCallback)(virConnectPtr conn,
* The callback signature to use when registering for an event of type
* VIR_DOMAIN_EVENT_ID_IO_ERROR_REASON with virConnectDomainEventRegisterAny()
*
+ * If the I/O error is known to be caused by an ENOSPC condition in
+ * the host (where resizing the disk to be larger will allow the guest
+ * to be resumed as if nothing happened), @reason will be "enospc".
+ * Otherwise, @reason will be "", although future strings may be added
+ * if determination of other error types becomes possible.
+ *
*/
typedef void (*virConnectDomainEventIOErrorReasonCallback)(virConnectPtr conn,
virDomainPtr dom,
diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c
index 90a125f..6504d15 100644
--- a/src/qemu/qemu_monitor_json.c
+++ b/src/qemu/qemu_monitor_json.c
@@ -739,11 +739,13 @@ VIR_ENUM_IMPL(qemuMonitorIOErrorAction, VIR_DOMAIN_EVENT_IO_ERROR_LAST,
"ignore", "stop", "report");
-static void qemuMonitorJSONHandleIOError(qemuMonitorPtr mon, virJSONValuePtr data)
+static void
+qemuMonitorJSONHandleIOError(qemuMonitorPtr mon, virJSONValuePtr data)
{
const char *device;
const char *action;
- const char *reason;
+ const char *reason = "";
+ bool nospc = false;
int actionID;
/* Throughout here we try our best to carry on upon errors,
@@ -759,14 +761,8 @@ static void qemuMonitorJSONHandleIOError(qemuMonitorPtr mon, virJSONValuePtr dat
VIR_WARN("missing device in disk io error event");
}
-#if 0
- if ((reason = virJSONValueObjectGetString(data, "reason")) == NULL) {
- VIR_WARN("missing reason in disk io error event");
- reason = "";
- }
-#else
- reason = "";
-#endif
+ if (virJSONValueObjectGetBoolean(data, "nospace", &nospc) == 0 && nospc)
+ reason = "enospc";
if ((actionID = qemuMonitorIOErrorActionTypeFromString(action)) < 0) {
VIR_WARN("unknown disk io error action '%s'", action);
--
1.9.3
10 years, 1 month
[libvirt] [PATCH] util: Prepare URI formatting for libxml2 >= 2.9.2
by Martin Kletzander
Since commit 8eb55d782a2b9afacc7938694891cc6fad7b42a5 libxml2 removes
two slashes from the URI when there is no server part. This is fixed
with beb7281055dbf0ed4d041022a67c6c5cfd126f25, but only if the calling
application calls xmlSaveUri() on URI that xmlURIParse() parsed. And
that is not the case in virURIFormat(). virURIFormat() accepts
virURIPtr that can be created without parsing it and we do that when we
format network storage paths for gluster for example. Even though
virStorageSourceParseBackingURI() uses virURIParse(), it throws that data
structure right away.
Since we want to format URIs as URIs and not absolute URIs or opaque
URIs (see RFC 3986), we can specify that with a special hack thanks to
commit beb7281055dbf0ed4d041022a67c6c5cfd126f25, by setting port to -1.
This fixes qemuxml2argvtest test where the disk-drive-network-gluster
case was failing.
Signed-off-by: Martin Kletzander <mkletzan(a)redhat.com>
---
src/util/viruri.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/util/viruri.c b/src/util/viruri.c
index 69e7649..23d86c5 100644
--- a/src/util/viruri.c
+++ b/src/util/viruri.c
@@ -254,6 +254,13 @@ virURIFormat(virURIPtr uri)
xmluri.server = tmpserver;
}
+ /*
+ * This helps libxml2 deal with the difference
+ * between uri:/absolute/path and uri:///absolute/path.
+ */
+ if (!xmluri.server && !xmluri.port)
+ xmluri.port = -1;
+
ret = (char *)xmlSaveUri(&xmluri);
if (!ret) {
virReportOOMError();
--
2.1.2
10 years, 1 month
[libvirt] [PATCH V2 0/4] Xen-xl parser
by Kiarie Kahurani
Kiarie Kahurani (4):
src/xenconfig: Export helper functions
src/xenconfig: Xen-xl parser
src/xenconfig: Introduce xen-xl on virsh command line
tests: Tests for the xen-xl parser
configure.ac | 7 +
src/Makefile.am | 21 +-
src/libvirt_xenconfig.syms | 4 +
src/libxl/libxl_driver.c | 46 +++-
src/xenconfig/libxlu_disk_i.h | 28 ++
src/xenconfig/libxlu_disk_l.l | 259 +++++++++++++++++++
src/xenconfig/xen_common.c | 147 +++++------
src/xenconfig/xen_common.h | 24 +-
src/xenconfig/xen_xl.c | 479 +++++++++++++++++++++++++++++++++++
src/xenconfig/xen_xl.h | 29 +++
tests/Makefile.am | 9 +-
tests/testutilsxen.c | 50 ++++
tests/testutilsxen.h | 9 +-
tests/xlconfigdata/test-new-disk.cfg | 27 ++
tests/xlconfigdata/test-new-disk.xml | 45 ++++
tests/xlconfigdata/test-spice.cfg | 32 +++
tests/xlconfigdata/test-spice.xml | 45 ++++
tests/xlconfigtest.c | 224 ++++++++++++++++
18 files changed, 1389 insertions(+), 96 deletions(-)
create mode 100644 src/xenconfig/libxlu_disk_i.h
create mode 100644 src/xenconfig/libxlu_disk_l.l
create mode 100644 src/xenconfig/xen_xl.c
create mode 100644 src/xenconfig/xen_xl.h
create mode 100644 tests/xlconfigdata/test-new-disk.cfg
create mode 100644 tests/xlconfigdata/test-new-disk.xml
create mode 100644 tests/xlconfigdata/test-spice.cfg
create mode 100644 tests/xlconfigdata/test-spice.xml
create mode 100644 tests/xlconfigtest.c
Changes in V1
-introduced flex for xl disk format parsing
Changes in V2
-changed ot use AC_PROG_LEX in configure.ac
-got rid of unused data files
Not done
-compile the generated file using global compiler
flags as it has unused parameters
--
1.8.4.5
10 years, 1 month
[libvirt] [PATCH v2 0/2] qemu: Fix specifying CPU model with arm on x86
by Cole Robinson
Patch 1 is a cleanup, just code movement.
Patch 2 has the goods, details in the commit message
v2:
Rebase
Generate with --diff-algorithm=patience, makes patch #1 clearer
Cole Robinson (2):
qemu_command: Split qemuBuildCpuArgStr
qemu: Don't compare CPU against host for TCG
src/qemu/qemu_command.c | 202 ++++++++++++---------
.../qemuxml2argv-aarch64-virt-default-nic.args | 3 +-
.../qemuxml2argv-aarch64-virt-default-nic.xml | 3 +
.../qemuxml2argv-aarch64-virt-virtio.args | 3 +-
.../qemuxml2argv-aarch64-virt-virtio.xml | 3 +
.../qemuxml2argvdata/qemuxml2argv-cpu-exact1.args | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-cpu-exact1.xml | 4 +-
.../qemuxml2argv-cpu-exact2-nofallback.args | 2 +-
.../qemuxml2argv-cpu-exact2-nofallback.xml | 4 +-
.../qemuxml2argvdata/qemuxml2argv-cpu-exact2.args | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-cpu-exact2.xml | 4 +-
.../qemuxml2argv-cpu-fallback.args | 2 +-
.../qemuxml2argvdata/qemuxml2argv-cpu-fallback.xml | 4 +-
.../qemuxml2argv-cpu-minimum1.args | 2 +-
.../qemuxml2argvdata/qemuxml2argv-cpu-minimum1.xml | 4 +-
.../qemuxml2argv-cpu-minimum2.args | 2 +-
.../qemuxml2argvdata/qemuxml2argv-cpu-minimum2.xml | 4 +-
.../qemuxml2argv-cpu-nofallback.xml | 2 +-
.../qemuxml2argvdata/qemuxml2argv-cpu-strict1.args | 2 +-
.../qemuxml2argvdata/qemuxml2argv-cpu-strict1.xml | 4 +-
.../qemuxml2argv-graphics-spice-timeout.args | 2 +-
.../qemuxml2argv-graphics-spice-timeout.xml | 4 +-
.../qemuxml2argv-pseries-cpu-exact.args | 4 +-
tests/qemuxml2argvtest.c | 21 ++-
.../qemuxml2xmlout-graphics-spice-timeout.xml | 4 +-
25 files changed, 166 insertions(+), 127 deletions(-)
--
2.1.0
10 years, 1 month
[libvirt] [PATCH] configure: improve misleading libnl3-devel missing error message
by Shanzhi Yu
When build libvirt from source with netcf-devel installed, it
will report error "libnl-devel >=3.0 is required for macvtap
support", actually it requires libnl3-devel
Signed-off-by: Shanzhi Yu <shyu(a)redhat.com>
---
configure.ac | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index 0062d5d..5b0820a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2613,7 +2613,11 @@ if test "$with_linux" = "yes"; then
[whether the netlink v1 library is available])
], [
if test "$with_macvtap" = "yes"; then
- AC_MSG_ERROR([libnl-devel >= $LIBNL_REQUIRED is required for macvtap support])
+ if test "$LIBNL_REQUIRED" = "3.0";then
+ AC_MSG_ERROR([libnl3-devel >= $LIBNL_REQUIRED is required for macvtap support])
+ else
+ AC_MSG_ERROR([libnl-devel >= $LIBNL_REQUIRED is required for macvtap support])
+ fi
fi
])
fi
--
1.8.3.1
10 years, 1 month
[libvirt] [PATCH] qemu: Improve domainSetTime error info report
by Shanzhi Yu
check domain's status before call virQEMUCapsGet to report a accurate
error when domain is shut off
Resolve: https://bugzilla.redhat.com/show_bug.cgi?id=1147847
Signed-off-by: Shanzhi Yu <shyu(a)redhat.com>
---
src/qemu/qemu_driver.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index e873d45..da492d7 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -17360,13 +17360,6 @@ qemuDomainSetTime(virDomainPtr dom,
priv = vm->privateData;
- if (!virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_RTC_RESET_REINJECTION)) {
- virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
- _("cannot set time: qemu doesn't support "
- "rtc-reset-reinjection command"));
- goto cleanup;
- }
-
if (qemuDomainObjBeginJob(driver, vm, QEMU_JOB_MODIFY) < 0)
goto cleanup;
@@ -17376,6 +17369,13 @@ qemuDomainSetTime(virDomainPtr dom,
goto endjob;
}
+ if (!virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_RTC_RESET_REINJECTION)) {
+ virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
+ _("cannot set time: qemu doesn't support "
+ "rtc-reset-reinjection command"));
+ goto endjob;
+ }
+
if (!qemuDomainAgentAvailable(priv, true))
goto endjob;
--
1.9.3
10 years, 1 month
[libvirt] [PATCHv2 0/2] Fix updating domain live XML
by Erik Skultety
Erik Skultety (2):
qemu: Fix updating bandwidth limits in live XML
qemu: Fix updating balloon period in live XML
src/qemu/qemu_driver.c | 19 ++++++++++++++++++-
1 file changed, 18 insertions(+), 1 deletion(-)
--
1.9.3
10 years, 1 month