[libvirt] [PATCH] qemu: Fix improper error message for disk detaching
by Osier Yang
s/virDomainDeviceTypeToString/virDomainDiskDeviceTypeToString/
Report by Xu He Jie <xuhj(a)linux.vnet.ibm.com>
---
src/qemu/qemu_driver.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 118197a..cee689b 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -5212,8 +5212,8 @@ qemuDomainDetachDeviceDiskLive(struct qemud_driver *driver,
break;
default:
qemuReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("device type '%s' cannot be detached"),
- virDomainDeviceTypeToString(dev->type));
+ _("disk device type '%s' cannot be detached"),
+ virDomainDiskDeviceTypeToString(dev->type));
break;
}
return ret;
--
1.7.6
13 years
[libvirt] [PATCH] virsh: Add VSH_OFLAG_EMPTY_OK for attach-disk command
by Xu He Jie
As the description of removing CDROM media from
http://wiki.libvirt.org/page/QEMUSwitchToLibvirt#eject_DEV
Add flag 'VSH_OFLAG_EMPTY_OK' to the option 'source' of attach-disk
Signed-off-by: Xu He Jie <xuhj(a)linux.vnet.ibm.com>
---
tools/virsh.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/tools/virsh.c b/tools/virsh.c
index 5544a41..e7eae74 100644
--- a/tools/virsh.c
+++ b/tools/virsh.c
@@ -11569,7 +11569,7 @@ static const vshCmdInfo info_attach_disk[] = {
static const vshCmdOptDef opts_attach_disk[] = {
{"domain", VSH_OT_DATA, VSH_OFLAG_REQ, N_("domain name, id or uuid")},
- {"source", VSH_OT_DATA, VSH_OFLAG_REQ, N_("source of disk device")},
+ {"source", VSH_OT_DATA, VSH_OFLAG_REQ | VSH_OFLAG_EMPTY_OK, N_("source of disk device")},
{"target", VSH_OT_DATA, VSH_OFLAG_REQ, N_("target of disk device")},
{"driver", VSH_OT_STRING, 0, N_("driver of disk device")},
{"subdriver", VSH_OT_STRING, 0, N_("subdriver of disk device")},
--
1.7.5.4
13 years
[libvirt] [PATCHv2] build: fix build on platforms without ptsname_r
by Eric Blake
MacOS lacks ptsname_r, and gnulib doesn't (yet) provide it.
But we can avoid it altogether, by using gnulib openpty()
instead. Note that we do _not_ want the pt_chown module;
all systems that we currently port to can either properly do
openpty() and/or grantpt(), or lack ptys altogether; we are
not porting to any system that requires us to deal with the
hassle of installing a setuid pt_chown helper just to satisfy
gnulib's ability to provide openpty() on even more platforms.
* .gnulib: Update to latest, for openpty fixes
* bootstrap.conf (gnulib_modules): Add openpty, ttyname_r.
(gnulib_tool_option_extras): Exclude pt_chown module.
* src/util/util.c (virFileOpenTty): Rewrite in terms of openpty
and ttyname_r.
* src/util/util.h (virFileOpenTtyAt): Delete dead prototype.
---
Alas, this is just complicated enough that I don't feel comfortable
pushing it under the build-breaker rule, even though I have verified
that it fixes builds on both FreeBSD and Cygwin, as well as still
behaves correctly with LXC containers on Linux. Anyone willing to
give this a review before 0.9.7 gets released?
.gnulib | 2 +-
bootstrap.conf | 3 ++
src/util/util.c | 73 ++++++++++++++++++++++++++++++++++++++++--------------
src/util/util.h | 5 ----
4 files changed, 58 insertions(+), 25 deletions(-)
diff --git a/.gnulib b/.gnulib
index 2394a60..0031e4f 160000
--- a/.gnulib
+++ b/.gnulib
@@ -1 +1 @@
-Subproject commit 2394a603e7586e671226478e5b15d924c3841f42
+Subproject commit 0031e4f6353cc7077a9d0dad0c793bd6e3dc7aaa
diff --git a/bootstrap.conf b/bootstrap.conf
index 0faa2e2..4557d2d 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -68,6 +68,7 @@ mkstemps
mktempd
netdb
nonblocking
+openpty
passfd
perror
physmem
@@ -101,6 +102,7 @@ sys_wait
termios
time_r
timegm
+ttyname_r
uname
useless-if-before-free
usleep
@@ -168,6 +170,7 @@ tests_base=gnulib/tests
gnulib_tool_option_extras="\
--lgpl=2\
--with-tests\
+ --avoid=pt_chown\
"
# Convince bootstrap to use multiple m4 directories.
diff --git a/src/util/util.c b/src/util/util.c
index bd52b21..959c224 100644
--- a/src/util/util.c
+++ b/src/util/util.c
@@ -45,10 +45,11 @@
#include <string.h>
#include <signal.h>
#include <termios.h>
+#include <pty.h>
+
#if HAVE_LIBDEVMAPPER_H
# include <libdevmapper.h>
#endif
-#include "c-ctype.h"
#ifdef HAVE_PATHS_H
# include <paths.h>
@@ -65,6 +66,7 @@
# include <mntent.h>
#endif
+#include "c-ctype.h"
#include "dirname.h"
#include "virterror_internal.h"
#include "logging.h"
@@ -1172,52 +1174,85 @@ virFileBuildPath(const char *dir, const char *name, const char *ext)
return path;
}
+/* Open a non-blocking master side of a pty. If ttyName is not NULL,
+ * then populate it with the name of the slave. If rawmode is set,
+ * also put the master side into raw mode before returning. */
#ifndef WIN32
int virFileOpenTty(int *ttymaster,
char **ttyName,
int rawmode)
{
- int rc = -1;
-
- if ((*ttymaster = posix_openpt(O_RDWR|O_NOCTTY|O_NONBLOCK)) < 0)
- goto cleanup;
+ /* XXX A word of caution - on some platforms (Solaris and HP-UX),
+ * additional ioctl() calls are needs after opening the slave
+ * before it will cause isatty() to return true. Should we make
+ * virFileOpenTty also return the opened slave fd, so the caller
+ * doesn't have to worry about that mess? */
+ int ret = -1;
+ int slave = -1;
+ char *name = NULL;
- if (unlockpt(*ttymaster) < 0)
- goto cleanup;
+ /* Unfortunately, we can't use the name argument of openpty, since
+ * there is no guarantee on how large the buffer has to be.
+ * Likewise, we can't use the termios argument: we have to use
+ * read-modify-write since there is no portable way to initialize
+ * a struct termios without use of tcgetattr. */
+ if (openpty(ttymaster, &slave, NULL, NULL, NULL) < 0)
+ return -1;
- if (grantpt(*ttymaster) < 0)
+ /* What a shame that openpty cannot atomically set FD_CLOEXEC, but
+ * that using posix_openpt/grantpt/unlockpt/ptsname is not
+ * thread-safe, and that ptsname_r is not portable. */
+ if (virSetNonBlock(*ttymaster) < 0 ||
+ virSetCloseExec(*ttymaster) < 0)
goto cleanup;
+ /* While Linux supports tcgetattr on either the master or the
+ * slave, Solaris requires it to be on the slave. */
if (rawmode) {
struct termios ttyAttr;
- if (tcgetattr(*ttymaster, &ttyAttr) < 0)
+ if (tcgetattr(slave, &ttyAttr) < 0)
goto cleanup;
cfmakeraw(&ttyAttr);
- if (tcsetattr(*ttymaster, TCSADRAIN, &ttyAttr) < 0)
+ if (tcsetattr(slave, TCSADRAIN, &ttyAttr) < 0)
goto cleanup;
}
+ /* ttyname_r on the slave is required by POSIX, while ptsname_r on
+ * the master is a glibc extension, and the POSIX ptsname is not
+ * thread-safe. Since openpty gave us both descriptors, guess
+ * which way we will determine the name? :) */
if (ttyName) {
- if (VIR_ALLOC_N(*ttyName, PATH_MAX) < 0) {
- errno = ENOMEM;
+ /* Initial guess of 64 is generally sufficient; rely on ERANGE
+ * to tell us if we need to grow. */
+ size_t len = 64;
+ int rc;
+
+ if (VIR_ALLOC_N(name, len) < 0)
goto cleanup;
- }
- if (ptsname_r(*ttymaster, *ttyName, PATH_MAX) != 0) {
- VIR_FREE(*ttyName);
+ while ((rc = ttyname_r(slave, name, len)) == ERANGE) {
+ if (VIR_RESIZE_N(name, len, len, len) < 0)
+ goto cleanup;
+ }
+ if (rc != 0) {
+ errno = rc;
goto cleanup;
}
+ *ttyName = name;
+ name = NULL;
}
- rc = 0;
+ ret = 0;
cleanup:
- if (rc != 0)
+ if (ret != 0)
VIR_FORCE_CLOSE(*ttymaster);
+ VIR_FORCE_CLOSE(slave);
+ VIR_FREE(name);
- return rc;
+ return ret;
}
#else /* WIN32 */
int virFileOpenTty(int *ttymaster ATTRIBUTE_UNUSED,
diff --git a/src/util/util.h b/src/util/util.h
index e869f1b..d8176a8 100644
--- a/src/util/util.h
+++ b/src/util/util.h
@@ -121,11 +121,6 @@ int virFileAbsPath(const char *path,
int virFileOpenTty(int *ttymaster,
char **ttyName,
int rawmode);
-int virFileOpenTtyAt(const char *ptmx,
- int *ttymaster,
- char **ttyName,
- int rawmode);
-
char *virArgvToString(const char *const *argv);
--
1.7.4.4
13 years
[libvirt] [libvirt-glib 00/24] libvirt-gconfig patches
by Christophe Fergeau
Hi,
Here is a set of patches which start to implement functionality to
libvirt-gconfig. The end result is that the "name", "memory" and
"features" properties are implemented for the Domain class. Most of
the work is about reworking the low-level plumbing to make the
implementation as easy as possible.
I chose to remove the xmlDocPtr and the xml string that were stored
in GVirConfigObject objects and to replace this with a xmlNodePtr.
This is useful when creating children objects (eg devices) when
parsing a domain XML because the xmlNodePtr will point at the
right position in the XML document. One caveat with that approach
is that we need to refcount the xmlDocPtr associated with the
xmlNodePtr to know when to free it, but this is not implemented
yet (though gupnp seems to have code doing exactly this).
Then most of the work is adding properties and helpers to make
the code easier to write. And thinking about what API we want to
expose to clients :) The two test programs should show how the API
can be used as it is now.
While writing this, I realized we had to do some "useless" work to
return strings from libxml2 to glib, ie I g_strdup the string and
xmlFree the source so that the caller can free it with g_free.
While writing this code, there were at least 2 questions that arose,
some input would be welcome :)
* I don't know how to handle XMLs where the same node appears multiple
times (eg "name"). If it's the latest name that wins, what do we do when
changing the name on such an XML document? only modify the last name node?
Drop all the redundant name nodes?
* I'm also not sure how to make it possible to check whether a given
property is set or not. For strings, this is easy, NULL means that the
property was not set, but for integers, this is less obvious. Any thoughts on
that?
Next I'll have to start looking at more complicated properties :) More API
questions on the way I guess...
Christophe
Christophe Fergeau (23):
Add helpers in libvirt-gconfig-helpers.[ch]
gvir_config_object_parse: don't parse empty documents
Add getters for GVirConfig xmlNode and xmlDoc
Add GVirConfigObject::node property
Add GVir::Config::Domain::name property
Rename gvir_config_domain_new
Add gvir_config_domain_new to create an empty domain
Implement gvir_config_domain_set_name
Make the GVirConfigDomain::name property writable
Add gvir_config_object_to_xml
Use gvir_config_object_to_xml
Add domain creation/parsing test
Remove GVirConfigObject::docHandle
Remove xml parsing from gvir_config_*_new functions
Only do XML parsing when creating config objects
Remove GError argument from GVirConfigObject::node getter
Remove GVirConfigObject::doc
Add gvir_config_object_get_node_content
Add gvir_config_object_set_node_content
Add test-domain-duplicate.xml which currently fails
Validate document in parsing test
Add GVirConfigDomain::memory
Add GVirConfigDomain::features
configure.ac | 1 +
examples/Makefile.am | 1 +
libvirt-gconfig/Makefile.am | 4 +
libvirt-gconfig/libvirt-gconfig-capabilities.c | 10 +-
libvirt-gconfig/libvirt-gconfig-capabilities.h | 2 +-
libvirt-gconfig/libvirt-gconfig-domain-snapshot.c | 9 +-
libvirt-gconfig/libvirt-gconfig-domain-snapshot.h | 2 +-
libvirt-gconfig/libvirt-gconfig-domain.c | 186 ++++++++++++++++-
libvirt-gconfig/libvirt-gconfig-domain.h | 12 +-
libvirt-gconfig/libvirt-gconfig-helpers.c | 179 +++++++++++++++
libvirt-gconfig/libvirt-gconfig-helpers.h | 48 ++++
libvirt-gconfig/libvirt-gconfig-interface.c | 12 +-
libvirt-gconfig/libvirt-gconfig-interface.h | 2 +-
libvirt-gconfig/libvirt-gconfig-network-filter.c | 8 +-
libvirt-gconfig/libvirt-gconfig-network-filter.h | 2 +-
libvirt-gconfig/libvirt-gconfig-network.c | 8 +-
libvirt-gconfig/libvirt-gconfig-network.h | 2 +-
libvirt-gconfig/libvirt-gconfig-node-device.c | 9 +-
libvirt-gconfig/libvirt-gconfig-node-device.h | 2 +-
libvirt-gconfig/libvirt-gconfig-object.c | 244 ++++++++++++---------
libvirt-gconfig/libvirt-gconfig-object.h | 17 ++-
libvirt-gconfig/libvirt-gconfig-secret.c | 8 +-
libvirt-gconfig/libvirt-gconfig-secret.h | 2 +-
libvirt-gconfig/libvirt-gconfig-storage-pool.c | 8 +-
libvirt-gconfig/libvirt-gconfig-storage-pool.h | 2 +-
libvirt-gconfig/libvirt-gconfig-storage-vol.c | 12 +-
libvirt-gconfig/libvirt-gconfig-storage-vol.h | 2 +-
libvirt-gconfig/libvirt-gconfig.h | 2 +
libvirt-gconfig/libvirt-gconfig.sym | 11 +-
libvirt-gconfig/tests/Makefile.am | 16 ++
libvirt-gconfig/tests/test-domain-create.c | 68 ++++++
libvirt-gconfig/tests/test-domain-duplicate.xml | 7 +
libvirt-gconfig/tests/test-domain-invalid.xml | 6 +
libvirt-gconfig/tests/test-domain-noname.xml | 4 +
libvirt-gconfig/tests/test-domain-parse.c | 87 ++++++++
libvirt-gconfig/tests/test-domain.xml | 7 +
libvirt-gobject/Makefile.am | 2 +
libvirt-gobject/libvirt-gobject-connection.c | 2 +-
libvirt-gobject/libvirt-gobject-domain-snapshot.c | 3 +
libvirt-gobject/libvirt-gobject-domain.c | 6 +-
libvirt-gobject/libvirt-gobject-interface.c | 3 +
libvirt-gobject/libvirt-gobject-network-filter.c | 3 +
libvirt-gobject/libvirt-gobject-network.c | 3 +
libvirt-gobject/libvirt-gobject-node-device.c | 4 +
libvirt-gobject/libvirt-gobject-secret.c | 4 +
libvirt-gobject/libvirt-gobject-storage-pool.c | 5 +-
libvirt-gobject/libvirt-gobject-storage-vol.c | 3 +
47 files changed, 895 insertions(+), 145 deletions(-)
create mode 100644 libvirt-gconfig/libvirt-gconfig-helpers.c
create mode 100644 libvirt-gconfig/libvirt-gconfig-helpers.h
create mode 100644 libvirt-gconfig/tests/Makefile.am
create mode 100644 libvirt-gconfig/tests/test-domain-create.c
create mode 100644 libvirt-gconfig/tests/test-domain-duplicate.xml
create mode 100644 libvirt-gconfig/tests/test-domain-invalid.xml
create mode 100644 libvirt-gconfig/tests/test-domain-noname.xml
create mode 100644 libvirt-gconfig/tests/test-domain-parse.c
create mode 100644 libvirt-gconfig/tests/test-domain.xml
--
1.7.6.4
13 years
[libvirt] qemu error: Could not allocate dynamic translator buffer
by Richard W.M. Jones
I'm getting a very odd error from qemu:
2011-11-08 13:06:03.403: starting up
LC_ALL=C PATH=/sbin:/usr/sbin:/bin:/usr/bin QEMU_AUDIO_DRV=none /usr/bin/qemu-system-x86_64 -S -M pc-0.14 -no-kvm -m 1024 -smp 1,sockets=1,cores=1,threads=1 -name fedora15_x86_64 -uuid a88161b0-c4c9-42bf-a7b5-5bccf8b65197 -nodefconfig -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/fedora15_x86_64.monitor,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc -no-reboot -kernel /var/lib/libvirt/images/fedora15_x86_64-kernel -initrd /var/lib/libvirt/images/fedora15_x86_64-ramdisk -append method=http://mirror.bytemark.co.uk/fedora/linux/releases/15/Fedora/x86_64/os/ ks=file:/ks.cfg -drive file=/var/lib/libvirt/images/fedora15_x86_64.dsk,if=none,id=drive-virtio-disk0,format=raw -device virtio-blk-pci,bus=pci.0,addr=0x4,drive=drive-virtio-disk0,id=virtio-disk0 -netdev tap,fd=24,id=hostnet0 -device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:26:9f:d6,bus=pci.0,addr=0x3 -chardev socket,id=charserial0,host=127.0.0.1,port=64900,server,nowait -device isa-serial,chardev=charserial0,id=serial0 -usb -vnc 127.0.0.1:0 -vga cirrus -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x5
Could not allocate dynamic translator buffer
2011-11-08 13:06:04.062: shutting down
Now I understand that qemu gives this error when it cannot allocate
memory, specifically it can't mmap a TCG translation buffer. 800 MBytes
according to the source code.
However the guest where I'm running this command has plenty of free
memory available:
$ free -m
total used free shared buffers cached
Mem: 5659 872 4787 0 26 351
-/+ buffers/cache: 493 5166
Swap: 1983 0 1983
That's surely easily enough for 1G of RAM + a translation buffer?
Anyway, my question is this: Can I somehow get libvirt to strace qemu
and put that output somewhere? I tried the strace trick here:
https://fedoraproject.org/wiki/How_to_debug_Virtualization_problems#strace
but for some reason it doesn't trace into the qemu process. Not sure
why, since surely the qemu process is a child of libvirtd?
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming blog: http://rwmj.wordpress.com
Fedora now supports 80 OCaml packages (the OPEN alternative to F#)
http://cocan.org/getting_started_with_ocaml_on_red_hat_and_fedora
13 years
[libvirt] build failed with warning " failed to load external entity "api.html.tmp"
by Wenyi Gao
I got the latest code and build it with following error on Ubuntu 11.10:
......
make all-am
make[3]: Entering directory `/home/wayne/workspace/project/libvirt/tools'
CC virsh-console.o
CC virsh-virsh.o
CCLD virsh
GEN virt-xml-validate
GEN virt-pki-validate
make[3]: Leaving directory `/home/wayne/workspace/project/libvirt/tools'
make[2]: Leaving directory `/home/wayne/workspace/project/libvirt/tools'
Making all in docs
make[2]: Entering directory `/home/wayne/workspace/project/libvirt/docs'
Validating api.html
warning: failed to load external entity "api.html.tmp"
make[2]: *** [api.html] Error 1
make[2]: Leaving directory `/home/wayne/workspace/project/libvirt/docs'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/wayne/workspace/project/libvirt'
make: *** [all] Error 2
I think some dependent packages are missed on my build environment. But
the error information doesn't show some hint. Does anyone know the
reason? Thanks.
Wenyi Gao
13 years
[libvirt] Release of libvirt-0.9.7
by Daniel Veillard
With a bit of delay to catch the last set of patches, the release is
finally out ! You can get 0.9.7 from
ftp://libvirt.org/libvirt/
This is a release mostly focusing on bug fixes and cleanup though
there is some features too, including a lot of improvements on the
snapshot code. There is also a notable set of portability patches,
hopefully all issues raised there were fixed !
Features:
- esx: Support vSphere 5.x (Patrice LACHANCE)
- vbox: Add support for VirtualBox 4.1 (Matthias Bolte)
- Introduce the virDomainOpenGraphics API (Daniel P. Berrange)
- Add AHCI support to qemu driver (Jim Fehlig)
- snapshot: many improvements and 2 new APIs (Eric Blake)
- api: Add public api for 'reset' (Xu He Jie)
Documentation:
- Add <deviceboot> capability. (Philipp Hahn)
- API: document scheduler parameter names (Eric Blake)
- improve typed parameter documentation (Eric Blake)
- fix typo in <disk>/<target> example (Eric Blake)
- python: Fix documentation of virStream recv (Matthias Bolte)
- Add documentation about migration. (Daniel P. Berrange)
- Document filesystem type='block' for LXC (Ryota Ozaki)
- fix incorrect info about routed networks (Laine Stump)
- document managed=yes of hostdev passthrough (Eric Blake)
- trivial spelling fix (Philipp Hahn)
- Fix virt-sanlock-cleanup documentation (Philipp Hahn)
- Fix two comments related to error handling (Philipp Hahn)
- fix network XML documentation (Laine Stump)
- Clarify semantics of virDomainMigrate2 (Jiri Denemark)
- Update examples for probing with systemtap (Daniel P. Berrange)
- fix html bug (Eric Blake)
- virsh: Update the help information for undefine command. (tangchen)
- Document STREQ_NULLABLE and STRNEQ_NULLABLE (Guido Günther)
- Document that ff callbacks need to be invoked from a clean stack. (Guido Günther)
- formatdomain.html.in: fix tickpolicy (Douglas Schilling Landgraf)
- virsh: describe attach-interface parameter target (Daniel Veillard)
- virsh: update man page for cpu_shares parameter (Daniel Veillard)
- document node device XML (Eric Blake)
- document virsh nodedev-* commands (Eric Blake)
- snapshot: fix man page typos (Eric Blake)
- virsh: Better document --copy-storage migrate options (Jiri Denemark)
- virsh: Enhance documentation of commands starting jobs (Jiri Denemark)
- virsh: Improve virsh manual for virsh memtune command (Peter Krempa)
Portability:
- build: fix build on platforms without ptsname_r (Eric Blake)
- build: silence compiler warning on BSD (Eric Blake)
- build: fix linking on BSD (Eric Blake)
- remote: fix mingw32 build (Laine Stump)
- build: fix deep VPATH builds (Eric Blake)
- Use ENAMETOOLONG if the the socket path is longer than UNIX_PATH_MAX (Guido Günther)
- build: avoid RHEL 5 build failure on LXC (Eric Blake)
- build: use gnulib fdatasync (Eric Blake)
- Fix virFileOpenTty definition on Win32 (Daniel P. Berrange)
- compile: fix undefined reference to gnutls_x509_crt_get_dn with gcc-4.6.1 (Xu He Jie)
- Fix VPATH build (Jiri Denemark)
- build: fix 'make dist' error (Wen Congyang)
- Fix syntax problem in mingw32-libvirt.spec.in (Daniel P. Berrange)
- spec: mingw cleanups (Eric Blake)
- build: fix mingw build without sasl (Eric Blake)
- build: fix 'make rpm' (Eric Blake)
- build: fix 'make distcheck' (Eric Blake)
- disable xenlight for non-Xen platforms (Dan Horák)
- build: Fix VPATH build with new probes (Jiri Denemark)
- build: fix 'make distcheck' with pdwtags installed (Eric Blake)
- spec: F15 still uses cgconfig, RHEL lacks hyperv (Eric Blake)
Bug Fixes:
- Fix sending/receiving of FDs when stream returns EAGAIN (Daniel P. Berrange)
- lxc: avoid use-after-free (Eric Blake)
- conf: Don't free uninitialized pointer (Jiri Denemark)
- Fix default console type setting (Daniel P. Berrange)
- Fix crash formatting virtio console (Daniel P. Berrange)
- Fix off-by-one printing month in logging code (Daniel P. Berrange)
- Add missing param initialization in qemuDomainBlockStatsFlags (Daniel P. Berrange)
- fix crash when starting network (Wen Congyang)
- Don't overwrite error message during VM cleanup (Daniel P. Berrange)
- Correctly handle '*' in /etc/filesystems (Daniel P. Berrange)
- Fix URI alias prefix matching (Wen Ruo Lv)
- ServerClient: Flush cached data (Michal Privoznik)
- Fix storage pool source comparison to avoid comparing with self (Daniel P. Berrange)
- qemu: plug memory leak (Alex Jia)
- qemu: Restore the original states of PCI device when restarting daemon (Osier Yang)
- macvtap: Fix error return value convention/inconsistencies (Roopa Prabhu)
- pci address conflict when virtio disk with drive type (Xu He Jie)
- qemu: plug memory leak (Alex Jia)
- qemu: avoid leaking uninit data from hotplug to dumpxml (Eric Blake)
- util: Fix virUUIDGeneratePseudoRandomBytes (Ryota Ozaki)
- lxc: Revert zeroing count of allocated items if VIR_REALLOC_N fails (Peter Krempa)
- lxc: avoid null deref on lxcSetupLoopDevices failure (Alex Jia)
- lxc: avoid missing '{' in the function (Alex Jia)
- storage: avoid null deref on qemu-img failure (Eric Blake)
- storage: make previous leak less likely to regress (Eric Blake)
- storage: plug iscsi memory leak (Eric Blake)
- qemu: avoid leaking uninit data from hotplug to dumpxml (Eric Blake)
- qemu: Do not wait if the PCI device is not managed when reattaching (Osier Yang)
- Add missing strdup return value check (Roopa Prabhu)
- macvtap: avoid invalid free (Roopa Prabhu)
- util: Fix typo in virGetHostname description (Jiri Denemark)
- macvtap: plug memory leak for 802.1Qbh (Eric Blake)
- qemu: plug memory leak on migration (Eric Blake)
- conf: plug memory leak on error (Eric Blake)
- storage: plug memory leak on error (Eric Blake)
- util: Make getaddrinfo failure nonfatal in virGetHostname (Jiri Denemark)
- qemu: fix text block info parsing (Eric Blake)
- qemu: avoid text monitor null deref (Eric Blake)
- qemu: check for json allocation failure (Eric Blake)
- virFDStream: close also given errfd (fd leak) (Marc-André Lureau)
- command: avoid fd leak on failure (Eric Blake)
- qemu: Check for domain being active on successful job acquire (Michal Privoznik)
- xen: Return tap2 for tap2 disks (Philipp Hahn)
- xen: fix PyGrub boot device order (Philipp Hahn)
- build: fix 'make check' linkage with dtrace (Eric Blake)
- Fix deps for probes.o to ensure correct build ordering (Daniel P. Berrange)
- If receiving a stream error, mark EOF on the stream (Daniel P. Berrange)
- xen_xs: Guard against set but empty kernel argument (Guido Günther)
- snapshot: avoid accidental renames with snapshot-edit (Eric Blake)
- storage: Do not use comma as seperator for lvs output (Osier Yang)
- qemuDomainAttach: Initialize pidfile variable (Michal Privoznik)
- lxc: fix logic bug (Eric Blake)
- Don't send back unknown program errors for async messages (Daniel P. Berrange)
- Fix deadlock when the RPC program is unknown (Daniel P. Berrange)
- remote_driver: Avoid double free in EventControl building (Michal Privoznik)
- xenParseXM: don't dereference NULL pointer when script is empty (Guido Günther)
- qemu: Fix migration with dname (Jiri Denemark)
- virsh: do not unlink NULL file (Marc-André Lureau)
- qemu: Fix error message mentioning VNC instead of SPICE (Peter Krempa)
- qemu: Check for ejected media during startup and migration (Michal Privoznik)
- qemu: add return value check (Alex Jia)
- qemu: Always remove domain object if MigratePrepare fails (Jiri Denemark)
- fix AppArmor driver for pipe character devices (Jamie Strandboge)
- daemon: Don't remove pidfiles in init scripts (Peter Krempa)
- storage: Do not break the whole vol lookup process in the middle (Osier Yang)
- Fix synchronous reading of stream data (Daniel P. Berrange)
Improvements:
- Add missing defaultConsoleTargetType callback for AppArmour (Daniel P. Berrange)
- Fix naming of constant for disk event (Daniel P. Berrange)
- lxc: use common code for process cleanup (Eric Blake)
- Set aliases for LXC/UML console devices (Daniel P. Berrange)
- Default console target type with no <target> element (Daniel P. Berrange)
- Add support for multiple consoles in LXC (Daniel P. Berrange)
- Rewrite LXC I/O forwarding to use main event loop (Daniel P. Berrange)
- Allow multiple consoles per virtual guest (Daniel P. Berrange)
- virnetsockettest: Use a temporary directory in /tmp (Guido Günther)
- xen: allow getting < max typed parameters (Eric Blake)
- lxc: allow getting < max typed parameters (Eric Blake)
- libxl: allow getting < max typed parameters (Eric Blake)
- esx: allow getting < max typed parameters (Eric Blake)
- qemu: allow getting < max typed parameters (Eric Blake)
- Add support for probing filesystem with libblkid (Daniel P. Berrange)
- Fix error message when failing to detect filesystem (Daniel P. Berrange)
- Workaround for broken kernel autofs mounts (Daniel P. Berrange)
- Ensure errno is valid when returning from lxcContainerWaitForContinue (Daniel P. Berrange)
- Create /var/lib/libvirt/filesystems for LXC trees (Daniel P. Berrange)
- esx: Support folders in the path of vpx:// connection URIs (Matthias Bolte)
- qemu: pass virConnectPtr into Domain{Attach,Detach}* (Sage Weil)
- vbox: Support shared folders (Matthias Bolte)
- xenapi: Improve error reporting in xenapiOpen once again (Matthias Bolte)
- Use a common xml type for ceph secret usage. (Josh Durgin)
- storage: add auth to virDomainDiskDef (Josh Durgin)
- secret: add Ceph secret type (Sage Weil)
- Implement RPC driver support for virDomainOpenGraphics (Daniel P. Berrange)
- Extend RPC server to allow FD passing (Daniel P. Berrange)
- Add client side support for FD passing (Daniel P. Berrange)
- Extend RPC protocol to allow FD passing (Daniel P. Berrange)
- Add APIs for virNetSocket for sending/receiving file descriptors (Daniel P. Berrange)
- Wire up QEMU implementation for virDomainOpenGraphics (Daniel P. Berrange)
- Extend graphics event to include UNIX socket (Daniel P. Berrange)
- virsh: Fix error message on vol-create-from failure (Ryota Ozaki)
- bridge: modify for use when sVirt is enabled with qemu (Tyler Coumbes)
- Use virXMLSaveFile when writing XML config (Jiri Denemark)
- Introduce virXMLSaveFile as a wrapper for virFileRewrite (Jiri Denemark)
- Introduce virFileRewrite for safe file rewrite (Jiri Denemark)
- Add a systemtap script for watching QEMU monitor interactions (Daniel P. Berrange)
- qemu: simplify use of HAVE_YAJL (Eric Blake)
- snapshot: simplify indentation of disk encryption xml (Eric Blake)
- snapshot: simplify indentation of nwfilter (Eric Blake)
- Add REMOTE_PROC_DOMAIN_EVENT_DISK_CHANGE to remote_protocol-structs (Daniel P. Berrange)
- nwfilter: extend schema to support new targets (Stefan Berger)
- util: Add virFileAccessibleAs to private symbols (Michal Privoznik)
- startupPolicy: Emit event on disk source dropping (Michal Privoznik)
- qemu: implement startupPolicy (Michal Privoznik)
- qemu: Move device alias assigning before command line construction (Michal Privoznik)
- util: Create virFileAccessibleAs function (Michal Privoznik)
- conf: Introduce optional startupPolicy attribute for cdrom and floppy (Michal Privoznik)
- waitpid: improve safety (Eric Blake)
- virsh: Fix vol-info's 'Type' output (Ryota Ozaki)
- support continue/return targets in nwfilter (David L Stevens)
- snapshot: simplify indentation of network xml (Eric Blake)
- snapshot: simplify indentation of cpu features (Eric Blake)
- snapshot: simplify indentation of sysinfo (Eric Blake)
- snapshot: test domainsnapshot indentation (Eric Blake)
- snapshot: indent domain xml when nesting (Eric Blake)
- virbuf: add auto-indentation support (Eric Blake)
- virbuf: more detailed error reporting (Eric Blake)
- virbuf: improve testsuite reporting (Eric Blake)
- virbuf: fix const-correctness (Eric Blake)
- qemu: allow json in domxml-to-native (tangchen)
- support setting bandwidth from virsh attach-interface (Hu Tao)
- lxc: use hand-rolled code in place of unlockpt and grantpt (Serge E. Hallyn)
- qemu: Test name-space handling (Philipp Hahn)
- qemu: Fix name-space handling (Philipp Hahn)
- Replace virBufferAdd with virBufferAddLit for const string (Daniel P. Berrange)
- Allow for URI aliases when connecting to libvirt (Daniel P. Berrange)
- Add support for autodestroy of guests to the LXC and UML drivers (Daniel P. Berrange)
- Use virBufferEscapeShell in cmdEcho (Guido Günther)
- qemu: replace qemuMonitorEscapeShell by virBufferEscapeShell (Guido Günther)
- virBufferEscapeShell: Emit quotes for the empty string (Guido Günther)
- snapshot: detect when qemu lacks disk-snapshot support (Eric Blake)
- virBufferEscapeShell: Fix escaping of single quotes. (Guido Günther)
- compile: Add a missing function 'pciDeviceListFind' to libvirt_private.syms (Xu He Jie)
- snapshot: implement LIST_LEAVES flag in esx (Eric Blake)
- qemu: Relax -no-shutdown check to [0.14.0, 0.15.0] (Jiri Denemark)
- qemu: Honor the orginal PCI dev properties when reattaching (Osier Yang)
- qemu: Do not reattach PCI device used by other domain when shutdown (Osier Yang)
- Xen: Fake versions in xencapstest (Philipp Hahn)
- Xen: move versions to struct (Philipp Hahn)
- Use virBufferEscapeShell in virNetSocketNewConnectSSH (Guido Günther)
- Add virBufferEscapeShell (Guido Günther)
- Autodetect if the remote nc command supports the -q option (Guido Günther)
- qemu: Make sure BeginJob is always followed by EndJob (Jiri Denemark)
- qemu: Log debug messages when changing job (Jiri Denemark)
- build: add compiler attributes to virUUIDParse (Eric Blake)
- Fix typo in lxc_controller (Serge E. Hallyn)
- build: update to latest gnulib (Eric Blake)
- events: Propose a separate lock for event queue (Michal Privoznik)
- qemu: Implement VIR_DUMP_RESET (Michal Privoznik)
- virDomainCoreDump: Introduce VIR_DUMP_RESET flag (Michal Privoznik)
- example: Support debug output and loop switch (Philipp Hahn)
- example: Redirect --help output to stdout/stderr (Philipp Hahn)
- example: Fix argument handling (Philipp Hahn)
- snapshot: implement LIST_LEAVES flag in qemu (Eric Blake)
- snapshot: add API for filtering by leaves (Eric Blake)
- tests: Add support for skipping tests (Philipp Hahn)
- Introduce <driver> under <filesystem> to support open-by-handle (Harsh Prateek Bora)
- buf: implement generic virBufferEscape (Sage Weil)
- daemon: Always advertise libvirtd service (Osier Yang)
- snapshot: take advantage of new relations (Eric Blake)
- snapshot: track qemu snapshot relations (Eric Blake)
- snapshot: framework for more efficient relation traversal (Eric Blake)
- snapshot: use correct qmp monitor command (Eric Blake)
- snapshot: virsh shorthand for operating on current snap (Eric Blake)
- build: ship helper scripts (Eric Blake)
- Rewrite all the DTrace/SystemTAP probing (Daniel P. Berrange)
- Fix missing lock calls on virNetTLSContextRef (Daniel P. Berrange)
- Refactor TLS to facilitate dynamic probing (Daniel P. Berrange)
- Add virSocketRef API to facilitate dynamic probing (Daniel P. Berrange)
- Make libvirt.so include the RPC server code (Daniel P. Berrange)
- snapshot: implement snapshot children listing in esx (Eric Blake)
- snapshot: implement snapshot children listing in qemu (Eric Blake)
- snapshot: remote protocol for snapshot children (Eric Blake)
- snapshot: virsh fallback for snapshot-list --descendants --from (Eric Blake)
- snapshot: virsh fallback for snapshot-list --from children (Eric Blake)
- snapshot: virsh fallback for snapshot-list --tree --from (Eric Blake)
- snapshot: virsh snapshot-list and children (Eric Blake)
- xen: add error handling to UUID parsing (Guido Günther)
- maint: typo fixes (Eric Blake)
- snapshot: sort snapshot-list --tree (Eric Blake)
- snapshot: simplify redefinition of disk snapshot (Eric Blake)
- snapshot: let virsh edit disk snapshots (Eric Blake)
- snapshot: fix virsh error message typo (Eric Blake)
- qemu: add separate rerror_policy for disk errors (Laine Stump)
- qemu: leave rerror policy at default when enospace is requested (Laine Stump)
- qemu: enable multifunction for older qemu (Eric Blake)
- Make LXC work with new network configuration types (Daniel P. Berrange)
- init: raise default system aio limits (Eric Blake)
- maint: fix minor issues in virterror public header (Eric Blake)
- snapshot: enforce REVERT_FORCE on qemu (Eric Blake)
- snapshot: use qemu-img on disks in use at time of snapshot (Eric Blake)
- snapshot: add REVERT_FORCE to API (Eric Blake)
- snapshot: implement snapshot roots listing in vbox (Eric Blake)
- qemu: Don't fail virDomainGetInfo if we can't update balloon info (Jiri Denemark)
- snapshot: simplify esx snapshot name lookup (Eric Blake)
- snapshot: implement snapshot roots listing in esx (Eric Blake)
- qemu: correct misspelled 'enospc' option, and only use for werror (Laine Stump)
- snapshot: better virsh handling of missing current, parent (Eric Blake)
- Allow passing of command line args to LXC container (Daniel P. Berrange)
- Add support for bandwidth filtering on LXC guests (Daniel P. Berrange)
- network: fill in bandwidth from portgroup for all forward modes (Laine Stump)
- bridge_driver.c: Fix autoconf setting (Neil Wilson)
- Set to NULL members that have been freed to prevent crashes (Marc-André Lureau)
- snapshot: implement getparent for vbox (Eric Blake)
- snapshot: implement getparent for esx (Eric Blake)
- qemu: make PCI multifunction support more manual (Laine Stump)
- lvm storage backend: handle command_names=1 in lvm.conf (Serge E. Hallyn)
- qemu: Check for outstanding async job too (Michal Privoznik)
- virsh: Add 'reset' command for virsh (Xu He Jie)
- remote: Implement 'reset' for remote driver (Xu He Jie)
- qemu: Implement 'reset' for qemu driver (Xu He Jie)
- logging: Add date to log timestamp (Jiri Denemark)
- logging: Do not log timestamp through syslog (Jiri Denemark)
- hyperv: Report an error for acceptable URI schemes with a transport (Matthias Bolte)
- esx: Report an error for acceptable URI schemes with a transport (Matthias Bolte)
- snapshot: implement getparent in qemu (Eric Blake)
- snapshot: add virsh snapshot-list --tree (Eric Blake)
- snapshot: refactor virsh snapshot parent computation (Eric Blake)
- snapshot: remote protocol for getparent (Eric Blake)
- security: properly chown/label bidirectional and unidirectional fifos (Laine Stump)
- qemu: Preserve fakeReboot flag in domain status (Jiri Denemark)
- qemu: Finish domain shutdown on reconnect (Jiri Denemark)
- qemu: Check domain status details when reconnecting monitor (Jiri Denemark)
- virsh: Allow using complete <capabilities> elements with cpu-baseline (Peter Krempa)
- virsh: Allow using domain and capabilities XMLs with cpu-compare (Peter Krempa)
- qemu: add ability to set PCI device "rombar" on or off (Laine Stump)
- qemu: Relax -no-shutdown check to [0.14.0, 0.15.50) (Jiri Denemark)
- virLockManagerNopInit: Rename flags to unused_flags (Michal Privoznik)
- debug: Annotate some variables as unused (Michal Privoznik)
- maint: update authors (Peter Krempa)
- Add unsafe cache mode support for disk driver (Oskari Saarenmaa)
- selinux: Correctly report warning if virt_use_nfs not set (Michal Privoznik)
- virsh: Do not ignore the specified flags for cmdSaveImageDefine (Osier Yang)
- qemu: Transfer inactive XML among cookie (Michal Privoznik)
Cleanups:
- Remove translations in socket test case (Daniel P. Berrange)
- test: drop redundant check (Eric Blake)
- startupPolicty: Minor cleanups (Michal Privoznik)
- secret: fix bad patch application (Eric Blake)
- Remove trailing whitespace from all xfig files (Daniel P. Berrange)
- Fix typo in virFileAccessibleAs (Daniel P. Berrange)
- snapshot: minor cleanups from reviewing indentation (Eric Blake)
- build: ignore test executable (Eric Blake)
- esx: drop dead code to silence Coverity (Eric Blake)
- snapshot: drop dead parameters (Eric Blake)
- qemu: silence Coverity false positive (Eric Blake)
- conf: remove unused VIR_ENUM_DECL (Laine Stump)
thanks to everybody who helped for this release, by reporting bugs,
providing ideas, patches, or documentation !
Daniel
--
Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/
daniel(a)veillard.com | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library http://libvirt.org/
13 years
[libvirt] [PATCH] [configure] Fix libvirt dependency, and use $VAPIGEN
by nirbheek@gentoo.org
This is a rather trivial patch to raise the minimum libvirt dependency; at least
0.9.4 is required. In addition, it fixes the direct usage of `vapigen`, and uses
the result of the AC_PATH_PROG(VAPIGEN ...) call earlier so that the binary to
be used can be overridden as that macro was meant to allow.
Thanks!
configure.ac | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
13 years
[libvirt] [PATCH] Add missing defaultConsoleTargetType callback for AppArmour
by Daniel P. Berrange
From: "Daniel P. Berrange" <berrange(a)redhat.com>
Every instance of virCapsPtr must have the defaultConsoleTargetType
field set.
* src/security/virt-aa-helper.c: Add defaultConsoleTargetType to
virCapsPtr
---
src/security/virt-aa-helper.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/src/security/virt-aa-helper.c b/src/security/virt-aa-helper.c
index 71a4586..e8e77ba 100644
--- a/src/security/virt-aa-helper.c
+++ b/src/security/virt-aa-helper.c
@@ -685,6 +685,11 @@ caps_mockup(vahControl * ctl, const char *xmlStr)
return rc;
}
+static int aaDefaultConsoleType(const char *ostype ATTRIBUTE_UNUSED)
+{
+ return VIR_DOMAIN_CHR_CONSOLE_TARGET_TYPE_SERIAL;
+}
+
static int
get_definition(vahControl * ctl, const char *xmlStr)
{
@@ -703,6 +708,8 @@ get_definition(vahControl * ctl, const char *xmlStr)
goto exit;
}
+ caps->defaultConsoleTargetType = aaDefaultConsoleType;
+
if ((guest = virCapabilitiesAddGuest(ctl->caps,
ctl->hvm,
ctl->arch,
--
1.7.6.4
13 years
[libvirt] Failing pool deletion testcase
by Guido Günther
Hi,
when running libvirt-tck I'm seeing this test failure:
# Failed test 'deleted pool'
# at /usr/share/libvirt-tck/tests/storage/110-disk-pool.t line 120.
# died: Sys::Virt::Error (libvirt error code: 3, message: this function is not supported by the connection driver: pool does not support pool deletion
# )
because pool deletion isn't supported by the disk storage backend. Since
the test is there I wonder if there are patches floating around already
to implement it? If not I guess wiping the partition table followed by a
"blockdev --reread-pt" would be the right approach?
Cheers,
-- Guido
13 years