Jim Meyering [Fri, 22 Aug 2008 08:32:58 +0000 (08:32 +0000)]
configure.in: link with -lpthread when necessary
* configure.in: Explicitly add -lpthread to $LIBS.
With an empty "ACTION_IF_FOUND", AC_CHECK_LIB would have done
that for us automatically, but when there is an explicit third
argument, those commands are run instead of the default.
Reported by Jun Koi <junkoi2004@gmail.com>.
Jim Meyering [Thu, 21 Aug 2008 19:31:55 +0000 (19:31 +0000)]
autobuild.sh: Fix minor shell-quoting bugs.
* autobuild.sh: Remove unnecessary quotes.
Don't choke on a file name argument containing a space.
Don't misbehave for $AUTOBUILD_INSTALL_ROOT containing
a shell meta-character.
Daniel Veillard [Wed, 20 Aug 2008 13:44:03 +0000 (13:44 +0000)]
add cpu management functionality to OpenVZ driver
* src/openvz_conf.c src/openvz_driver.c: patch from Evgeniy Sokolov
to limit the number of CPUs used by OpenVZ domains.
Daniel
Daniel Veillard [Wed, 20 Aug 2008 13:33:01 +0000 (13:33 +0000)]
Fix creating and cleaning up logical volumes if a target path is specified
* src/storage_backend_logical.c: Patch from Cole Robinson, fix
creating and cleaning up logical volumes if a target path is
specified.
Daniel
Daniel Veillard [Wed, 20 Aug 2008 13:16:29 +0000 (13:16 +0000)]
Handle HTML generation in the absence of XHTML1 DTDs
* configure.in libvirt.spec.in docs/Makefile.am: fix the problem
of HTML generation in the absence of XHTML1 DTDs in the system
catalog.
Daniel
Daniel Veillard [Tue, 12 Aug 2008 11:26:00 +0000 (11:26 +0000)]
rename the disk type from 'dos' to 'msdos'
* docs/storage.html[.in] src/storage_backend_disk.c: patch from
Cole Robinson to rename the disk type from 'dos' to 'msdos'
Daniel
Daniel Veillard [Tue, 12 Aug 2008 08:11:09 +0000 (08:11 +0000)]
Fix connection lookup in python storage instances
* python/generator.py: patch from Cole Robinson trying to fix
problem of connection lookup when creating storage instances
Daniel
Jim Meyering [Mon, 11 Aug 2008 12:29:58 +0000 (12:29 +0000)]
tests: append a newline to expected-output files lacking NL-at-EOF
* tests/qemuxml2argvtest.c (testCompareXMLToArgvFiles): Adjust the
code that creates "actual" output, so that it too produces a
newline-terminated buffer.
* tests/qemuxml2argvdata/*.args: Append a newline to each, via:
for i in $(find|grep '\.args$'); do echo >> $i;done
Daniel Veillard [Fri, 8 Aug 2008 15:03:00 +0000 (15:03 +0000)]
llow to add a disk as an USB device (QEmu/KVM)
* src/domain_conf.c src/domain_conf.h src/qemu_conf.c
src/qemu_driver.c: patch from Guido Günther allowing to add
disk as USB devices
* docs/libvirt.rng: extend the schemas for the new value
* tests/qemuxml2argvdata/qemuxml2argv-disk-usb.args
tests/qemuxml2argvdata/qemuxml2argv-disk-usb.xml
tests/qemuxml2argvtest.c tests/qemuxml2xmltest.c: add a specific
test to the regression suite
Daniel
Daniel Veillard [Fri, 8 Aug 2008 14:27:05 +0000 (14:27 +0000)]
Extend parser and add support for USB devices in QEmu/KVM
* src/domain_conf.c src/domain_conf.h src/qemu_conf.c
src/qemu_driver.c: Patch from Guido Günther allowing to pass
usb devices to qemu/kvm
* docs/libvirt.rng: add the new functionality to the grammar
* tests/qemuxml2argvdata/qemuxml2argv-hostdev-usb-address.args
tests/qemuxml2argvdata/qemuxml2argv-hostdev-usb-address.xml
tests/qemuxml2argvdata/qemuxml2argv-hostdev-usb-product.args
tests/qemuxml2argvdata/qemuxml2argv-hostdev-usb-product.xml
tests/qemuxml2argvtest.c tests/qemuxml2xmltest.c: adding examples
to the regression tests
* libvirt.spec.in: fix the licence tag
Daniel
Jim Meyering [Thu, 7 Aug 2008 13:02:45 +0000 (13:02 +0000)]
add the mkstemp module from gnulib
* bootstrap (modules): Add mkstemp.
The remainder of these changes are the result of running
./bootstrap, adding new files, and committing the result.
* gnulib/lib/gettimeofday.c: New file.
* gnulib/lib/mkstemp.c: New file.
* gnulib/lib/tempname.c: New file.
* gnulib/lib/tempname.h: New file.
* gnulib/m4/gettimeofday.m4: New file.
* gnulib/m4/mkstemp.m4: New file.
* gnulib/m4/tempname.m4: New file.
* gnulib/tests/test-gettimeofday.c: New file.
* gnulib/lib/Makefile.am: Update.
* gnulib/m4/gnulib-cache.m4: Likewise.
* gnulib/m4/gnulib-comp.m4: Likewise.
* gnulib/m4/inet_pton.m4: Likewise.
* gnulib/tests/Makefile.am: Likewise.
Jim Meyering [Wed, 6 Aug 2008 12:08:49 +0000 (12:08 +0000)]
work around MinGW build failure due to its lack of inet_aton
Use inet_pton instead; pull in gnulib's module by the same name.
* src/network_conf.c (virNetworkDefParseXML): Use inet_pton,
rather than inet_aton.
* bootstrap (modules): Add inet_pton.
* gnulib/lib/inet_pton.c: New file, from gnulib.
DanB pointed out that my sexpr xend_internal patch from yesterday broke one of
the regression tests. The problem is that the xenDaemonFormatSxpr{Disk,Net}
functions are shared between domain creation time and attaching disk time.
Unfortunately, though, Xend expects something different during these two times.
During domain creation time, it wants the "(device" in front of the sexpr,
while during attach time it does not. To remedy this situation, I added a flag
to these two functions to differentiate between these two modes. With this
patch in place, all of the regression tests pass.
Signed-off-by: Chris Lalancette <clalance@redhat.com>
With the recent refactoring of the domain code, plus the changes with the Xend
code, a couple of bugs were introduced into the attach-disk and attach-interface
functionality. This patch fixes 3 bugs:
1) In xenDaemonAttachDevice(), there is a switch statement to determine which
of the xenDaemonFormatSxpr{Disk,Net} functions to call. Unfortunately, the case
statements are all missing the corresponding "break", so we always fall-through
to the default error case. This patch just adds the appropriate break statements.
2) (minor) In xenDaemonDomainDefineXML (that's a mouthful!), there is a stray
"fprintf". This is now converted to a proper virXendError().
3) xenDaemonFormatSxpr{Disk,Net} were adding an extra (device to the front of
the sexpr expressions that xend did not expect (this is Xend on RHEL 5.2).
Because of this, the attaches would fail. The patch fixes this by removing the
(device from the front, which makes attach-disk and attach-interface work again.
Signed-off-by: Chris Lalancette <clalance@redhat.com>
Recently upstream Xen added support for having xvd devices > 16. For the most
part, this doesn't really concern libvirt, since for things like attach and
detach we just pass it through and let xend worry about whether it is supported
or not. The one place this breaks down is in the stats collecting code, where
we need to figure out the device number so we can go digging in /sys for the
statistics.
To remedy this, I've re-written xenLinuxDomainDeviceID() to use regular
expressions to figure out the device number from the name. The major advantage
is that now xenLinuxDomainDeviceID() looks fairly identical to
tools/python/xen/util/blkif.py (in the Xen sources), so that adding additional
devices in the future should be much easier. It also reduces the size of the
code, and, in my opinion, the code complexity.
With this patch in place, I was able to get block statistics both on older style
devices (/dev/xvda) and on the new, expanded devices (/dev/xvdaa).
Signed-off-by: Chris Lalancette <clalance@redhat.com>
Daniel Veillard [Tue, 5 Aug 2008 10:53:05 +0000 (10:53 +0000)]
saving UUID of new OpenVZ domains
* src/openvz_conf.c src/openvz_conf.h src/openvz_driver.c: patch
from Evgeniy Sokolov saving the UUID when creating or defining
a domain.
Daniel
'virsh edit' and related commands
* src/virsh.c: Implement 'virsh edit', 'virsh net-edit' and
'virsh pool-edit' commands. These edit the XML for domains,
networks and storage pools respectively, and are the
equivalent of doing 'virsh dumpxml; vi foo.xml; virsh define'
* src/Makefile.am, src/.cvsignore: Auto-generate the net-edit
and pool-edit commands.
* docs/virsh.pod: Updated the documentation.
Improve error messages when XML is not well-formed.
* src/domain_conf.c, src/network_conf.c, src/storage_conf.c:
Improve error messages from commands such as 'virsh define'
when the XML is not well-formed by passing libxml2 errors
back out through virterror.
Daniel Veillard [Fri, 1 Aug 2008 06:42:45 +0000 (06:42 +0000)]
* docs/formatdomain.html docs/formatdomain.html.in docs/libvirt-api.xml
docs/libvirt-refs.xml docs/html/libvirt-libvirt.html src/libvirt.c:
fixed somedocs and API entry point descriptions as suggested by
Charles Duffy and regenerated the API descriptions.
Daniel
Chris Lalancette [Thu, 31 Jul 2008 12:30:34 +0000 (12:30 +0000)]
From Charles Duffy:
Per subject; if autoport is in use for a host, the current
virDomainGraphicsDefFormat code always emits "port=-1", even if a port
is assigned to the host; this leaves no way for a client to find the VNC
port assigned to the host in question.
This patches fixes it by putting the vncport in place if there is one, and
only putting "-1" if we fail that test.
This used to work with older libvirt, but now fails. This is because we are
actually passing the literal string (null) to the qemu command-line, which qemu
barfs on. This patch fixes it up by making it blank, which allows qemu to
continue on it's merry way.
Signed-off-by: Chris Lalancette <clalance@redhat.com>
Daniel Veillard [Tue, 29 Jul 2008 08:42:56 +0000 (08:42 +0000)]
build OpenVZ and LXC support by default, fix OpenVZ build
* src/openvz_conf.c: fix compilation with new XPath interface
signatures
* configure.in: build OpenVZ and LXC support by default
Daniel
Daniel Veillard [Mon, 28 Jul 2008 14:06:54 +0000 (14:06 +0000)]
OpenVZ xml refactoring
* src/domain_conf.[ch] src/openvz_conf.[ch] src/openvz_driver.c:
patch from Evgeniy Sokolov doing the OpenVZ xml refactoring,
still needs to be ported to the new XML parsing code but
implements the new format.
Daniel
Daniel Veillard [Fri, 25 Jul 2008 12:37:06 +0000 (12:37 +0000)]
Skip python bindings for virDomainBlockPeek and virDomainMemoryPeek
* python/generator.py: skip generation for virDomainBlockPeek and
virDomainMemoryPeek as they break the build
Daniel