[libvirt] [PATCH 0/2] esx: Add libcurl based stream driver and implement virDomainScreenshot
by Matthias Bolte
I had the code in these two patches bascially sitting around since 2012,
yes 2012! But I never managed to get the code properly split into patches
and touched up good enough to post it here. This was also hindered by the
fact that I had no ESX test system at hand for the last year or so.
Dawid Zamirski posted some patches [1] to implement virDomainScreenshot
for ESX. So I finally managed to set up some ESX test system again this
weekend and get my old code dusted up. His implementation has two
disadvantages, namely storing the screenshot to a temporary file before
feeding it to a stream and the method of creating the screenshot itself
is availalbe since ESX 4.0 only.
My implementation direcly feeds the screenshot data to a stream and
screenshot creation uses a method available since ESX 2.5.
[1] https://www.redhat.com/archives/libvir-list/2014-March/msg01786.html
10 years, 1 month
[libvirt] [PATCH v2 0/4] Check migration configuration
by Chen Fan
add some check in migration configuration.
Chen Fan (4):
virsocketaddr: return address family in virSocketAddrIsNumeric
migration: add migration_host support for Ipv6 address without
brackets
conf: add virSocketAddrIsLocalhost to Check migration_host
conf: Check migration_address whether is localhost
src/libvirt_private.syms | 1 +
src/qemu/qemu.conf | 2 +-
src/qemu/qemu_conf.c | 15 ++++++++++++
src/qemu/qemu_migration.c | 24 ++++++++++---------
src/qemu/test_libvirtd_qemu.aug.in | 2 +-
src/util/virsocketaddr.c | 48 ++++++++++++++++++++++++++++++++++----
src/util/virsocketaddr.h | 5 +++-
tests/sockettest.c | 2 +-
8 files changed, 80 insertions(+), 19 deletions(-)
--
1.9.3
10 years, 1 month
[libvirt] [PATCH 0/4] Resolve libvirtd crash matching scsi_host
by John Ferlan
https://bugzilla.redhat.com/show_bug.cgi?id=1146837
Not for 1.2.9, but may as well get it in the queue to be reviewed for
post 1.2.9
Although possible to do in one patch - I figured it'd be easier to
review if shown in steps.
Essentially the problem is the scsi_host duplicate checks were causing
a libvirtd crash with the parentaddr/unique_id code. During my investigation
I determined that there was another lurking issue with the two ways in
which the 'name=' property is allowed to be either 'host#' or 'scsi_host#'.
John Ferlan (4):
storage_conf: Create function to perform scsi_host dupe check
storage_conf: Refactor arguments to matchSCSIAdapter
storage_conf: Fix the scsi_host.name comparison
storage_conf: Resolve libvirtd crash matching scsi_host
src/conf/storage_conf.c | 111 ++++++++++++++++++++++++++++++++++++++++++------
1 file changed, 97 insertions(+), 14 deletions(-)
--
1.9.3
10 years, 1 month
[libvirt] [PATCH v2] network: Add network bandwidth support for ethernet interfaces
by Anirban Chakraborty
V2:
Addressed comments raised in review of V1.
Consolidate calls to virNetDevBandwidthSet.
Clear bandwidth settings when the interface is detached or domain
destroyed.
V1:
Ethernet interfaces in libvirt currently do not support bandwidth setting.
For example, following xml file for an interface will not apply these
settings to corresponding qdiscs.
<interface type="ethernet">
<mac address="02:36:1d:18:2a:e4"/>
<model type="virtio"/>
<script path=""/>
<target dev="tap361d182a-e4"/>
<bandwidth>
<inbound average="984" peak="1024" burst="64"/>
<outbound average="2000" peak="2048" burst="128"/>
</bandwidth>
</interface>
Signed-off-by: Anirban Chakraborty <abchak(a)juniper.net>
---
src/lxc/lxc_process.c | 26 +++++++++++++-------------
src/network/bridge_driver.c | 7 ++++---
src/qemu/qemu_command.c | 9 ++++-----
src/qemu/qemu_driver.c | 22 +++++++++++++++++++++-
src/qemu/qemu_hotplug.c | 14 +++++++++++++-
src/util/virnetdevbandwidth.c | 23 ++++++++++++++++++++---
src/util/virnetdevbandwidth.h | 7 ++++---
src/util/virnetdevmacvlan.c | 10 ----------
src/util/virnetdevmacvlan.h | 1 -
tests/virnetdevbandwidthtest.c | 3 ++-
10 files changed, 81 insertions(+), 41 deletions(-)
diff --git a/src/lxc/lxc_process.c b/src/lxc/lxc_process.c
index ed30c37..7f7e4ad 100644
--- a/src/lxc/lxc_process.c
+++ b/src/lxc/lxc_process.c
@@ -274,11 +274,6 @@ char *virLXCProcessSetupInterfaceBridged(virConnectPtr conn,
if (virNetDevSetOnline(parentVeth, true) < 0)
goto cleanup;
- if (virNetDevBandwidthSet(net->ifname,
- virDomainNetGetActualBandwidth(net),
- false) < 0)
- goto cleanup;
-
if (net->filter &&
virDomainConfNWFilterInstantiate(conn, vm->uuid, net) < 0)
goto cleanup;
@@ -300,6 +295,7 @@ char *virLXCProcessSetupInterfaceDirect(virConnectPtr conn,
virNetDevBandwidthPtr bw;
virNetDevVPortProfilePtr prof;
virLXCDriverConfigPtr cfg = virLXCDriverGetConfig(driver);
+ const char *linkdev = virDomainNetGetActualDirectDev(net);
/* XXX how todo bandwidth controls ?
* Since the 'net-ifname' is about to be moved to a different
@@ -329,16 +325,15 @@ char *virLXCProcessSetupInterfaceDirect(virConnectPtr conn,
if (virNetDevMacVLanCreateWithVPortProfile(
net->ifname, &net->mac,
- virDomainNetGetActualDirectDev(net),
+ linkdev,
virDomainNetGetActualDirectMode(net),
false, def->uuid,
- virDomainNetGetActualVirtPortProfile(net),
+ prof,
&res_ifname,
VIR_NETDEV_VPORT_PROFILE_OP_CREATE,
cfg->stateDir,
- virDomainNetGetActualBandwidth(net), 0) < 0)
+ 0) < 0)
goto cleanup;
-
ret = res_ifname;
cleanup:
@@ -368,6 +363,7 @@ static int virLXCProcessSetupInterfaces(virConnectPtr conn,
int ret = -1;
size_t i;
size_t niface = 0;
+ int actualType;
for (i = 0; i < def->nnets; i++) {
char *veth = NULL;
@@ -381,7 +377,8 @@ static int virLXCProcessSetupInterfaces(virConnectPtr conn,
if (VIR_EXPAND_N(*veths, *nveths, 1) < 0)
goto cleanup;
- switch (virDomainNetGetActualType(def->nets[i])) {
+ actualType = virDomainNetGetActualType(def->nets[i]);
+ switch (actualType) {
case VIR_DOMAIN_NET_TYPE_NETWORK: {
virNetworkPtr network;
char *brname = NULL;
@@ -444,11 +441,14 @@ static int virLXCProcessSetupInterfaces(virConnectPtr conn,
case VIR_DOMAIN_NET_TYPE_LAST:
virReportError(VIR_ERR_INTERNAL_ERROR,
_("Unsupported network type %s"),
- virDomainNetTypeToString(
- virDomainNetGetActualType(def->nets[i])
- ));
+ virDomainNetTypeToString(actualType));
goto cleanup;
}
+ /* set network bandwidth */
+ if (virNetDevBandwidthSet(def->nets[i]->ifname,
+ virDomainNetGetActualBandwidth(def->nets[i]), false,
+ actualType) < 0)
+ goto cleanup;
(*veths)[(*nveths)-1] = veth;
diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c
index 979fb13..2e1f821 100644
--- a/src/network/bridge_driver.c
+++ b/src/network/bridge_driver.c
@@ -2082,7 +2082,8 @@ networkStartNetworkVirtual(virNetworkDriverStatePtr driver,
}
if (virNetDevBandwidthSet(network->def->bridge,
- network->def->bandwidth, true) < 0)
+ network->def->bandwidth, true,
+ VIR_DOMAIN_NET_TYPE_BRIDGE) < 0)
goto err5;
VIR_FREE(macTapIfName);
@@ -2090,7 +2091,7 @@ networkStartNetworkVirtual(virNetworkDriverStatePtr driver,
return 0;
err5:
- virNetDevBandwidthClear(network->def->bridge);
+ virNetDevBandwidthClear(network->def->bridge, VIR_DOMAIN_NET_TYPE_BRIDGE);
err4:
if (!save_err)
@@ -2137,7 +2138,7 @@ networkStartNetworkVirtual(virNetworkDriverStatePtr driver,
static int networkShutdownNetworkVirtual(virNetworkDriverStatePtr driver ATTRIBUTE_UNUSED,
virNetworkObjPtr network)
{
- virNetDevBandwidthClear(network->def->bridge);
+ virNetDevBandwidthClear(network->def->bridge, VIR_DOMAIN_NET_TYPE_BRIDGE);
if (network->radvdPid > 0) {
char *radvdpidbase;
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index eb72451..a92fb29 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -191,7 +191,6 @@ qemuPhysIfaceConnect(virDomainDefPtr def,
virDomainNetGetActualVirtPortProfile(net),
&res_ifname,
vmop, cfg->stateDir,
- virDomainNetGetActualBandwidth(net),
macvlan_create_flags);
if (rc >= 0) {
virDomainAuditNetDevice(def, net, res_ifname, true);
@@ -371,10 +370,6 @@ qemuNetworkIfaceConnect(virDomainDefPtr def,
&net->mac) < 0)
goto cleanup;
- if (virNetDevBandwidthSet(net->ifname,
- virDomainNetGetActualBandwidth(net),
- false) < 0)
- goto cleanup;
if (net->filter &&
virDomainConfNWFilterInstantiate(conn, def->uuid, net) < 0) {
@@ -7392,6 +7387,10 @@ qemuBuildInterfaceCommandLine(virCommandPtr cmd,
if (tapfd[0] < 0)
goto cleanup;
}
+ /* Set bandwidth */
+ if (virNetDevBandwidthSet(net->ifname, virDomainNetGetActualBandwidth(net),
+ false, actualType) < 0)
+ goto cleanup;
if ((actualType == VIR_DOMAIN_NET_TYPE_NETWORK ||
actualType == VIR_DOMAIN_NET_TYPE_BRIDGE ||
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 117138a..02eb680 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -186,6 +186,9 @@ qemuVMFilterRebuild(virDomainObjListIterator iter, void *data)
return virDomainObjListForEach(qemu_driver->domains, iter, data);
}
+static void
+qemuDomainClearNetBandwidth(virDomainObjPtr vm);
+
static virNWFilterCallbackDriver qemuCallbackDriver = {
.name = QEMU_DRIVER_NAME,
.vmFilterRebuild = qemuVMFilterRebuild,
@@ -2196,6 +2199,9 @@ qemuDomainDestroyFlags(virDomainPtr dom,
if (virDomainDestroyFlagsEnsureACL(dom->conn, vm->def) < 0)
goto cleanup;
+ /* Clear network bandwidth settings */
+ qemuDomainClearNetBandwidth(vm);
+
qemuDomainSetFakeReboot(driver, vm, false);
@@ -10205,7 +10211,8 @@ qemuDomainSetInterfaceParameters(virDomainPtr dom,
sizeof(*newBandwidth->out));
}
- if (virNetDevBandwidthSet(net->ifname, newBandwidth, false) < 0)
+ if (virNetDevBandwidthSet(net->ifname, newBandwidth, false,
+ virDomainNetGetActualType(net)) < 0)
goto cleanup;
virNetDevBandwidthFree(net->bandwidth);
@@ -18216,6 +18223,19 @@ qemuNodeAllocPages(virConnectPtr conn,
startCell, cellCount, add);
}
+/* Clear the bandwidth setting of all the network interfaces of a vm */
+static void
+qemuDomainClearNetBandwidth(virDomainObjPtr vm)
+{
+ size_t i;
+ int type;
+
+ for (i = 0; i < vm->def->nnets; i++) {
+ type = virDomainNetGetActualType(vm->def->nets[i]);
+ virNetDevBandwidthClear(vm->def->nets[i]->ifname, type);
+ }
+}
+
static virDriver qemuDriver = {
.no = VIR_DRV_QEMU,
diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
index d631887..4002afb 100644
--- a/src/qemu/qemu_hotplug.c
+++ b/src/qemu/qemu_hotplug.c
@@ -947,6 +947,10 @@ int qemuDomainAttachNetDevice(virConnectPtr conn,
if (qemuOpenVhostNet(vm->def, net, priv->qemuCaps, vhostfd, &vhostfdSize) < 0)
goto cleanup;
}
+ /* Set bandwidth */
+ if (virNetDevBandwidthSet(net->ifname, virDomainNetGetActualBandwidth(net),
+ false, actualType) < 0)
+ goto cleanup;
for (i = 0; i < tapfdSize; i++) {
if (virSecurityManagerSetTapFDLabel(driver->securityManager,
@@ -2214,7 +2218,7 @@ qemuDomainChangeNet(virQEMUDriverPtr driver,
if (needBandwidthSet) {
if (virNetDevBandwidthSet(newdev->ifname,
virDomainNetGetActualBandwidth(newdev),
- false) < 0)
+ false, newType) < 0)
goto cleanup;
needReplaceDevDef = true;
}
@@ -3481,6 +3485,7 @@ qemuDomainDetachNetDevice(virConnectPtr conn,
virDomainNetDefPtr detach = NULL;
qemuDomainObjPrivatePtr priv = vm->privateData;
int rc;
+ int actualType;
if ((detachidx = virDomainNetFindIdx(vm->def, dev->data.net)) < 0)
goto cleanup;
@@ -3517,6 +3522,13 @@ qemuDomainDetachNetDevice(virConnectPtr conn,
}
}
+ actualType = virDomainNetGetActualType(detach);
+ if (virNetDevBandwidthClear(detach->ifname, actualType) < 0) {
+ virReportError(VIR_ERR_OPERATION_FAILED,
+ _("cannot clear bandwidth setting for device : %s"),
+ detach->ifname);
+ goto cleanup;
+ }
qemuDomainMarkDeviceForRemoval(vm, &detach->info);
qemuDomainObjEnterMonitor(driver, vm);
diff --git a/src/util/virnetdevbandwidth.c b/src/util/virnetdevbandwidth.c
index 5fa231a..34a224e 100644
--- a/src/util/virnetdevbandwidth.c
+++ b/src/util/virnetdevbandwidth.c
@@ -27,6 +27,7 @@
#include "viralloc.h"
#include "virerror.h"
#include "virstring.h"
+#include "domain_conf.h"
#define VIR_FROM_THIS VIR_FROM_NONE
@@ -47,6 +48,7 @@ virNetDevBandwidthFree(virNetDevBandwidthPtr def)
* @ifname: on which interface
* @bandwidth: rates to set (may be NULL)
* @hierarchical_class: whether to create hierarchical class
+ * @type: interface type
*
* This function enables QoS on specified interface
* and set given traffic limits for both, incoming
@@ -60,7 +62,8 @@ virNetDevBandwidthFree(virNetDevBandwidthPtr def)
int
virNetDevBandwidthSet(const char *ifname,
virNetDevBandwidthPtr bandwidth,
- bool hierarchical_class)
+ bool hierarchical_class,
+ int type)
{
int ret = -1;
virCommandPtr cmd = NULL;
@@ -74,7 +77,14 @@ virNetDevBandwidthSet(const char *ifname,
goto cleanup;
}
- virNetDevBandwidthClear(ifname);
+ if (type != VIR_DOMAIN_NET_TYPE_ETHERNET &&
+ type != VIR_DOMAIN_NET_TYPE_BRIDGE &&
+ type != VIR_DOMAIN_NET_TYPE_NETWORK &&
+ type != VIR_DOMAIN_NET_TYPE_DIRECT)
+ /* bandwidth not set for interfaces other than the above */
+ return 0;
+
+ virNetDevBandwidthClear(ifname, type);
if (bandwidth->in && bandwidth->in->average) {
if (virAsprintf(&average, "%llukbps", bandwidth->in->average) < 0)
@@ -245,6 +255,7 @@ virNetDevBandwidthSet(const char *ifname,
/**
* virNetDevBandwidthClear:
* @ifname: on which interface
+ * @type: interface tyoe
*
* This function tries to disable QoS on specified interface
* by deleting root and ingress qdisc. However, this may fail
@@ -253,12 +264,18 @@ virNetDevBandwidthSet(const char *ifname,
* Return 0 on success, -1 otherwise.
*/
int
-virNetDevBandwidthClear(const char *ifname)
+virNetDevBandwidthClear(const char *ifname, int type)
{
int ret = 0;
int dummy; /* for ignoring the exit status */
virCommandPtr cmd = NULL;
+ if (type != VIR_DOMAIN_NET_TYPE_ETHERNET &&
+ type != VIR_DOMAIN_NET_TYPE_BRIDGE &&
+ type != VIR_DOMAIN_NET_TYPE_NETWORK &&
+ type != VIR_DOMAIN_NET_TYPE_DIRECT)
+ return ret;
+
cmd = virCommandNew(TC);
virCommandAddArgList(cmd, "qdisc", "del", "dev", ifname, "root", NULL);
diff --git a/src/util/virnetdevbandwidth.h b/src/util/virnetdevbandwidth.h
index 4606a07..cc43444 100644
--- a/src/util/virnetdevbandwidth.h
+++ b/src/util/virnetdevbandwidth.h
@@ -43,11 +43,12 @@ struct _virNetDevBandwidth {
void virNetDevBandwidthFree(virNetDevBandwidthPtr def);
-int virNetDevBandwidthSet(const char *ifname,
+int virNetDevBandwidthSet(const char *name,
virNetDevBandwidthPtr bandwidth,
- bool hierarchical_class)
+ bool hierarchical_class,
+ int type)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
-int virNetDevBandwidthClear(const char *ifname)
+int virNetDevBandwidthClear(const char *name, int type)
ATTRIBUTE_NONNULL(1);
int virNetDevBandwidthCopy(virNetDevBandwidthPtr *dest,
const virNetDevBandwidth *src)
diff --git a/src/util/virnetdevmacvlan.c b/src/util/virnetdevmacvlan.c
index c83341c..956a96b 100644
--- a/src/util/virnetdevmacvlan.c
+++ b/src/util/virnetdevmacvlan.c
@@ -811,7 +811,6 @@ int virNetDevMacVLanCreateWithVPortProfile(const char *tgifname,
char **res_ifname,
virNetDevVPortProfileOp vmOp,
char *stateDir,
- virNetDevBandwidthPtr bandwidth,
unsigned int flags)
{
const char *type = (flags & VIR_NETDEV_MACVLAN_CREATE_WITH_TAP) ?
@@ -925,14 +924,6 @@ int virNetDevMacVLanCreateWithVPortProfile(const char *tgifname,
rc = 0;
}
- if (virNetDevBandwidthSet(cr_ifname, bandwidth, false) < 0) {
- if (flags & VIR_NETDEV_MACVLAN_CREATE_WITH_TAP)
- VIR_FORCE_CLOSE(rc); /* sets rc to -1 */
- else
- rc = -1;
- goto disassociate_exit;
- }
-
if (vmOp == VIR_NETDEV_VPORT_PROFILE_OP_CREATE ||
vmOp == VIR_NETDEV_VPORT_PROFILE_OP_RESTORE) {
/* Only directly register upon a create or restore (restarting
@@ -1076,7 +1067,6 @@ int virNetDevMacVLanCreateWithVPortProfile(const char *ifname ATTRIBUTE_UNUSED,
char **res_ifname ATTRIBUTE_UNUSED,
virNetDevVPortProfileOp vmop ATTRIBUTE_UNUSED,
char *stateDir ATTRIBUTE_UNUSED,
- virNetDevBandwidthPtr bandwidth ATTRIBUTE_UNUSED,
unsigned int flags)
{
virCheckFlags(0, -1);
diff --git a/src/util/virnetdevmacvlan.h b/src/util/virnetdevmacvlan.h
index 41aa4e2..f08d32b 100644
--- a/src/util/virnetdevmacvlan.h
+++ b/src/util/virnetdevmacvlan.h
@@ -68,7 +68,6 @@ int virNetDevMacVLanCreateWithVPortProfile(const char *ifname,
char **res_ifname,
virNetDevVPortProfileOp vmop,
char *stateDir,
- virNetDevBandwidthPtr bandwidth,
unsigned int flags)
ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3) ATTRIBUTE_NONNULL(6)
ATTRIBUTE_NONNULL(8) ATTRIBUTE_NONNULL(10) ATTRIBUTE_RETURN_CHECK;
diff --git a/tests/virnetdevbandwidthtest.c b/tests/virnetdevbandwidthtest.c
index 384991e..db1f557 100644
--- a/tests/virnetdevbandwidthtest.c
+++ b/tests/virnetdevbandwidthtest.c
@@ -79,7 +79,8 @@ testVirNetDevBandwidthSet(const void *data)
virCommandSetDryRun(&buf, NULL, NULL);
- if (virNetDevBandwidthSet(iface, band, info->hierarchical_class) < 0)
+ if (virNetDevBandwidthSet(iface, band, info->hierarchical_class,
+ VIR_DOMAIN_NET_TYPE_ETHERNET) < 0)
goto cleanup;
if (!(actual_cmd = virBufferContentAndReset(&buf))) {
--
1.9.1
10 years, 1 month
[libvirt] [PATCH 0/3] Fix hot unplug of scsi_host hostdev
by John Ferlan
https://bugzilla.redhat.com/show_bug.cgi?id=1141732
Attempting to hot unplug a scsi_host device fails. The first patch
resolves the issue (and has some details in the commit message). The
second patch removes the now unnecessary virConnectPtr from various
places. The third patch resolves a potential issue if aliases weren't
defined and debugging is enabled by making the check for NULL first
before trying to message rather than the other way around.
John Ferlan (3):
qemu: Fix hot unplug of SCSI_HOST device
qemu: Remove need for virConnectPtr in hotunplug detach host, net
qemu: Remove possible NULL deref in debug output
src/qemu/qemu_driver.c | 4 +--
src/qemu/qemu_hotplug.c | 70 +++++++++++++++++++++++--------------------------
src/qemu/qemu_hotplug.h | 6 ++---
3 files changed, 37 insertions(+), 43 deletions(-)
--
1.9.3
10 years, 1 month
[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 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] 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