[libvirt] why is network i/o always zero?
by 黄亮
hi all
I'm using Xen on CentOS.I wanna monitor the network activity of a domain. When I use Domain.InterfaceStats( ... ), which is the C# binding of virDomainInterfaceStats, it returns -1.
I wonder if the function is not supported by Xen. So I using "domifstat", and I get
vif1.0 rx_bytes 0
vif1.0 rx_packets 0
vif1.0 rx_errs 0
vif1.0 rx_drop 0
vif1.0 tx_bytes 0
vif1.0 tx_packets 0
vif1.0 tx_errs 0
vif1.0 tx_drop 0
but it never change even when I use that domain to ping another.
virsh version:
Compiled against library: libvir 0.8.4
Using library: libvir 0.8.4
Using API: Xen 3.0.1
Running hypervisor: Xen 3.3.0
My question is, is Xen not support virDomainInterfaceStats or is somewhere I've gone wrong, that I can't get the network i/o statistics?
Thank you !
2011-05-11
黄亮
13 years, 7 months
[libvirt] [PATCH] Don't generate cookies with v2 migration protocol.
by Daniel P. Berrange
The v2 migration protocol had a limit on cookie length that was
too small to be useful for QEMU. Avoid generating cookies with
v2 protocol, so that old libvirtd can still reliably migrate a
guest to new libvirtd uses v2 protocol.
* src/qemu/qemu_driver.c: Avoid migration cookies with v2
migration
---
src/qemu/qemu_driver.c | 27 ++++++++++++++++++++-------
1 files changed, 20 insertions(+), 7 deletions(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 2f9c8e7..44acc6a 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -5867,8 +5867,8 @@ cleanup:
*/
static int ATTRIBUTE_NONNULL (5)
qemudDomainMigratePrepare2 (virConnectPtr dconn,
- char **cookie,
- int *cookielen,
+ char **cookie ATTRIBUTE_UNUSED,
+ int *cookielen ATTRIBUTE_UNUSED,
const char *uri_in,
char **uri_out,
unsigned long flags,
@@ -5906,9 +5906,12 @@ qemudDomainMigratePrepare2 (virConnectPtr dconn,
goto cleanup;
}
+ /* Do not use cookies in v2 protocol, since the cookie
+ * length was not sufficiently large, causing failures
+ * migrating between old & new libvirtd
+ */
ret = qemuMigrationPrepareDirect(driver, dconn,
- NULL, 0, /* No input cookies in v2 */
- cookie, cookielen,
+ NULL, 0, NULL, NULL, /* No cookies */
uri_in, uri_out,
dname, dom_xml);
@@ -5921,8 +5924,8 @@ cleanup:
/* Perform is the second step, and it runs on the source host. */
static int
qemudDomainMigratePerform (virDomainPtr dom,
- const char *cookie ATTRIBUTE_UNUSED,
- int cookielen ATTRIBUTE_UNUSED,
+ const char *cookie,
+ int cookielen,
const char *uri,
unsigned long flags,
const char *dname,
@@ -5951,6 +5954,12 @@ qemudDomainMigratePerform (virDomainPtr dom,
goto cleanup;
}
+ /* Do not output cookies in v2 protocol, since the cookie
+ * length was not sufficiently large, causing failures
+ * migrating between old & new libvirtd.
+ *
+ * Consume any cookie we were able to decode though
+ */
ret = qemuMigrationPerform(driver, dom->conn, vm,
uri, cookie, cookielen,
NULL, NULL, /* No output cookies in v2 */
@@ -5997,8 +6006,12 @@ qemudDomainMigrateFinish2 (virConnectPtr dconn,
goto cleanup;
}
+ /* Do not use cookies in v2 protocol, since the cookie
+ * length was not sufficiently large, causing failures
+ * migrating between old & new libvirtd
+ */
dom = qemuMigrationFinish(driver, dconn, vm,
- NULL, 0, NULL, NULL, /* No cookies in v2 */
+ NULL, 0, NULL, NULL, /* No cookies */
flags, retcode);
cleanup:
--
1.7.4.4
13 years, 7 months
[libvirt] inquiry, get native capabilities of the host
by Dong-In David Kang
Hello,
I'm interested in getting native capabilities of host CPU using libvirt.
I've looked at .../src/cpu/cpu_map.xml.
And it does describe native capabilities of host CPU very well.
But, libvirt always returns a subset of the native capabilities which is far different from the feature lists in the xml file.
(I'm testing with <model name='Westmere'>.)
The sponsor of my project is interested is high-performance computing.
And knowing native feature of the host CPU that can also be available to a virtual machine is very important for performance reason.
I couldn't find how to get the native features of the host that is described in .../src/cpu/cpu_map.xml.
Is there a way or libvirt API to get the native capabilities of host CPU that is well described in .../src/cpu/cpu_map.xml?
Thanks,
David.
13 years, 7 months
[libvirt] [PATCH] Ensure p2p and direct migration use the new v3 protocol if available
by Daniel P. Berrange
The internal virDomainMigratePeer2Peer and virDomainMigrateDirect
helper methods were not checking whether the target supports the
v3 migration protocol.
* src/libvirt.c: Use v3 migration protocol for p2p/direct
migration if available.
---
src/libvirt.c | 60 +++++++++++++++++++++++++++++++++++++++++++-------------
1 files changed, 46 insertions(+), 14 deletions(-)
diff --git a/src/libvirt.c b/src/libvirt.c
index 0542c35..ff16c48 100644
--- a/src/libvirt.c
+++ b/src/libvirt.c
@@ -3903,13 +3903,28 @@ virDomainMigratePeer2Peer (virDomainPtr domain,
/* Perform the migration. The driver isn't supposed to return
* until the migration is complete.
*/
- return domain->conn->driver->domainMigratePerform(domain,
- NULL, /* cookie */
- 0, /* cookielen */
- uri,
- flags,
- dname,
- bandwidth);
+ if (VIR_DRV_SUPPORTS_FEATURE(domain->conn->driver, domain->conn,
+ VIR_DRV_FEATURE_MIGRATION_V3)) {
+ VIR_DEBUG("Using migration protocol 3");
+ return domain->conn->driver->domainMigratePerform3(domain,
+ NULL, /* cookiein */
+ 0, /* cookieinlen */
+ NULL, /* cookieoutlen */
+ NULL, /* cookieoutlen */
+ uri,
+ flags,
+ dname,
+ bandwidth);
+ } else {
+ VIR_DEBUG("Using migration protocol 2");
+ return domain->conn->driver->domainMigratePerform(domain,
+ NULL, /* cookie */
+ 0, /* cookielen */
+ uri,
+ flags,
+ dname,
+ bandwidth);
+ }
}
@@ -3940,13 +3955,28 @@ virDomainMigrateDirect (virDomainPtr domain,
/* Perform the migration. The driver isn't supposed to return
* until the migration is complete.
*/
- return domain->conn->driver->domainMigratePerform(domain,
- NULL, /* cookie */
- 0, /* cookielen */
- uri,
- flags,
- dname,
- bandwidth);
+ if (VIR_DRV_SUPPORTS_FEATURE(domain->conn->driver, domain->conn,
+ VIR_DRV_FEATURE_MIGRATION_V3)) {
+ VIR_DEBUG("Using migration protocol 3");
+ return domain->conn->driver->domainMigratePerform3(domain,
+ NULL, /* cookiein */
+ 0, /* cookieinlen */
+ NULL, /* cookieoutlen */
+ NULL, /* cookieoutlen */
+ uri,
+ flags,
+ dname,
+ bandwidth);
+ } else {
+ VIR_DEBUG("Using migration protocol 2");
+ return domain->conn->driver->domainMigratePerform(domain,
+ NULL, /* cookie */
+ 0, /* cookielen */
+ uri,
+ flags,
+ dname,
+ bandwidth);
+ }
}
@@ -4207,6 +4237,7 @@ virDomainMigrateToURI (virDomainPtr domain,
if (flags & VIR_MIGRATE_PEER2PEER) {
if (VIR_DRV_SUPPORTS_FEATURE (domain->conn->driver, domain->conn,
VIR_DRV_FEATURE_MIGRATION_P2P)) {
+ VIR_DEBUG("Using peer2peer migration");
if (virDomainMigratePeer2Peer (domain, flags, dname, duri, bandwidth) < 0)
goto error;
} else {
@@ -4217,6 +4248,7 @@ virDomainMigrateToURI (virDomainPtr domain,
} else {
if (VIR_DRV_SUPPORTS_FEATURE (domain->conn->driver, domain->conn,
VIR_DRV_FEATURE_MIGRATION_DIRECT)) {
+ VIR_DEBUG("Using direct migration");
if (virDomainMigrateDirect (domain, flags, dname, duri, bandwidth) < 0)
goto error;
} else {
--
1.7.4.4
13 years, 7 months
[libvirt] [PATCH 0/7] round out persistent cpu.shares patches
by Eric Blake
When I pushed Hu's patch series this morning, I pointed out that
it was incomplete. This should fill in the gaps.
Eric Blake (7):
libvirt.h: consolidate typed parameter handling
remote: consolidate typed parameter handling
sched: introduce virDomainGetSchedulerParametersFlags
qemu: introduce qemuGetSchedulerParametersFlags
remote: introduce remoteGetSchedulerParametersFlags
virsh: improve schedinfo querying ability
sched: provide new API shims for remaining drivers
daemon/remote.c | 549 +++++++++++++++++-------------------------
include/libvirt/libvirt.h.in | 152 +++++++-----
python/generator.py | 13 +
src/driver.h | 8 +
src/esx/esx_driver.c | 28 ++-
src/libvirt.c | 84 ++++++-
src/libvirt_public.syms | 1 +
src/libxl/libxl_driver.c | 32 +++-
src/lxc/lxc_driver.c | 34 +++-
src/qemu/qemu_driver.c | 77 +++++-
src/remote/remote_driver.c | 513 ++++++++++++++++-----------------------
src/remote/remote_protocol.x | 87 +++-----
src/remote_protocol-structs | 63 ++---
src/test/test_driver.c | 37 +++-
src/xen/xen_driver.c | 36 +++-
tools/virsh.c | 32 ++-
16 files changed, 900 insertions(+), 846 deletions(-)
--
1.7.4.4
13 years, 7 months
[libvirt] [PATCH] Improve invalid argument checks for the public API
by Matthias Bolte
---
src/libvirt.c | 100 +++++++++++++++++++++++++++++++++++++++++++++++++++++---
1 files changed, 94 insertions(+), 6 deletions(-)
diff --git a/src/libvirt.c b/src/libvirt.c
index 787908e..87391c6 100644
--- a/src/libvirt.c
+++ b/src/libvirt.c
@@ -1390,7 +1390,7 @@ int
virConnectRef(virConnectPtr conn)
{
if ((!VIR_IS_CONNECT(conn))) {
- virLibConnError(VIR_ERR_INVALID_ARG, __FUNCTION__);
+ virLibConnError(VIR_ERR_INVALID_CONN, __FUNCTION__);
virDispatchError(NULL);
return -1;
}
@@ -4487,7 +4487,6 @@ virDomainMigratePrepareTunnel(virConnectPtr conn,
const char *dname,
unsigned long bandwidth,
const char *dom_xml)
-
{
VIR_DEBUG("conn=%p, stream=%p, flags=%lu, dname=%s, "
"bandwidth=%lu, dom_xml=%s", conn, st, flags,
@@ -4994,6 +4993,12 @@ virDomainGetSchedulerType(virDomainPtr domain, int *nparams)
virDispatchError(NULL);
return NULL;
}
+
+ if (nparams == NULL) {
+ virLibDomainError(VIR_ERR_INVALID_ARG, __FUNCTION__);
+ goto error;
+ }
+
conn = domain->conn;
if (conn->driver->domainGetSchedulerType){
@@ -5040,6 +5045,12 @@ virDomainGetSchedulerParameters(virDomainPtr domain,
virDispatchError(NULL);
return -1;
}
+
+ if (params == NULL || nparams == NULL) {
+ virLibDomainError(VIR_ERR_INVALID_ARG, __FUNCTION__);
+ goto error;
+ }
+
conn = domain->conn;
if (conn->driver->domainGetSchedulerParameters) {
@@ -5084,6 +5095,12 @@ virDomainSetSchedulerParameters(virDomainPtr domain,
virDispatchError(NULL);
return -1;
}
+
+ if (params == NULL) {
+ virLibDomainError(VIR_ERR_INVALID_ARG, __FUNCTION__);
+ goto error;
+ }
+
if (domain->conn->flags & VIR_CONNECT_RO) {
virLibDomainError(VIR_ERR_OPERATION_DENIED, __FUNCTION__);
goto error;
@@ -5534,7 +5551,7 @@ virDomainGetBlockInfo(virDomainPtr domain, const char *path, virDomainBlockInfoP
virDispatchError(NULL);
return -1;
}
- if (info == NULL) {
+ if (path == NULL || info == NULL) {
virLibDomainError(VIR_ERR_INVALID_ARG, __FUNCTION__);
goto error;
}
@@ -6440,6 +6457,12 @@ virDomainAttachDevice(virDomainPtr domain, const char *xml)
virDispatchError(NULL);
return -1;
}
+
+ if (xml == NULL) {
+ virLibDomainError(VIR_ERR_INVALID_ARG, __FUNCTION__);
+ goto error;
+ }
+
if (domain->conn->flags & VIR_CONNECT_RO) {
virLibDomainError(VIR_ERR_OPERATION_DENIED, __FUNCTION__);
goto error;
@@ -6500,6 +6523,12 @@ virDomainAttachDeviceFlags(virDomainPtr domain,
virDispatchError(NULL);
return -1;
}
+
+ if (xml == NULL) {
+ virLibDomainError(VIR_ERR_INVALID_ARG, __FUNCTION__);
+ goto error;
+ }
+
if (domain->conn->flags & VIR_CONNECT_RO) {
virLibDomainError(VIR_ERR_OPERATION_DENIED, __FUNCTION__);
goto error;
@@ -6545,6 +6574,12 @@ virDomainDetachDevice(virDomainPtr domain, const char *xml)
virDispatchError(NULL);
return -1;
}
+
+ if (xml == NULL) {
+ virLibDomainError(VIR_ERR_INVALID_ARG, __FUNCTION__);
+ goto error;
+ }
+
if (domain->conn->flags & VIR_CONNECT_RO) {
virLibDomainError(VIR_ERR_OPERATION_DENIED, __FUNCTION__);
goto error;
@@ -6601,6 +6636,12 @@ virDomainDetachDeviceFlags(virDomainPtr domain,
virDispatchError(NULL);
return -1;
}
+
+ if (xml == NULL) {
+ virLibDomainError(VIR_ERR_INVALID_ARG, __FUNCTION__);
+ goto error;
+ }
+
if (domain->conn->flags & VIR_CONNECT_RO) {
virLibDomainError(VIR_ERR_OPERATION_DENIED, __FUNCTION__);
goto error;
@@ -6661,6 +6702,12 @@ virDomainUpdateDeviceFlags(virDomainPtr domain,
virDispatchError(NULL);
return -1;
}
+
+ if (xml == NULL) {
+ virLibDomainError(VIR_ERR_INVALID_ARG, __FUNCTION__);
+ goto error;
+ }
+
if (domain->conn->flags & VIR_CONNECT_RO) {
virLibDomainError(VIR_ERR_OPERATION_DENIED, __FUNCTION__);
goto error;
@@ -7321,7 +7368,7 @@ int
virNetworkRef(virNetworkPtr network)
{
if ((!VIR_IS_CONNECTED_NETWORK(network))) {
- virLibConnError(VIR_ERR_INVALID_ARG, __FUNCTION__);
+ virLibConnError(VIR_ERR_INVALID_NETWORK, __FUNCTION__);
virDispatchError(NULL);
return -1;
}
@@ -8187,7 +8234,7 @@ int
virInterfaceRef(virInterfacePtr iface)
{
if ((!VIR_IS_CONNECTED_INTERFACE(iface))) {
- virLibConnError(VIR_ERR_INVALID_ARG, __FUNCTION__);
+ virLibConnError(VIR_ERR_INVALID_INTERFACE, __FUNCTION__);
virDispatchError(NULL);
return -1;
}
@@ -8630,7 +8677,7 @@ virStoragePoolLookupByVolume(virStorageVolPtr vol)
virResetLastError();
if (!VIR_IS_CONNECTED_STORAGE_VOL(vol)) {
- virLibConnError(VIR_ERR_INVALID_CONN, __FUNCTION__);
+ virLibConnError(VIR_ERR_INVALID_STORAGE_VOL, __FUNCTION__);
virDispatchError(NULL);
return NULL;
}
@@ -9702,6 +9749,11 @@ virStorageVolCreateXML(virStoragePoolPtr pool,
return NULL;
}
+ if (xmldesc == NULL) {
+ virLibConnError(VIR_ERR_INVALID_ARG, __FUNCTION__);
+ goto error;
+ }
+
if (pool->conn->flags & VIR_CONNECT_RO) {
virLibConnError(VIR_ERR_OPERATION_DENIED, __FUNCTION__);
goto error;
@@ -9758,6 +9810,11 @@ virStorageVolCreateXMLFrom(virStoragePoolPtr pool,
goto error;
}
+ if (xmldesc == NULL) {
+ virLibConnError(VIR_ERR_INVALID_ARG, __FUNCTION__);
+ goto error;
+ }
+
if (pool->conn->flags & VIR_CONNECT_RO ||
clonevol->conn->flags & VIR_CONNECT_RO) {
virLibConnError(VIR_ERR_OPERATION_DENIED, __FUNCTION__);
@@ -10508,6 +10565,11 @@ int virNodeDeviceListCaps(virNodeDevicePtr dev,
return -1;
}
+ if (names == NULL || maxnames < 0) {
+ virLibNodeDeviceError(VIR_ERR_INVALID_ARG, __FUNCTION__);
+ goto error;
+ }
+
if (dev->conn->deviceMonitor && dev->conn->deviceMonitor->deviceListCaps) {
int ret;
ret = dev->conn->deviceMonitor->deviceListCaps (dev, names, maxnames);
@@ -11764,6 +11826,11 @@ int virStreamSend(virStreamPtr stream,
return -1;
}
+ if (data == NULL) {
+ virLibConnError(VIR_ERR_INVALID_ARG, __FUNCTION__);
+ goto error;
+ }
+
if (stream->driver &&
stream->driver->streamSend) {
int ret;
@@ -11859,6 +11926,11 @@ int virStreamRecv(virStreamPtr stream,
return -1;
}
+ if (data == NULL) {
+ virLibConnError(VIR_ERR_INVALID_ARG, __FUNCTION__);
+ goto error;
+ }
+
if (stream->driver &&
stream->driver->streamRecv) {
int ret;
@@ -11935,6 +12007,11 @@ int virStreamSendAll(virStreamPtr stream,
return -1;
}
+ if (handler == NULL) {
+ virLibConnError(VIR_ERR_INVALID_ARG, __FUNCTION__);
+ goto cleanup;
+ }
+
if (stream->flags & VIR_STREAM_NONBLOCK) {
virLibConnError(VIR_ERR_OPERATION_INVALID,
_("data sources cannot be used for non-blocking streams"));
@@ -12032,6 +12109,11 @@ int virStreamRecvAll(virStreamPtr stream,
return -1;
}
+ if (handler == NULL) {
+ virLibConnError(VIR_ERR_INVALID_ARG, __FUNCTION__);
+ goto cleanup;
+ }
+
if (stream->flags & VIR_STREAM_NONBLOCK) {
virLibConnError(VIR_ERR_OPERATION_INVALID,
_("data sinks cannot be used for non-blocking streams"));
@@ -13746,6 +13828,12 @@ virDomainSnapshotCreateXML(virDomainPtr domain,
}
conn = domain->conn;
+
+ if (xmlDesc == NULL) {
+ virLibDomainError(VIR_ERR_INVALID_ARG, __FUNCTION__);
+ goto error;
+ }
+
if (conn->flags & VIR_CONNECT_RO) {
virLibConnError(VIR_ERR_OPERATION_DENIED, __FUNCTION__);
goto error;
--
1.7.0.4
13 years, 7 months
[libvirt] [PATCH] Fix messages using VIR_ERR_XML_ERROR
by Cole Robinson
This error code has existed since the dawn of time, yet the messages it
generates are almost universally busted. Here's a small sampling:
src/conf/domain_conf.c:4889 : XML description for missing root element is not well formed or invalid
src/conf/domain_conf.c:4951 : XML description for unknown device type is not well formed or invalid
src/conf/domain_conf.c:5460 : XML description for maximum vcpus must be an integer is not well formed or invalid
src/conf/domain_conf.c:5468 : XML description for invalid maxvcpus %(count)lu is not well formed or invalid
Fix up the error code to instead be
XML error: <msg>
Adjust the few locations that we using the original correctly (or shouldn't
have been using the error code at all).
Signed-off-by: Cole Robinson <crobinso(a)redhat.com>
---
src/test/test_driver.c | 21 ++++++++++++++-------
src/util/virterror.c | 4 ++--
src/xen/xm_internal.c | 5 +++--
3 files changed, 19 insertions(+), 11 deletions(-)
diff --git a/src/test/test_driver.c b/src/test/test_driver.c
index 119b027..a9b306e 100644
--- a/src/test/test_driver.c
+++ b/src/test/test_driver.c
@@ -811,7 +811,8 @@ static int testOpenFromFile(virConnectPtr conn,
if (ret == 0) {
nodeInfo->nodes = l;
} else if (ret == -2) {
- testError(VIR_ERR_XML_ERROR, "%s", _("node cpu numa nodes"));
+ testError(VIR_ERR_XML_ERROR, "%s",
+ _("invalid node cpu nodes value"));
goto error;
}
@@ -819,7 +820,8 @@ static int testOpenFromFile(virConnectPtr conn,
if (ret == 0) {
nodeInfo->sockets = l;
} else if (ret == -2) {
- testError(VIR_ERR_XML_ERROR, "%s", _("node cpu sockets"));
+ testError(VIR_ERR_XML_ERROR, "%s",
+ _("invalid node cpu sockets value"));
goto error;
}
@@ -827,7 +829,8 @@ static int testOpenFromFile(virConnectPtr conn,
if (ret == 0) {
nodeInfo->cores = l;
} else if (ret == -2) {
- testError(VIR_ERR_XML_ERROR, "%s", _("node cpu cores"));
+ testError(VIR_ERR_XML_ERROR, "%s",
+ _("invalid node cpu cores value"));
goto error;
}
@@ -835,7 +838,8 @@ static int testOpenFromFile(virConnectPtr conn,
if (ret == 0) {
nodeInfo->threads = l;
} else if (ret == -2) {
- testError(VIR_ERR_XML_ERROR, "%s", _("node cpu threads"));
+ testError(VIR_ERR_XML_ERROR, "%s",
+ _("invalid node cpu threads value"));
goto error;
}
@@ -846,14 +850,16 @@ static int testOpenFromFile(virConnectPtr conn,
nodeInfo->cpus = l;
}
} else if (ret == -2) {
- testError(VIR_ERR_XML_ERROR, "%s", _("node active cpu"));
+ testError(VIR_ERR_XML_ERROR, "%s",
+ _("invalid node cpu active value"));
goto error;
}
ret = virXPathLong("string(/node/cpu/mhz[1])", ctxt, &l);
if (ret == 0) {
nodeInfo->mhz = l;
} else if (ret == -2) {
- testError(VIR_ERR_XML_ERROR, "%s", _("node cpu mhz"));
+ testError(VIR_ERR_XML_ERROR, "%s",
+ _("invalid node cpu mhz value"));
goto error;
}
@@ -872,7 +878,8 @@ static int testOpenFromFile(virConnectPtr conn,
if (ret == 0) {
nodeInfo->memory = l;
} else if (ret == -2) {
- testError(VIR_ERR_XML_ERROR, "%s", _("node memory"));
+ testError(VIR_ERR_XML_ERROR, "%s",
+ _("invalid node memory value"));
goto error;
}
diff --git a/src/util/virterror.c b/src/util/virterror.c
index fbb4a45..881a7dc 100644
--- a/src/util/virterror.c
+++ b/src/util/virterror.c
@@ -925,9 +925,9 @@ virErrorMsg(virErrorNumber error, const char *info)
break;
case VIR_ERR_XML_ERROR:
if (info == NULL)
- errmsg = _("XML description not well formed or invalid");
+ errmsg = _("XML description is not well formed or invalid");
else
- errmsg = _("XML description for %s is not well formed or invalid");
+ errmsg = _("XML error: %s");
break;
case VIR_ERR_DOM_EXIST:
if (info == NULL)
diff --git a/src/xen/xm_internal.c b/src/xen/xm_internal.c
index 69e14c3..d0035c9 100644
--- a/src/xen/xm_internal.c
+++ b/src/xen/xm_internal.c
@@ -1515,8 +1515,9 @@ xenXMDomainDetachDeviceFlags(virDomainPtr domain, const char *xml,
break;
}
default:
- xenXMError(VIR_ERR_XML_ERROR,
- "%s", _("unknown device"));
+ xenXMError(VIR_ERR_CONFIG_UNSUPPORTED,
+ _("device type '%s' cannot be detached"),
+ virDomainDeviceTypeToString(dev->type));
goto cleanup;
}
--
1.7.4.4
13 years, 7 months
[libvirt] Trying to re-compile libvirt package on Ubuntu Lucid
by Lars Nordin
I'm trying to rebuild Ubuntu's libvirt packages to turn on ESX support.
I've downloaded the Ubuntu source package for Lucid (updated Lucid package) dget -u http://archive.ubuntu.com/ubuntu/pool/main/libv/libvirt/libvirt_0.7.5-5ub...
I try and re-compile
dpkg-buildpackage -rfakeroot -b
DEB_BUILD_OPTIONS="--with-esx" fakeroot debian/rules binary
and I get this error, when the unit tests are run:
...
testing with corrupted config: log_level
Skipping test (due to Ubuntu buildd FTBFS): running libvirtd with a valid config file (2 seconds)
FAIL: daemon-conf
PASS: define-dev-segfault
...
====================
1 of 37 tests failed
====================
make[4]: *** [check-TESTS] Error 1
make[4]: Leaving directory `/exp/h1/staff/lnordin/libvirt-pkg/libvirt-0.7.5/tests'
make[3]: *** [check-am] Error 2
make[3]: Leaving directory `/exp/h1/staff/lnordin/libvirt-pkg/libvirt-0.7.5/tests'
make[2]: *** [check-recursive] Error 1
make[2]: Leaving directory `/exp/h1/staff/lnordin/libvirt-pkg/libvirt-0.7.5/tests'
make[1]: *** [check-recursive] Error 1
make[1]: Leaving directory `/exp/h1/staff/lnordin/libvirt-pkg/libvirt-0.7.5'
make: *** [debian/stamp-makefile-check] Error 2
Anyone gone through this exercise before and would know how to get the packages re-built?
13 years, 7 months
[libvirt] [PATCH] qemu: fix typo in spice migration code
by Michal Privoznik
This typo caused XPath returning improper value and thus not
working spice after migration.
---
src/qemu/qemu_migration.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
index cb408ac..fcf8f9c 100644
--- a/src/qemu/qemu_migration.c
+++ b/src/qemu/qemu_migration.c
@@ -355,7 +355,7 @@ qemuMigrationCookieGraphicsXMLParse(xmlXPathContextPtr ctxt)
goto error;
}
/* Optional */
- grap->tlsSubject = virXPathString("string(./graphics/cert[ info='subject']/@value)", ctxt);
+ grap->tlsSubject = virXPathString("string(./graphics/cert[@info='subject']/@value)", ctxt);
return grap;
--
1.7.5.rc3
13 years, 7 months