Commit Graph

47 Commits

Author SHA1 Message Date
Mark McLoughlin
42d4b85d86 Wed Mar 30 17:21:08 IST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/iptables.c: Remove the target interface parameter
        from iptablesPhysdevForward(). This rule is intended to
        allow frames to be forwarded across the bridge from the
        supplied bridge port. In this context, the --out parameter
        would match the outgoing bridge port, which will never
        be network->def->forwardDev.
2007-03-30 16:23:04 +00:00
Daniel P. Berrange
1109ba44e2 Fixed bridge networking for QEMU 2007-03-27 14:46:45 +00:00
Daniel Veillard
80fb564b0d * TODO qemud/conf.c src/virsh.c src/xend_internal.c src/xs_internal.c:
replaced all sprintf instances by snprintf ones
Daniel
2007-03-23 16:15:07 +00:00
Daniel P. Berrange
07fb9d64b0 Fixed buffer overflow in qemu networking 2007-03-20 16:50:42 +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
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 P. Berrange
a534de5281 Improve support for virtual networking 2007-03-13 22:43:22 +00:00
Daniel P. Berrange
03d48a87ed Fix double free in XML parsing 2007-03-09 03:08:34 +00:00
Daniel P. Berrange
b5dfaef4dc Wait for monitor at startup 2007-03-05 17:15:20 +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
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
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
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
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
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
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
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
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
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
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
f9f7aeb4b7 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 16:00:16 +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
31ea5e9733 Fix <features> block. Only include ID & VNC port for active domain XML 2007-02-14 21:47:59 +00:00
Daniel P. Berrange
2e5e51151c Refactor to allowing changing config of active domains 2007-02-14 17:05:55 +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
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
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
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
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
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
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
Daniel P. Berrange
23ad665cb0 Added QEMU support 2007-02-14 01:40:09 +00:00