* tests/virsh-synopsis: new file
* tests/Makefile.am (test_scripts): Add virsh-synopsis.
* src/virsh.c: Correct help SYNOPSIS for each of seven commands.
When I first ran this script, "make check" failed like this:
...
invalid help SYNOPSIS for net-create:
create a network from an XML <file>
invalid help SYNOPSIS for net-define:
define a network from an XML <file>
invalid help SYNOPSIS for net-start:
start <network>
invalid help SYNOPSIS for pool-create:
create a pool from an XML <file>
invalid help SYNOPSIS for pool-define:
define a pool from an XML <file>
invalid help SYNOPSIS for pool-start:
start <pool>
invalid help SYNOPSIS for vol-create:
create <file>
FAIL: virsh-synopsis
* qemud/remote.c qemud/remote_dispatch_localvars.h
qemud/remote_dispatch_proc_switch.h qemud/remote_dispatch_prototypes.h
qemud/remote_protocol.c qemud/remote_protocol.h
qemud/remote_protocol.x src/driver.h src/libvirt.c
src/libvirt_internal.h src/libvirt_sym.version src/lxc_driver.c
src/openvz_driver.c src/qemu_conf.h src/qemu_driver.c
src/remote_internal.c src/test.c src/virsh.c: large patch to
add migration support for KVM/QEmu, based on the work of Rich Jones
and Chris Lalancette. This introduce a new version of the prepare
and finish steps of the migration, so changes the driver API and
a lot of code.
Daniel
ability to resolve any kind of volume path to the pool target volume
path. For instance, if the pool was defined with a
<target><path>/dev/disk/by-id</path></target> section, and one of the
volumes is /dev/disk/by-id/scsi-S_beaf11, then you would be able to
call virStorageVolLookupByPath("/dev/sdc"), and get the correct volume
back.
Signed-off-by: Chris Lalancette <clalance@redhat.com>
* src/socketcompat.h: Remove file.
* src/remote_internal.c: Don't include socketcompat.h.
* qemud/qemud.h: Likewise.
* qemud/remote_protocol.x: Likewise, but do include <arpa/inet.h>
for htonl.
* src/remote_internal.c: Likewise, but do include <errno.h>.
* qemud/remote_protocol.c: Regenererate.
* qemud/remote_protocol.h: Regenererate.
* src/Makefile.am (REMOTE_DRIVER_SOURCES): Remove socketcompat.h.
* src/storage_backend.c (backends): Add a NULL terminator.
(virStorageBackendForType): Use NULL terminator rather than
warning-provoking (possibly 0) array size.
<sources> tags properly, and I didn't put the <source> tag into the
proper place, so I totally changed the output of the discovery XML.
Fix this up to do the right thing.
Signed-off-by: Chris Lalancette <clalance@redhat.com>
* include/libvirt/libvirt.h include/libvirt/libvirt.h.in
src/libvirt.c src/libvirt_sym.version: new libvirt event entry
points, big patch provided by Ben Guthro
* Makefile.am configure.in src/driver.h src/event.c src/event.h
src/internal.h src/libvirt.c src/libvirt_sym.version src/lxc_driver.c
src/openvz_driver.c src/qemu_conf.h src/qemu_driver.c
src/remote_internal.c src/storage_backend_fs.c src/test.c
qemud/event.c qemud/event.h qemud/mdns.c qemud/qemud.c
qemud/qemud.h qemud/remote.c qemud/remote_dispatch_localvars.h
qemud/remote_dispatch_proc_switch.h qemud/remote_dispatch_prototypes.h
qemud/remote_protocol.c qemud/remote_protocol.h
qemud/remote_protocol.x proxy/Makefile.am python/generator.py:
Not much is left untouched by the patch adding the events support
* docs/libvirt-api.xml docs/libvirt-refs.xml
docs/html/libvirt-libvirt.html: regenerated the docs
* examples/domain-events/events-c/Makefile.am
examples/domain-events/events-c/event-test.c: a test example
* AUTHORS: added Ben Guthro
daniel
findPoolSources. Given danpb's last feedback, I completely removed the XML
parsing and did it all with structures. The result should (hopefully) be a lot
easier on the eyes, and is a little more generic.
Signed-off-by: Chris Lalancette <clalance@redhat.com>
cleanup patch, add a ".defaultFormat" member to .poolOptions. In
storage_conf.c, if virXPathString(/pool/source/format/@type) returns NULL, then
set the pool type to .defaultFormat; otherwise, lookup the type via
formatFromString.
Signed-off-by: Chris Lalancette <clalance@redhat.com>
<pool type='logical'>
<source>
<name>MyVG</name>
<device name='/dev/sdb'/>
...
However, dumping out the XML for this same storage pool (with, say, virsh
pool-dumpxml), gives:
<pool type='logical'>
<source>
<name>MyVG</name>
<device name='/dev/sdb'>
</device>
To make this more idempotent, do the <device name='/dev/sdb'/> form by default,
and only do the <device>...</device> form if .nfreeExtent is defined for the
storage pool.
Signed-off-by: Chris Lalancette <clalance@redhat.com>
and virStorage*ToString implementations to the generic VIR_ENUM_IMPL, there were
a couple of places that didn't properly set errors when they failed. This patch
fixes these places up.
Signed-off-by: Chris Lalancette <clalance@redhat.com>
storage XML to libvirtd, which was saved in /etc/libvirt/storage. On subsequent
stop/start of libvirtd, because of another bug , an
error wasn't being set properly in an error path, so libvirtd was SEGV'ing in
storage_conf.c:virStoragePoolObjLoad when trying to dereference the NULL err
returned from virGetLastError(). Make this more robust against errors by always
doing "err ? err->message : NULL" in the printf. I looked around the tree and
found a couple of other places that weren't guarded, so this patch fixes them as
well.
Signed-off-by: Chris Lalancette <clalance@redhat.com>
* Makefile.maint (sync-vcs-ignore-files): New target.
Prompted by a patch from James Morris.
http://thread.gmane.org/gmane.comp.emulators.libvirt/8619/focus=8773
Add all (now-generated) .gitignore files.
* .gitignore: New file.
* build-aux/.gitignore: New file.
* docs/.gitignore: New file.
* docs/devhelp/.gitignore: New file.
* docs/examples/.gitignore: New file.
* docs/examples/python/.gitignore: New file.
* gnulib/lib/.gitignore: New file.
* gnulib/lib/arpa/.gitignore: New file.
* gnulib/lib/netinet/.gitignore: New file.
* gnulib/lib/sys/.gitignore: New file.
* gnulib/tests/.gitignore: New file.
* include/.gitignore: New file.
* include/libvirt/.gitignore: New file.
* po/.gitignore: New file.
* proxy/.gitignore: New file.
* python/.gitignore: New file.
* python/tests/.gitignore: New file.
* qemud/.gitignore: New file.
* src/.gitignore: New file.
* tests/.gitignore: New file.
* tests/confdata/.gitignore: New file.
* tests/sexpr2xmldata/.gitignore: New file.
* tests/virshdata/.gitignore: New file.
* tests/xencapsdata/.gitignore: New file.
* tests/xmconfigdata/.gitignore: New file.
* tests/xml2sexprdata/.gitignore: New file.
iSCSI volumes. This is implemented in the
virStorageBackendUpdateVolInfoFD function, so all future callers will
automatically benefit. This is a somewhat large patch because the
conversion of the virStorageBackendPartTableTypeToString necessitated
a change to the formatToString and formatFromString function pointers,
which caused fallout in other places in the storage stuff. The good
news is that most of these callers are now converted over to the
VIR_ENUM_IMPL, which means a lot of redundant code is now gone.
Signed-off-by: Chris Lalancette <clalance@redhat.com>
POTFILES.in. Add it there, and then fix up one warning about included
c-ctypes.h that wasn't being used.
Signed-off-by: Chris Lalancette <clalance@redhat.com>
* src/storage_backend_logical.c: enable stop pool in logical backend
improve portability when deleting a pool and also call pvremove
patch by Chris Lalancette
Daniel
* src/network_conf.c src/network_conf.h src/qemu_driver.c: add
support for a domain name in network configurations, patch by
JJ Reynolds with bugfix raised by Dan
* src/openvz_conf.c: fix to small bug in openvzReadConfigParam
by Evgeniy Sokolov
Daniel
This patch adds an implementation of the version function to the LXC driver.
The providers use the hypervisor version in a field of one of the instances,
so we need to have something meaningful here. AFAICT, the only real option
we have (considering the limitations of the libvirt version information) is
to use the kernel version.
* src/qemu_conf.c: patch from Cole Robinson to report in the
capabilities only the ones where the emulators is actually found
* po/libvirt.pot: regenerated
* src/libvirt.c: small typo fix
Daniel
* src/storage_backend.h src/storage_backend_logical.c
src/storage_conf.c src/storage_conf.h src/virsh.c:
Applied patches from David Lively to add storage source
elements needed for storage pool
* docs/formatstorage.html docs/formatstorage.html.in: associated
documentation
Daniel
* src/util.c (virFileReadLimFP): New function.
(__virFileReadLimFD): New function.
* src/util.h (__virFileReadLimFD): Declare.
(virFileReadLimFD): Define.
(virFileReadAll): Rewrite to use virFileReadLimFP.
* src/qemu_conf.c: fix serial/telnet to use "server" option
rather than "listen"
* tests/qemuxml2argvdata/qemuxml2argv-serial-tcp-telnet.args:
fix the test case too
* 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
* 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
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.
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>
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>
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>
* 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.
* 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.
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
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.
handling code. In particular, if you had a section of XML like:
<disk type='file' device='cdrom'>
<target dev='hdc' bus='ide'/>
<readonly/>
</disk>
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>
* 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