Commit Graph

575 Commits

Author SHA1 Message Date
Daniel P. Berrange
07fb9d64b0 Fixed buffer overflow in qemu networking 2007-03-20 16:50:42 +00:00
Daniel Veillard
4ffe066dd8 * src/virsh.c: add error messages for negative memory size as
pointed out by Masayuki Sunou
Daniel
2007-03-20 15:31:46 +00:00
Daniel Veillard
633a3bef0d * src/xen_internal.c: applied patch from Atsushi SAKAI fixing
direct hypervisor calls on some recent Xen versions
Daniel
2007-03-20 15:22:39 +00:00
Daniel Veillard
7c21366518 * libvirt.spec.in: missing /etc/libvirt/qemu/networks/autostart
Daniel
2007-03-20 14:49:43 +00:00
Daniel Veillard
4d5292c4da * src/virsh.c: applied patch from Jim Meyering to add printf-style
function checking in virsh.c and fix one warning raised
Daniel
2007-03-19 14:20:30 +00:00
Daniel Veillard
5af3ccc8f8 * qemud/protocol.h src/internal.h: applied patch from Jim Meyering
removing global variables (using named enum instead).
Daniel
2007-03-19 14:18:05 +00:00
Daniel Veillard
7bdee4adef * src/libvirt.c: patch from Atsushi SAKAI, fixing virsh access
as root when libvirt_qemud is not running
* TODO: updated
Daniel
2007-03-19 10:15:52 +00:00
Daniel Veillard
3edfdbf02d * src/virsh.c: patch from Masayuki Sunou, checking that byte
values passed to virsh memory commands are positive.
Daniel
2007-03-19 09:46:13 +00:00
Daniel Veillard
f162d50399 * NEWS libvirt.spec.in docs/libvir.html docs/news.html: preparing
release of libvirt-0.2.1
Daniel
2007-03-16 19:31:14 +00:00
Daniel Veillard
d1b1545168 * docs/*: updated the format section, augmented Networking with
description provided by Daniel Berrange
* po/*: regenerated
Daniel
2007-03-16 18:33:53 +00:00
Daniel Veillard
9e170a88cd * qemud/conf.c qemud/driver.h qemud/internal.h src/internal.h
src/sexpr.h src/test.c src/xm_internal.c src/xml.c src/xml.h:
  applied patch from Richard Jones adding check to printf-like
  functions and fixing the problems raised
Daniel
2007-03-16 15:03:21 +00:00
Daniel Veillard
d7e1c4fc51 * src/xml.c tests/sexpr2xmltest.c tests/xmconfigtest.c: avoid
warnings when compiling without Xen
Daniel
2007-03-16 14:55:51 +00:00
Daniel Veillard
ccee35cbb0 * python/generator.py: patch from Tatsuro Enokura to fix
virNetworkDefine binding
Daniel
2007-03-16 10:44:44 +00:00
Daniel P. Berrange
d59c9d2fa8 Fixed use of regexps in capabilities APIs 2007-03-15 18:59:47 +00:00
Daniel P. Berrange
33134578b3 Fixed two bugs in QEMU impl of capabilities call 2007-03-15 18:23:00 +00:00
Daniel P. Berrange
6d11322bc7 Fixed uninitialized value warning 2007-03-15 18:15:14 +00:00
Daniel P. Berrange
3f2184a401 Change installation of default network XML in RPM 2007-03-15 17:51:11 +00:00
Daniel Veillard
635ae38979 * include/libvirt/libvirt.h[.in] include/libvirt/virterror.h
proxy/libvirt_proxy.c qemud/Makefile.am qemud/conf.c qemud/conf.h
  qemud/dispatch.c qemud/internal.h qemud/protocol.h
  src/driver.h src/internal.h src/libvirt.c src/libvirt_sym.version
  src/proxy_internal.c src/proxy_internal.h src/qemu_internal.c
  src/test.c src/virsh.c src/virterror.c src/xen_internal.c
  src/xen_internal.h src/xend_internal.c src/xm_internal.c
  src/xml.h src/xs_internal.c: applied patch from Richard Jones
  adding virConnectGetCapabilities(), plus various small little
  fixes
* docs/*: fixed the api extractor script and regenerated
Daniel
2007-03-15 17:24:56 +00:00
Daniel Veillard
d59bfbd00e * python/generator.py: fix the python binding generation for
virNetworkLookup...() functions, which were clashing with
  equivalent virConnLookup...() equivalents, as reported by
  Tatsuro Enokura
Daniel
2007-03-15 15:23:21 +00:00
Daniel Veillard
6f7f84a772 * src/virsh.c src/xen_internal.c: applied patch from Atsushi SAKAI
to better handle the case where there is no limit in the domain
  upper memory size
* docs/architecture.html docs/format.html docs/intro.html
  docs/libvir.html: started to update the documentation to reflect
  the current state
Daniel
2007-03-15 14:27:09 +00:00
Daniel Veillard
181ce1fdc6 * configure.in proxy/Makefile.am proxy/libvirt_proxy.c
src/Makefile.am src/libvirt.c src/qemu_internal.c src/test.c
  src/xen_internal.c src/xen_internal.h src/xend_internal.c
  src/xm_internal.c src/xml.c src/xs_internal.c
  tests/Makefile.am tests/sexpr2xmltest.c tests/xmconfigtest.c:
  allow selective compilation of Xen,QEmu/KVM and test support
  in or out at configure time. Also allows to compile on a system
  without Xen development installed. All drivers are selected by
  default.
Daniel
2007-03-15 07:43:16 +00:00
Daniel Veillard
98d3a3f1f8 * src/xend_internal.c: applied patch from Kazuki Mizushima, an
inversion between shutoff and shutdown flags
* po/* doc/*: automatic update
Daniel
2007-03-14 13:14:50 +00:00
Daniel P. Berrange
a534de5281 Improve support for virtual networking 2007-03-13 22:43:22 +00:00
Daniel P. Berrange
06b3f3ced3 Fixed generation of UUIDs to work on upgrades 2007-03-13 03:18:52 +00:00
Daniel P. Berrange
afa1d92a9f Autogenerate UUID for default network 2007-03-12 16:32:43 +00:00
Daniel P. Berrange
a274fe6574 Generate random UUID for network config 2007-03-12 14:10:14 +00:00
Daniel P. Berrange
deb5db5e1b Export virConf symbols with leading __ 2007-03-09 20:47:12 +00:00
Daniel P. Berrange
6a66941843 Added python bindings for networking APIs 2007-03-09 15:42:50 +00:00
Daniel Veillard
b35adb3836 * src/virsh.c: bad pointer/int mismatch fixes from Richard Jones
daniel
2007-03-09 13:44:24 +00:00
Daniel P. Berrange
03d48a87ed Fix double free in XML parsing 2007-03-09 03:08:34 +00:00
Daniel P. Berrange
aeccfe85be Make sure to create system socket directory 2007-03-08 23:31:28 +00:00
Daniel P. Berrange
dc8c7754bb Make compiler warnings fatal errors for automated builds 2007-03-08 21:32:18 +00:00
Daniel P. Berrange
c992b3f77d Incorporate automated build number if RPM release 2007-03-08 21:31:20 +00:00
Daniel P. Berrange
102c75057a Fix misc bugs in qemu connection opening 2007-03-08 15:16:01 +00:00
Daniel P. Berrange
f30b84f901 Refactored driver reg to avoid type-punning 2007-03-08 14:53:41 +00:00
Daniel Veillard
6a1e3d5f36 * src/internal.h src/xend_internal.c src/xm_internal.c src/xml.c:
add a check for minimal size of Xen Dom0, track places where we
  had arbitrary minimal memory requirement and use a predefined
  macro to clean this up.
Daniel
2007-03-08 14:12:06 +00:00
Daniel P. Berrange
b776222049 Added --readonly flag to virsh 2007-03-08 13:48:22 +00:00
Daniel Veillard
1e95c63059 * src/xml.c: applied patch from Nobuhiro Itou to allow the
VNC port 5900 to be used with xend, it's an edge case.
Daniel
2007-03-08 08:55:56 +00:00
Daniel Veillard
b412cfadb5 * include/libvirt/libvirt.h include/libvirt/libvirt.h.in
src/driver.h src/libvirt.c src/libvirt_sym.version
  src/proxy_internal.c src/qemu_internal.c src/test.c src/virsh.c
  src/xen_internal.c src/xen_internal.h src/xend_internal.c
  src/xm_internal.c src/xs_internal.c: applied patch from
  Masayuki Sunou to add and entry point to check the maximum
  number of virtual CPU supported by a virtualization mechanism
* doc/*.html doc/libvirt-*.xml: regenerated the interfaces descriptions
  and associated docs.
Daniel
2007-03-08 08:31:07 +00:00
Mark McLoughlin
60796a554b Wed Mar 07 11:53:22 IST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/default-network.xml: add a default network

        * qemud/Makefile.am: install it, and the autostart symlink

        * libvirt.spec.in: update
2007-03-07 11:54:29 +00:00
Daniel P. Berrange
ab1649d367 virGetDomain/Network require non-NULL name & UUID 2007-03-06 22:06:14 +00:00
Daniel P. Berrange
d6db609d74 Fixed up numerous compiler warnings 2007-03-06 21:55:44 +00:00
Daniel P. Berrange
955f12037e Added support for keymap in VNC display 2007-03-06 20:00:17 +00:00
Daniel P. Berrange
8cb208cd57 Fixed unlink of readonly mode socket 2007-03-06 16:51:48 +00:00
Daniel P. Berrange
e8c6aa703a Remove bogus ATTRIBUTE_UNUSED annotation 2007-03-05 17:20:09 +00:00
Daniel P. Berrange
b5dfaef4dc Wait for monitor at startup 2007-03-05 17:15:20 +00:00
Mark McLoughlin
868bcd72c7 Mon Mar 05 16:39:54 IST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/qemud.c: don't try and listen to a null socket
        path when run as a session daemon. Noticed by Rich Jones
2007-03-05 16:40:34 +00:00
Mark McLoughlin
7911e22ef7 Mon Mar 05 11:33:18 IST 2007 Mark McLoughlin <markmc@redhat.com:
* qemud/driver.c: fix a couple of invalid free() calls
2007-03-05 12:34:27 +00:00
Mark McLoughlin
c69c850871 Mon Mar 05 11:07:38 IST 2007 Mark McLoughlin <markmc@redhat.com:
* libvirt.spec.in: BuildRequires: /sbin/iptables and
        run configure with the --with-init-script and
        --with-qemud-pid-file parameters.

        * configure.in: it's --with-qemud-pid-file, not
        --with-pid-file
2007-03-05 11:10:06 +00:00
Mark McLoughlin
c486a69a04 Mon Mar 05 10:52:02 IST 2007 Mark McLoughlin <markmc@redhat.com:
* libvirt.spec.in: sync some of the chanes from dist-cvs
        so that this looks pretty much as it should do for the
        next release.
2007-03-05 10:56:02 +00:00
Daniel P. Berrange
1b36cccb50 Optimize lookup-by-UUID for new XenD 2007-03-02 20:19:08 +00:00
Daniel P. Berrange
6e760fb6d7 Fix vncdisplay command in virsh 2007-03-02 14:22:33 +00:00
Daniel P. Berrange
3f9380fdbb Change way we look for xend errors (Kazuki Mizushima ) 2007-03-01 23:24:09 +00:00
Mark McLoughlin
51d5609843 Thu Mar 01 16:17:48 EST 2007 Mark McLoughlin <markmc@redhat.com>
* acinclude.m4: add LIBVIRT_COMPILE_WARNINGS, copied from
        GNOME but with a few more flags we'd been using.

        * configure.in: use that instead of setting CFLAGS
        directly.

        * proxy/Makefile.am, python/Makefile.am, qemud/Makefile.am,
          src/Makefile.am, tests/Makefile.am: use $(WARN_CFLAGS)
2007-03-01 16:18:55 +00:00
Mark McLoughlin
b48326ecd0 Thu Mar 01 16:00:12 EST 2007 Mark McLoughlin <markmc@redhat.com>
Fix from Richard W.M. Jones <rjones@redhat.com>

        * proxy/libvirt_proxy.c: include locale.h
2007-03-01 16:01:39 +00:00
Daniel P. Berrange
10732a5071 Added additional check for failure of core dump on domain-0 2007-02-27 15:50:03 +00:00
Daniel P. Berrange
00602abe00 Fix SEGV in tab completion of virsh commands 2007-02-27 15:35:50 +00:00
Daniel P. Berrange
a0d210598f Fixed virsh command line arg handling for -t option 2007-02-27 15:32:18 +00:00
Daniel P. Berrange
02a271f220 Don't hardcode port=5900+domid for new xend 2007-02-27 15:22:13 +00:00
Mark McLoughlin
35f911c815 Mon Feb 26 15:33:08 IST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/conf.c, qemud/uuid.[ch]: move qemudParseUUID()
        into uuid.c
2007-02-26 15:34:24 +00:00
Mark McLoughlin
bce1d26ef3 Mon Feb 26 15:31:23 IST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/uuid.[ch]: add uuid generation code

        * qemud/Makefile.am: build it

        * qemud/conf.c: generate a UUID if not specified in the XML
2007-02-26 15:32:27 +00:00
Mark McLoughlin
d76f6b54a5 Mon Feb 26 15:20:56 IST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/conf.c: qemudAutostartConfigs(): print the detailed
        error message from a guest/network autostart failure.
2007-02-26 15:21:38 +00:00
Mark McLoughlin
e0952bad01 Mon Feb 26 14:20:18 IST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/conf.c: check for malloc failure in GenerateXML()
        and GenerateNetworkXML()

        * qemud/driver.c: free the XML output after returning it
        from the DumpXML() commands.
2007-02-26 14:21:21 +00:00
Daniel P. Berrange
73048102c0 Autodetect QEMU version and adjust command line arg accordingly 2007-02-23 17:15:18 +00:00
Daniel P. Berrange
66a55a4d48 Added init script to RPM. Fixup paths to init script & libvirt_qemud 2007-02-23 15:53:56 +00:00
Mark McLoughlin
fb9f90c942 Fri Feb 23 14:32:54 IST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/conf.c: don't load config files unless they have
        a ".xml" suffix, e.g. backup files ... we spew a warning
        later if we do.
2007-02-23 14:33:37 +00:00
Mark McLoughlin
fbcd25d3a7 Fri Feb 23 12:49:11 IST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/libvirtd.in: add init script for libvirt_qemud

        * qemud/Makefile.am: install it unless we were configured
        with --with-init-scripts=none

        * configure.in: add --with-init-scripts to allow us
        have different flavour init scripts
2007-02-23 12:50:58 +00:00
Mark McLoughlin
d758313d67 Fri Feb 23 12:46:44 IST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/qemud.c: add --pid-file and default to writing
        out a PID file to /var/run/libvirt_qemud.pid in daemon
        mode.

        * configure.in: add --with-pid-file arg
2007-02-23 12:48:36 +00:00
Mark McLoughlin
cf0e5df048 Fri Feb 23 12:45:08 IST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/Makefile.am: install libvirt_qemud in /usr/sbin
        instead of /usr/libexec

        * src/Makefile.am, src/qemu_internal.c: pass the correct
        path to libvirt
2007-02-23 12:46:35 +00:00
Mark McLoughlin
992176b177 Fri Feb 23 10:26:24 IST 2007 Mark McLoughlin <markmc@redhat.com>
* src/virsh.c: in "start" and "net-start" use e.g.
        vshCommandOptDomainBy() so that we actually get an
        error message if the domain/network isn't found.
2007-02-23 10:27:53 +00:00
Mark McLoughlin
91e461ffdd Fri Feb 23 09:11:53 IST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/conf.c: actually autostart guests/networks at startup
        as appropriate.
2007-02-23 09:11:52 +00:00
Mark McLoughlin
08cfcae91b Fri Feb 23 09:03:19 IST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/internal.h: put the config directory paths in
        an array in order to make them easier to initialize,
        but still expose pointers to each of them as members
        in the server struct.

        * qemud/qemud.c: cleanup the config directory path
        initialization.
2007-02-23 09:10:28 +00:00
Mark McLoughlin
56d2857f95 Fri Feb 23 09:03:19 IST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/driver.c: maintain the autostart flag on disk
        using symlinks from the "autostart" directories to
        the corresponding config files.

        * qemud/internal.h: add paths to the autostart links
        to the vm/network structures and paths to the autostart
        dirs to the server struct.

        * qemud/qemud.c: initialize the server autostart dir
        patches.

        * qemud/conf.h: expose qemudEnsureDir()

        * qemud/conf.c: check the autostart symlinks when
        loading config files at startup.
2007-02-23 09:07:41 +00:00
Mark McLoughlin
efe538b709 Fri Feb 23 09:00:13 IST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/protocol.h: add the (domain/network)(Get/Set)Autostart
        requests and replies to the protocol.

        * src/qemu_internal.c: hookup the qemu driver autostart
        methods

        * qemud/dispatch.c, qemud/driver.[ch], internal.h: add
        the daemon side, but just set an in-memory autostart
        flag for now.
2007-02-23 09:03:25 +00:00
Mark McLoughlin
55868d76a7 Fri Feb 23 08:51:05 IST 2007 Mark McLoughlin <markmc@redhat.com>
* src/virsh.c: add "autostart" and "net-autostart" commands
        and cleanup the "list" and "net-list" commands a bit.
2007-02-23 08:58:25 +00:00
Mark McLoughlin
57a1819881 Fri Feb 23 08:49:12 IST 2007 Mark McLoughlin <markmc@redhat.com>
* include/libvirt/libvirt.h.in, src/libvirt.c add
        virDomainGetAutostart(), virDomainSetAutostart(),
        virNetworkGetAutostart() and virNetworkSetAutostart().

        * src/libvirt_sym.version: export the API

        * src/driver.h: add methods to the driver vtables.

        * src/proxy_internal.c, src/qemu_internal.c,
          src/test.c, src/xen_internal.c, src/xend_internal.c,
          src/xm_internal.c, src/xs_internal.c: set those
        methods to NULL
2007-02-23 08:51:30 +00:00
Mark McLoughlin
d954480892 Fri Feb 23 08:41:34 IST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/conf.[ch]: significantly re-factor qemudLoadConfigXML()
        so that "parse the XML", "assign the def to a VM" and
        "save the XML" operations are in separate functions.
        Add qemudRemoveInactiveVM() and qemudRemoveInactiveNetwork().
        Report errors when loading config files at startup. Check
        that a domain/network's name matches the config filename.

        * qemud/driver.c: update the Create() and Define() functions
        to explicitly parse/assign/save. Also, fix bug where if
        Create() failed, we would free the VM without removing it
        from the inactive list.

        * qemud/qemud.c: use qemudRemoveInactiveVM/Network()
2007-02-23 08:48:02 +00:00
Mark McLoughlin
593d20d400 Fri Feb 23 08:40:52 IST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/driver.[ch], qemud/dispatch.c: fix the fact that
        qemudDispatchDomainStart() doesn't report an error if the uuid
        lookup fails and also move the uuid lookup into the driver
        so that it matches the way we do Destroy().
2007-02-23 08:41:23 +00:00
Mark McLoughlin
6ecd4045aa Fri Feb 22 08:37:23 IST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/conf.c, qemud/driver.c, qemud/internal.h,
        qemud/qemud.c: Merge the ->activevms and ->inactivevms
        into a single ->vms list in order to make things
        easier to manage. Likewise for networks. Also add
        qemudIsActiveVM() and qemudIsActiveNetwork() inline
        functions.
2007-02-23 08:39:49 +00:00
Daniel P. Berrange
6d6261f4e8 Ensure domains are killed off if hotplug fails. Fix deletion of inactive domains 2007-02-22 19:09:29 +00:00
Daniel P. Berrange
b3244072e4 Refuse to run shutdown/reboot on Dom0 2007-02-22 16:49:12 +00:00
Mark McLoughlin
68f1003652 Thu Feb 22 10:37:08 IST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/conf.c: fix another xml property leak.
2007-02-22 10:39:38 +00:00
Mark McLoughlin
5687da2c7a Tue Feb 20 19:08:58 IST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/conf.c: use strerror(errno) in some error messages
        to make them a bit more useful
2007-02-20 19:09:44 +00:00
Mark McLoughlin
4579467783 Fri Feb 20 19:07:12 IST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/conf.c: don't free active networks/vms if we
        fail to save the new config
2007-02-20 19:08:09 +00:00
Mark McLoughlin
458344c94e Fri Feb 20 18:25:42 IST 2007 Mark McLoughlin <markmc@redhat.com>
* virsh.c: cmdNetworkList() re-indent this.
2007-02-20 18:25:46 +00:00
Mark McLoughlin
1e20b80a91 Fri Feb 20 17:49:22 IST 2007 Mark McLoughlin <markmc@redhat.com>
Fix a few leaks

        * qemud/qemud.c: qemudCleanup(): free the socket
        structures

        * qemud/conf.c: fix various leaks in the xml parsing

        * qemud/iptables.c: fix a typo causing a leak
2007-02-20 17:51:41 +00:00
Mark McLoughlin
c5b3181ad9 Fri Feb 20 16:49:53 IST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/conf.c, qemud/qemud.c: only create config dirs
        when actually trying to write out config.
2007-02-20 16:55:56 +00:00
Mark McLoughlin
5ed716484e Fri Feb 20 09:56:35 IST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/bridge.c: change the fix for the alignment warning
        a little.
2007-02-20 09:57:47 +00:00
Mark McLoughlin
28a07e4c80 Fri Feb 20 09:03:05 IST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/qemud.c: clean up qemudInitialize() and qemudListen()
        so as to coalesce the two "system vs. user" code paths and
        fix up some problems noticed by dan.
2007-02-20 09:04:27 +00:00
Mark McLoughlin
96b89415a3 Fri Feb 19 16:59:18 IST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/qemud.c: don't shutdown guest and networks on
        SIGHUP
2007-02-19 17:00:05 +00:00
Mark McLoughlin
272639aaac Fri Feb 19 16:58:53 IST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/qemud.c: handle SIGQUIT.
2007-02-19 16:59:15 +00:00
Daniel P. Berrange
10041b979d Fixed data type casts to address endianness issues on ia64 2007-02-19 15:01:20 +00:00
Mark McLoughlin
cfa655f9b8 Fri Feb 16 18:28:32 IST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/qemud.c, qemud/dispatch.c, qemud/internal.h
        qemud/conf.c, qemud/driver.c, configure.in: add a
        qemudLog() function which uses syslog() if we're in daemon
        mode, doesn't output INFO/DEBUG messages unless the
        verbose flag is set and doesn't output DEBUG messages
        unless compiled with --enable-debug. Also, make a first
        pass through fatal errors and add error messages for them.
2007-02-16 18:30:55 +00:00
Mark McLoughlin
49fe28206a Fri Feb 16 18:26:55 IST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/internal.h, qemud/qemud.c: improve signal handling
        and handle SIGHUP by shutting down all guests and networks
        and re-loading configs, and handle SIGINT and SIGTERM
        by shutting down cleanly.
2007-02-16 18:28:17 +00:00
Mark McLoughlin
49dcc264e5 Fri Feb 16 18:24:08 IST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/qemud.c, qemud/bridge.c, qemud/iptables.c: fix
	our FD_CLOEXEC usage so that all fds which should be
	closed on exec are marked as such and that we leave
	exec() to do the actual closing.
2007-02-16 18:26:18 +00:00
Mark McLoughlin
80820ec7a9 Fri Feb 16 18:23:15 IST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/qemud.c: fix qemudEnableIpForwarding() to not leak
        an fd if writing to /proc/sys/net/ipv4/ip_forward fails.
2007-02-16 18:24:14 +00:00
Daniel P. Berrange
926950f3eb Fixed test suite linkage 2007-02-16 16:56:47 +00:00
Daniel P. Berrange
7c24fbb00c Remove init method 2007-02-16 16:04:54 +00:00
Daniel P. Berrange
9d0fa40919 Remove mistaken includes for gnutls 2007-02-16 15:44:08 +00:00
Mark McLoughlin
fb387cbe27 Thu Feb 15 19:07:24 IST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/conf.c: fix <interface type='network'> output
2007-02-15 19:08:08 +00:00
Mark McLoughlin
e8f064000d Thu Feb 15 19:06:56 IST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/conf.c: fix the <graphics> output - we weren't
        handling sdl
2007-02-15 19:07:06 +00:00
Mark McLoughlin
4e2fa18166 Thu Feb 15 19:06:22 IST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/conf.c: fix a couple of typos
2007-02-15 19:06:10 +00:00
Mark McLoughlin
9839cf3798 Thu Feb 15 19:05:48 IST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/conf.c: fix segfault
2007-02-15 19:05:27 +00:00
Mark McLoughlin
7902317a4f Thu Feb 15 19:04:10 IST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/conf.h: move qemudFreeVMDef() down a bit
2007-02-15 19:04:45 +00:00
Mark McLoughlin
ca4553d0e7 Thu Feb 15 16:00:05 IST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/bridge.c: don't output bridge parameters if they
        are the default.
2007-02-15 16:01:09 +00:00
Mark McLoughlin
f83f9ad351 Thu Feb 15 15:56:32 IST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/conf.[ch], qemud/dispatch.c, qemud/internal.h,
          qemud/qemud.c, qemud/driver.c: allow re-defining network
        configs; basically copying dan's patch for domains.
2007-02-15 15:57:43 +00:00
Mark McLoughlin
bf5fae6a8c Thu Feb 15 15:47:46 IST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/conf.c: fix a couple of qemud_vm_def leaks

        * driver.c: simplify qemudDomainDefine()
2007-02-15 15:52:28 +00:00
Daniel P. Berrange
6ad5b9d5fb Pre-create the toplevel libvirt config directory 2007-02-14 22:01:40 +00:00
Daniel P. Berrange
31ea5e9733 Fix <features> block. Only include ID & VNC port for active domain XML 2007-02-14 21:47:59 +00:00
Daniel P. Berrange
8dca13efc1 Fixed path for autostarting daemon 2007-02-14 21:46:06 +00:00
Daniel Veillard
de48dae9f0 * libvirt.spec.in: spec cleanup and missing BuildRequires
* qemud/Makefile.am: avoid -Werror
daniel
2007-02-14 18:54:26 +00:00
Daniel Veillard
2edf53128e * configure.in NEWS include/libvirt/libvirt.h docs/* docs/apibuild.py:
prepare release of 0.2.0, update doc, avoid console module for API.
* po/*: regenerated
Daniel
2007-02-14 18:08:45 +00:00
Daniel P. Berrange
fd35f8ca58 Added libsysfs-devel dep & pre-create config/socket dir 2007-02-14 17:36:39 +00:00
Daniel P. Berrange
f9b263118f Moved qemu sockets/configs 2007-02-14 17:35:38 +00:00
Daniel P. Berrange
a1432a5215 Blacklist vshRunConsole from python 2007-02-14 17:20:27 +00:00
Daniel P. Berrange
845272d541 Updated po files 2007-02-14 17:19:18 +00:00
Daniel P. Berrange
2e5e51151c Refactor to allowing changing config of active domains 2007-02-14 17:05:55 +00:00
Mark McLoughlin
4ccb9579ff Tue Feb 14 16:53:25 IST 2007 Mark McLoughlin <markmc@redhat.com>
Fix from Richard W.M. Jones <rjones@redhat.com>

        * virsh.c: add a colon after the connect arg to
        getopt_long()
2007-02-14 16:53:55 +00:00
Mark McLoughlin
ee310ec815 Tue Feb 14 16:48:24 IST 2007 Mark McLoughlin <markmc@redhat.com>
* src/qemu_internal.c: correctly register the network
        driver
2007-02-14 16:48:51 +00:00
Mark McLoughlin
081c8d435c Tue Feb 14 16:35:56 IST 2007 Mark McLoughlin <markmc@redhat.com>
* autogen.sh: run autoheader before automake
2007-02-14 16:35:47 +00:00
Mark McLoughlin
3ea88b568d Tue Feb 14 16:23:25 IST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/iptables.[ch]: add code for managing iptables
        rules.

        * qemud/Makefile.am: add iptables.[ch].

        * qemud/qemud.c: add and remove iptables rules as
        appropriate.

        * qemud/conf.c: when starting a guess, add a rule
        allowing it to forward packets across the networks
        bridge.

        * qemud/internal.h: add iptables context ptr

        * configure.in: add --with-iptables-dir and
        --with-iptables-prefix to allow us to put our rules
        in a chain with the given prefix and save the rules
        in files in the given dir so as to integrate with
        the proposed "service iptables restart" solution
        in:

           https://bugzilla.redhat.com/227011
2007-02-14 16:26:42 +00:00
Mark McLoughlin
e89a1c33f5 Tue Feb 14 16:21:18 IST 2007 Mark McLoughlin <markmc@redhat.com>
* src/xml.c: with <interface type="network"> connect the
        Xen guest to the appropriate bridge.
2007-02-14 16:22:02 +00:00
Mark McLoughlin
8356c43e42 Tue Feb 14 16:17:51 IST 2007 Mark McLoughlin <markmc@redhat.com>
* include/libvirt/libvirt.h.in, src/libvirt.c: add
        virNetworkGetBridgeName() to allow finding out what
        bridge to connect to in order to join a network.

        * src/driver.h: add networkGetBridgeName() to vtable.

        * qemud/protocol.h: add the request and reply to
        the qemud protocol.

        * qemud/dispatch.c, qemud/driver.[ch]: handle them
        here.

        * src/qemu_internal.c: implement GetBridgeName()
        in the qemu driver.

        * src/libvirt_sym.version: add new symbol.
2007-02-14 16:20:38 +00:00
Mark McLoughlin
d4a9a0d607 Tue Feb 14 16:14:32 IST 2007 Mark McLoughlin <markmc@redhat.com>
* src/xend_internal.c, src/xm_internal.c: pass the
        connection to virDomainParseXMLDesc()

        * src/xml.[ch]: make virDomainParseXMLDesc accept
        a virConnectPtr so that we can use it later to
        lookup the bridge associated with a network

        * tests/xml2sexprtest.c: just pass NULL here, it's
        safe
2007-02-14 16:16:13 +00:00
Mark McLoughlin
0c15bd8b87 Tue Feb 14 16:08:55 IST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/conf.c: add support for connecting a qemu
        guest to a bridge using a tap device in order to
        connect it to a virtual network.

        * qemud/internal.h: add <interface type="network">
        config and track tapfds so as to not close them
        on exec.

        * qemud/qemud.c: don't close tapfds on exec and
        disconnect the iface when the guest shuts down.
2007-02-14 16:09:37 +00:00
Mark McLoughlin
3fbd82faa0 Tue Feb 14 15:07:26 EST 2007 Mark McLoughlin <markmc@redhat.com>
* src/conf.h: fix merge error - remove the argc argument
        from qemudBuildCommandLine()
2007-02-14 16:07:27 +00:00
Mark McLoughlin
ee777358b8 Tue Feb 14 16:04:48 IST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/conf.c, qemud/internal.h: add dhcp config

        * qemud/qemud.c: start dnsmasq to provide dns/dhcp
        for virtual networks.
2007-02-14 16:05:29 +00:00
Mark McLoughlin
c3373b92a0 Tue Feb 14 15:03:22 EST 2007 Mark McLoughlin <markmc@redhat.com>
* src/virsh.c: Re-name some of the VSH_DOMBYFOO stuff
        to VSH_BYFOO in order to re-use it for the network stuff.
2007-02-14 16:04:55 +00:00
Mark McLoughlin
4e6c38e10f Tue Feb 14 16:02:23 IST 2007 Mark McLoughlin <markmc@redhat.com>
* configure.in: add --disable-bridge-params, check
        for libsysfs and various kernel headers

        * bridge.[ch]: add code for managing bridges

        * qemud/Makefile.am: add bridge.[ch] and link against
        libsysfs if enabled.

        * qemud/conf.c: add support for bridge config.

        * qemud/internal.h: add various bridging bits

        * qemud/qemud.c: implement qemudStartNetworkDaemon()
        and qemudShutdownNetworkDaemon().
2007-02-14 16:02:40 +00:00
Mark McLoughlin
e018cbc74f Tue Feb 14 14:58:35 EST 2007 Mark McLoughlin <markmc@redhat.com
* src/hash.c, src/internal.h: Re-name virConnect->domains_mux
        to virConnect->hashes_mux since it will also be used to
        protect the networks hash.
2007-02-14 15:59:40 +00:00
Mark McLoughlin
36d597380e Tue Feb 14 14:57:52 EST 2007 Mark McLoughlin <markmc@redhat.com
* src/conf.c: qemudSaveConfig() will always report a
        more specific error, so we should avoid overwriting
        this error.
2007-02-14 15:58:21 +00:00
Mark McLoughlin
2439573270 Tue Feb 14 15:55:02 IST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/conf.[ch]: implement parsing and saving network
        configs.

        * qemud/driver.c: flesh out the stubs

        * qemud/internal.h: add networks list etc. to
        struct qemud_server

        * qemud/qemud.c: add qemudStartNetworkDaemon() and
        qemudShutdownNetworkDaemon() stubs.
2007-02-14 15:58:06 +00:00
Mark McLoughlin
db3ad7cba7 Tue Feb 14 14:54:25 EST 2007 Mark McLoughlin <markmc@redhat.com
* qemud/qemud.c: Re-factor out qemudExec() so that it can
        be used to launch dnsmasq.

        * qemud/conf.c: don't return argc from qemudBuildCommandLine()
        as exec() doesn't need it.
2007-02-14 15:54:47 +00:00
Mark McLoughlin
f391be00e9 Tue Feb 14 15:52:34 EST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/protocol.h: add the protocol for virtual networks

        * qemud/dispatch.c: implement the protocol

        * qemud/driver.[ch]: add stubs for the driver

        * qemud/internal.h: add struct qemud_network

        * src/qemu_internal.c: add a virtual networks driver
2007-02-14 15:54:10 +00:00
Mark McLoughlin
fbc08f063c Tue Feb 14 14:52:12 EST 2007 Mark McLoughlin <markmc@redhat.com
* qemud/conf.c: Re-factor bits of conf.c so that:

          - qemudMakeConfigPath() can be re-used given another configDir
          - split qemudEnsureConfigDir() out of qemudSaveConfig() so
            that it may be re-used to create another configDir
          - split qemudScanConfigDir() out so that qemudScanConfigs()
            can scan multiple configDirs
2007-02-14 15:53:14 +00:00
Mark McLoughlin
bf46e15b2c Tue Feb 14 14:50:22 EST 2007 Mark McLoughlin <markmc@redhat.com
* qemud/conf.c: handle an unspecified MAC address,
        fix the argv freeing code in qemudBuildCommandLine()
        and fix copy and paste error in qemudGenerateXML()
2007-02-14 15:51:53 +00:00
Mark McLoughlin
d16a83dd7c Tue Feb 14 14:42:38 EST 2007 Mark McLoughlin <markmc@redhat.com
* src/internal.h: add virConnect->qemud_fd so that
        xen and qemu don't share the handle member.

        * src/hash.c, src/qemu_internal.c: update
2007-02-14 15:45:49 +00:00
Mark McLoughlin
c9724cf339 Tue Feb 14 15:43:28 EST 2007 Mark McLoughlin <markmc@redhat.com>
* src/virsh.c: add the net-* commands.
2007-02-14 15:44:58 +00:00
Mark McLoughlin
6a639b917f Tue Feb 14 14:40:52 EST 2007 Mark McLoughlin <markmc@redhat.com
* qemud/conf.c, qemud/dispatch.c, qemud/driver.c,
          qemud/qemud.c: include autoconf's config.h
2007-02-14 15:42:55 +00:00
Mark McLoughlin
f2041b7c75 Tue Feb 14 14:39:18 EST 2007 Mark McLoughlin <markmc@redhat.com
* conf.[ch]: rename from config.[ch] so we can use
        autoconf's config.h

        * Makefile.am: update

        * driver.c, qemud.c: upd.
2007-02-14 15:41:03 +00:00
Mark McLoughlin
8ce3203ad3 Tue Feb 14 15:37:17 EST 2007 Mark McLoughlin <markmc@redhat.com>
Note: potential ABI break here, but people should
        only really be using virError structs returned from
        libvirt itself.

        * include/libvirt/virterror.h: add virNetwork
        to virError

        * src/internal.h, src/virterror.c: add network param
        to __virRaiseError()

        * src/conf.c, src/hash.c, src/libvirt.c, src/proxy_internal.c,
        src/qemu_internal.c, src/sexpr.c, src/test.c, src/xen_internal.c,
        src/xend_internal.c, src/xm_internal.c, src/xml.c, src/xmlrpc.c,
        src/xs_internal.c: update.
2007-02-14 15:40:53 +00:00
Mark McLoughlin
5be54b40cb Tue Feb 14 15:33:05 EST 2007 Mark McLoughlin <markmc@redhat.com>
* include/libvirt/libvirt.h.in: add the networks APIs

        * include/libvirt/virterror.h: add some error codes

        * src/driver.h: add network driver vtable

        * src/hash.c: add networks hash

        * src/internal.h: add virNetwork

        * src/libvirt.c: hook up the APIs to the network
        driver

        * src/libvirt_sym.version: add the new APIs

        * src/virterror.c: handle the new error codes
2007-02-14 15:37:18 +00:00
Mark McLoughlin
24a92945d3 Tue Feb 14 14:33:22 EST 2007 Mark McLoughlin <markmc@redhat.com
* autogen.sh: run autoheader

        * config.h.in: remove
2007-02-14 15:34:56 +00:00
Daniel P. Berrange
26ceeb4e9b Added code coverage testing enabled via --enable-test-coverage 2007-02-14 02:12:41 +00:00
Daniel P. Berrange
23ad665cb0 Added QEMU support 2007-02-14 01:40:09 +00:00
Daniel P. Berrange
ed02290129 Removed obsolete / unused code 2007-02-08 19:10:25 +00:00
Daniel P. Berrange
4f2fcbd905 Added autobuild control file 2007-02-07 17:46:44 +00:00
Daniel P. Berrange
4a89182077 Fix vcpu info for HVM guests 2007-02-07 13:44:22 +00:00
Daniel P. Berrange
5e395c2ac9 Conditionally enable XenD tests 2007-02-07 13:41:44 +00:00
Daniel P. Berrange
9c9e9b79c8 Rename virRunConsole to vshRunConsole 2007-01-28 19:47:36 +00:00