Commit Graph

1575 Commits

Author SHA1 Message Date
Jim Meyering
cb48d5d71c mark a few diagnostics for translation
* src/xen_inotify.c (xenInotifyXendDomainsDirLookup): Mark a diagnostic.
(xenInotifyXendDomainsDirRemoveEntry, xenInotifyOpen): Likewise.
2009-01-05 08:16:44 +00:00
Guido Günther
043d702f02 use virAsprintf instead of asprintf 2008-12-23 13:03:29 +00:00
Cole Robinson
922f5e6845 Fix storage driver null dereference. 2008-12-22 16:30:57 +00:00
Cole Robinson
bd24695a23 Merge xml building for virsh pool-*-as 2008-12-22 16:23:36 +00:00
Daniel Veillard
0d575be45a * src/uml_conf.c: another logging conversion
daniel
2008-12-22 10:53:07 +00:00
Daniel Veillard
0b05f6c26f convert old logging to the new API
* src/node_device_devkit.c src/uml_driver.c src/virterror.c:
  convert old logging to the new API
daniel
2008-12-22 10:48:59 +00:00
Daniel Veillard
f99b202f5b * src/libvirt.c: convert entry points to new logging
daniel
2008-12-22 10:46:01 +00:00
Daniel Veillard
698d80a824 * src/logging.h src/logging.c: commited the more recent version
with function name and line number
daniel
2008-12-22 10:44:10 +00:00
Daniel Veillard
9fcbbd92bf new internal logging APIs
* src/logging.h src/logging.c: add the infrastructure and internal
  APIs for logging, some of those APIs should be made public later
* src/libvirt_sym.version.in: flag the internal APIs as such
daniel
2008-12-22 10:36:54 +00:00
Daniel Veillard
0ff5cea597 * src/xen_internal.h: remove tabs to fix make syntax-check
and fix the indentation
daniel
2008-12-22 10:32:20 +00:00
Jim Meyering
d010b68962 make NUMA-initialization code more portable and more robust
qemudCapsInitNUMA and umlCapsInitNUMA were identical, so this change
factors them into a new function, virCapsInitNUMA, and puts it in
nodeinfo.c.

In addition to factoring out the duplicates, this change also
adjusts that function definition (along with its macros) so
that it works with Fedora 9's numactl version 1, and makes it
so the code will work even if someone builds the kernel with
CONFIG_NR_CPUS > 4096.

Finally, also perform this NUMA initialization for the lxc
and openvz drivers.

* src/nodeinfo.c: Include <stdint.h>, <numa.h> and "memory.h".
(virCapsInitNUMA): Rename from qemudCapsInitNUMA and umlCapsInitNUMA.
(NUMA_MAX_N_CPUS): Define depending on NUMA API version.
(n_bits, MASK_CPU_ISSET): Define, adjust, use uint64 rather than long.
* src/nodeinfo.h: Include "capabilities.h".
(virCapsInitNUMA): Declare it.
* examples/domain-events/events-c/Makefile.am:
* src/Makefile.am: Add $(NUMACTL_CFLAGS) and $(NUMACTL_LIBS) to various
compile/link-related variables.
* src/qemu_conf.c: Include "nodeinfo.h".
(qemudCapsInitNUMA): Remove duplicate code.  Adjust caller.
* src/uml_conf.c (umlCapsInitNUMA): Likewise.
Include "nodeinfo.h".
* src/lxc_conf.c: Include "nodeinfo.h".
(lxcCapsInit): Perform NUMA initialization here, too.
* src/openvz_conf.c (openvzCapsInit): And here.
Include "nodeinfo.h".
* src/libvirt_sym.version.in: Add virCapsInitNUMA so that libvirtd
can link to this function.
2008-12-21 18:55:09 +00:00
Jim Meyering
337dce1e24 * src/node_device_hal.c: Include <config.h> before everything else. 2008-12-21 18:49:11 +00:00
Guido Günther
5614e868e1 save and remove kvm/qemu domain status 2008-12-20 13:17:49 +00:00
Guido Günther
b679ebe877 add XML parsing for qemu/kvm status files 2008-12-20 13:09:45 +00:00
Guido Günther
ecd25f5262 fix device hotplug 2008-12-18 16:49:49 +00:00
Guido Günther
830ba76c3e let qemu/kvm instances write a pid file 2008-12-18 15:22:49 +00:00
Daniel P. Berrange
829b6420d8 Fix mistaken free of domain event object after queueing (David Lively) 2008-12-18 12:11:53 +00:00
Daniel P. Berrange
6313259ada Fix test driver return value & disable nodeinfotest on non-linux (John Levon) 2008-12-18 12:08:05 +00:00
Daniel P. Berrange
7c4bc3f92f Use pid_t for all PID tracking variables (John Levon) 2008-12-18 11:58:28 +00:00
Daniel P. Berrange
ded70984f3 Fix unreachable statement (John Levon) 2008-12-17 21:50:02 +00:00
Daniel P. Berrange
b5259e7e11 Fix domain events callback type (John Levon) 2008-12-17 21:48:20 +00:00
Daniel P. Berrange
bd31fa766a Remove non-existant symbols from linker script (John Levon) 2008-12-17 21:42:49 +00:00
Daniel P. Berrange
c2fb8bfee3 Convert linker script comments & linker args to be Solaris compat (John Levon) 2008-12-17 21:39:41 +00:00
Daniel P. Berrange
0604e9efe0 Fix __sun macro check (John Levon) 2008-12-17 21:31:51 +00:00
Daniel P. Berrange
e5fc0aad31 Fix return type for Xen open subdriver method impl (John Levon) 2008-12-17 21:26:16 +00:00
Daniel P. Berrange
6add3883a6 Fix openvz crash when setting vcpus & initialize mutex (Anton Protopopov) 2008-12-17 21:13:19 +00:00
Daniel P. Berrange
34cd4f9076 Remove trailing semi-colons causing empty statement warnings (John Levon) 2008-12-17 21:09:44 +00:00
Daniel P. Berrange
7e58aaa7ae Remove use of anonymous unions for non-GCC (John Levon) 2008-12-17 18:12:07 +00:00
Jim Meyering
6ded3ebad5 portability: don't include <endian.h> or <byteswap.h>
* src/storage_backend_fs.c: Don't include <endian.h> or <byteswap.h>.
(LV_BIG_ENDIAN, LV_LITTLE_ENDIAN): Define.
Use those instead of __BIG_ENDIAN and __LITTLE_ENDIAN.
2008-12-17 18:08:42 +00:00
Daniel P. Berrange
f4cbc9370e Remove use of _PATH_DEVNULL in favour of /dev/null for portability (John Levon) 2008-12-17 18:04:55 +00:00
Jim Meyering
e4c7e12300 let gcc's -Wformat do its job; avoid "make syntax-check" failure
* src/util.c (virAsprintf): Remove trailing space.
* src/util.h (virAsprintf): Use ATTRIBUTE_FORMAT.
* HACKING (Printf-style functions): New section.
2008-12-17 17:22:43 +00:00
Daniel P. Berrange
53611889ff Add missing checks for read-only connection flag (CVE-2008-5086) 2008-12-17 16:45:22 +00:00
Jim Meyering
7e6a06aeae fix numa-related (and kernel-dependent) test failures
This change is required on some kernels due to the way a change in
the kernel's CONFIG_NR_CPUS propagates through the numa library.
* src/qemu_conf.c (qemudCapsInitNUMA): Pass numa_all_cpus_ptr->size/8
as the buffer-length-in-bytes in the call to numa_node_to_cpus, since
that's what is required on second and subseqent calls.
* src/uml_conf.c (umlCapsInitNUMA): Likewise.
2008-12-17 07:05:45 +00:00
Cole Robinson
0e459cbdfb Sanitize qemu monitor reads. 2008-12-16 22:34:13 +00:00
Guido Günther
36c612b21c add virAsprintf 2008-12-15 20:09:29 +00:00
Daniel Veillard
e4471a7ac7 * src/storage_driver.c: fix a segfault, patch by Miloslav TrmaC
daniel
2008-12-15 15:34:30 +00:00
Daniel P. Berrange
43b897c17a Fix deadlock when reloading configs 2008-12-15 11:00:11 +00:00
Jim Meyering
289d52c49e remove redundant optname arguments
This is the second part of the change mentioned here:

  http://thread.gmane.org/gmane.comp.emulators.libvirt/10331

It removes the essentially redundant "optname" parameter
from each of the vshCommandOptNetworkBy and vshCommandOptDomainBy
functions as well as the correspond macros (without "By" suffix).
Now, instead of always passing the optname, "domain", to
vshCommandOptDomainBy, that function requires that its command
argument refer to an opts array containing a "domain" option.

This normalization makes one more help-related change:
it renames the net-start "name" argument to the more
sensible and consistent "network".
* src/virsh.c (VSH_BYNAME, vshCommandOptDomain)
(cmd_has_option): New function, used in vshCommandOptDomainBy
and vshCommandOptNetworkBy.
(vshCommandOptDomainBy, vshCommandOptNetworkBy): Remove the optname
parameter, it's always "domain" ("network").  Update all callers.
Call cmd_has_option.
(vshCommandOptNetwork, cmdAutostart, cmdConsole, cmdDomstate)
(cmdDomblkstat, cmdDomIfstat, cmdSuspend, cmdUndefine, cmdStart)
(cmdSave, cmdSchedinfo, cmdDump, cmdResume, cmdShutdown)
(cmdReboot, cmdDestroy, cmdDominfo, cmdVcpuinfo, cmdVcpupin)
(cmdSetvcpus, cmdSetmem, cmdSetmaxmem, cmdDumpXML, cmdDomname)
(cmdDomid, cmdDomuuid, cmdMigrate, cmdNetworkAutostart)
(cmdNetworkDestroy, cmdNetworkDumpXML, cmdNetworkName)
(opts_network_start, cmdNetworkStart, cmdNetworkUndefine)
(cmdNetworkUuid, cmdVNCDisplay, cmdTTYConsole, cmdAttachDevice)
(cmdDetachDevice, cmdAttachInterface, cmdDetachInterface)
(cmdAttachDisk, cmdDetachDisk, cmdEdit)
* src/Makefile.am (virsh-pool-edit.c): This code is generated
from cmdEdit, and cmdEdit uses the vshCommandOptDomain macro which
now, with the changes above, has only 3 (was 4) arguments, yet the
macro use is mapped to vshCommandOptPool, which still requires 4
arguments.  So this change adjusts the sed code to reinsert the
just-removed argument -- we're not changing pool-related code right
now, because it's not as straight-forward.
2008-12-15 10:26:54 +00:00
Jim Meyering
9c5470d292 remove cvs $Id$ strings
* po/id.po: Likewise.
* qemud/remote_generate_stubs.pl: Likewise.
* src/virsh.c: Likewise.
* tests/testutils.c: Likewise.
* tests/testutils.h: Likewise.
* RENAMES: Likewise.
2008-12-12 12:45:34 +00:00
Jim Meyering
506629e619 remove unused xmlrpc-related files
* src/xmlrpc.h: Remove file.
* src/xmlrpc.c: Likewise.
* tests/test_xmlrpc.sh: Likewise.
* tests/xmlrpctest.c: Likewise.
* tests/xmlrpcserver.py: Likewise.
* tests/Makefile.am (EXTRA_DIST): Remove xmlserver.py.
(noinst_PROGRAMS): Remove xmlrpctest, along with associated variables.
* po/POTFILES.in: Remove src/xmlrpc.c.
* tests/.cvsignore: Remove xmlrpctest.
2008-12-12 11:31:15 +00:00
Daniel Veillard
2e59a005fd fix bits/bytes memory request mismatches
* src/qemu_conf.c src/uml_conf.c: fix a couple of places where
  we were requesting 8 times the required amount of memory,
  patch by Dave Allan
daniel
2008-12-12 10:39:19 +00:00
Guido Günther
2ddb440cbb fix serial/parallel virtual devices over tcp, unix and telnet 2008-12-12 09:39:31 +00:00
Daniel Veillard
e2d2b7d577 * src/util.c: retry poll() in EINTR failures, patch by Dave Allan
daniel
2008-12-12 07:29:39 +00:00
Cole Robinson
63efdb85c1 Fix locking issue in test driver VolLookupByPath 2008-12-11 15:04:09 +00:00
Cole Robinson
3130848a10 Fix a locking issue in PoolGetAutostart. 2008-12-11 15:00:12 +00:00
Cole Robinson
52037657dc Fix segfault if virtual network does not have a bridge name 2008-12-11 14:57:45 +00:00
Daniel Veillard
a3d570c7b9 Adding support for SDL fullscreen option
* src/domain_conf.c src/domain_conf.h src/qemu_conf.c
  tests/qemuxml2argvtest.c tests/qemuxml2xmltest.c
  tests/qemuxml2argvdata/qemuxml2argv-graphics-sdl-fullscreen.args
  tests/qemuxml2argvdata/qemuxml2argv-graphics-sdl-fullscreen.xml:
  slightly modified patch for SDL fullscreen from Itamar Heim
* docs/formatdomain.html docs/formatdomain.html.in docs/libvirt.rng:
  update the schemas and docs about the sdl graphic element attributes
* AUTHORS: add Itamar Heim
Daniel
2008-12-11 11:44:30 +00:00
Jim Meyering
7989276259 avoid format string warnings
* src/openvz_conf.c (openvzGetNodeCPUs): Add "%s" arg before _(...).
* src/uml_driver.c (umlDomainBlockPeek): Likewise.
2008-12-10 16:35:00 +00:00
Jim Meyering
3693a02fff fix just-broken "virsh start" and "virsh pool-start" commands
* src/virsh.c (cmdPoolStart, cmdStart): Change hard-coded
vshCommandOptDomainBy string argument to match just-changed
option name.  Cole Robinson reported that "virsh start" was
broken and provided that part of the fix.
Bug introduced by yesterday's "virsh.c: tweak options to produce
more accurate help".
* tests/start: New file.  Test for the above fix.
* tests/Makefile.am (test_scripts): Add start.
2008-12-09 21:38:04 +00:00
Guido Günther
54f4ed6ba1 logrotate qemu monitor logs 2008-12-09 20:22:39 +00:00
Jim Meyering
1c9968a2b1 virsh.c: tweak options to produce more accurate help
* src/virsh.c: Adjust some vshCmdOptDef command option flags
to improve auto-generated help command syntax.
2008-12-08 13:22:44 +00:00
Jim Meyering
c9319f315c virsh.c: remove all "syntax" vshCmdInfo entries.
* src/virsh.c: ... now that info is generated.
2008-12-08 13:22:13 +00:00
Jim Meyering
34e5d2941c virsh.c: add missing (yet empty) "desc" strings
* src/virsh.c: Now, every command must have a "desc" string,
even if it has zero length.  Mark these, so they'll be filled in.
2008-12-08 13:21:30 +00:00
Jim Meyering
6f61232852 virsh.c: generate each "virsh help COMMAND"s synopsis
* src/virsh.c: Also, diagnose extra arguments after --help (-h).
2008-12-08 13:14:48 +00:00
Daniel P. Berrange
ca1a1b06d0 Workaround broken limits.h on Debian etch 2008-12-08 11:28:37 +00:00
Daniel P. Berrange
abb02bd18b Fix autostart of domains with virtual networks used 2008-12-08 11:18:47 +00:00
Daniel P. Berrange
73bc9c163c Fix NULL crash & integer overflow 2008-12-07 20:45:28 +00:00
Daniel P. Berrange
5abce0805b Fix test driver storage deadlock 2008-12-07 20:21:46 +00:00
Daniel P. Berrange
a2b2ada85c Fix return value in testStoragePoolBuild for test driver 2008-12-07 14:08:37 +00:00
Daniel Veillard
466f86052f Fix a compilation problem with old dbus,
Daniel
2008-12-05 15:05:48 +00:00
Daniel P. Berrange
af61834687 Fix Xen proxy build 2008-12-05 10:10:41 +00:00
Daniel P. Berrange
491b4eab14 Remove unused driver arg from monitor APIs 2008-12-04 22:19:30 +00:00
Daniel P. Berrange
746f4373e7 Impl of threading locking APIs 2008-12-04 22:00:14 +00:00
Daniel P. Berrange
d48717054c Add locking for thread safety to nodedevice drivers 2008-12-04 21:48:31 +00:00
Daniel P. Berrange
e8a4ea75a3 Merge all return paths from node device driver APIs 2008-12-04 21:46:34 +00:00
Daniel P. Berrange
04a31e99fc Add locking for thread safety to openvz driver 2008-12-04 21:44:55 +00:00
Daniel P. Berrange
e8c92c3b17 Merge all return paths from openvz driver APIs 2008-12-04 21:41:51 +00:00
Daniel P. Berrange
b6ee63d8bb Add locking for thread safety to storage driver 2008-12-04 21:40:42 +00:00
Daniel P. Berrange
c38d4d54c6 Merge all return paths from storage driver APIs 2008-12-04 21:39:45 +00:00
Daniel P. Berrange
bff6ac7b63 Add locking for thread safety to network driver 2008-12-04 21:38:38 +00:00
Daniel P. Berrange
b6dbbdc9fe Merge all return paths from network driver APIs 2008-12-04 21:37:52 +00:00
Daniel P. Berrange
055c2b25d2 Add locking for thread safety to UML driver 2008-12-04 21:14:39 +00:00
Daniel P. Berrange
773c8bac35 Merge all return paths from UML driver APIs 2008-12-04 21:13:58 +00:00
Daniel P. Berrange
965c1bfee4 Add locking for thread safety to LXC driver 2008-12-04 21:12:41 +00:00
Daniel P. Berrange
5305c55849 Merge all return paths from LXC driver APIs 2008-12-04 21:11:41 +00:00
Daniel P. Berrange
bc898df2c7 QEMU domain event thread safety 2008-12-04 21:09:20 +00:00
Daniel P. Berrange
3527f16a94 Add locking for (nearly complete) thread safety to QEMU driver 2008-12-04 21:06:41 +00:00
Daniel P. Berrange
ea960fb719 Merge all return paths from QEMU driver APIs 2008-12-04 21:04:30 +00:00
Daniel P. Berrange
8492cd2084 Stub out node device APIs in test driver 2008-12-04 21:00:50 +00:00
Daniel P. Berrange
2a23198886 Add locking for thread safety to test driver 2008-12-04 20:59:06 +00:00
Daniel P. Berrange
3540f6af23 Merge all return paths from test driver APIs 2008-12-04 20:57:47 +00:00
Daniel P. Berrange
069252f0e6 Remove macros for accessing test driver internal state 2008-12-04 20:56:10 +00:00
Daniel P. Berrange
b43401b915 Add thread locking stubs 2008-12-04 20:53:20 +00:00
Daniel Veillard
a2232a5cc2 release of 0.5.1
* src/libvirt_sym.version.in configure.in NEWS docs/*: release
  of 0.5.1
* po/*: updated and regenerated
daniel
2008-12-04 15:54:26 +00:00
Daniel Veillard
1d9a22b785 fix crash and regression when defining a storage volume without a format
* src/storage_conf.c: fix crash and regression when defining
  a storage volume without a format (Cole Robinson)
Daniel
2008-12-04 15:22:04 +00:00
Cole Robinson
76944e8137 Fix documentation cut and paste errors, and a virsh typo. 2008-12-04 14:51:57 +00:00
Cole Robinson
b9b9c8b020 Increase timeout for initial monitor poll, to prevent a guest from failing to start if it has to wait for a physical cdrom to spin up. 2008-12-04 14:47:12 +00:00
Daniel Veillard
4fc29fa9f4 patch setting MTU on tap interface
* src/bridge.c: patch setting MTU on tap interface to be the same
  as the value for the bridge (Eduardo Habkost)
daniel
2008-12-04 14:38:31 +00:00
Guido Günther
1d7d2fae10 Differentiate between active and inactive configs by honoring the
VIR_DOMAIN_XML_INACTIVE flag.
2008-12-04 12:02:59 +00:00
Guido Günther
38b402ce13 also look for /usb/bin/kvm 2008-12-04 10:45:31 +00:00
Jim Meyering
fa4fc0321a fix inadequate initialization in storage and test drivers
* src/storage_driver.c (storageListPools): Set all "names" entries to 0.
(storageListDefinedPools, storagePoolListVolumes): Likewise.
* src/test.c (testStoragePoolListVolumes): Likewise.
2008-12-02 15:59:14 +00:00
Chris Lalancette
a904a56c36 Older distributions (i.e. RHEL-5) don't have udevadm at all, but they do
have udevsettle.  So change our tests to prefer udevadm if it exists, but
to fall back to udevsettle if it does not.

Signed-off-by: Chris Lalancette <clalance@redhat.com>
2008-12-02 12:41:29 +00:00
Daniel P. Berrange
a429e221df Fix recording of UML driver watch to make inotify work 2008-12-02 11:23:27 +00:00
Jim Meyering
0e9349a28d uml: don't free an uninitialized variable
* src/uml_driver.c (umlDomainShutdown): Initialize "info".
Patch and bug report from Ron Yorston <rmy@tigress.co.uk>.
2008-12-01 11:08:16 +00:00
Daniel P. Berrange
937c1e9e92 Close directory handle when done 2008-11-30 18:37:35 +00:00
Guido Günther
5acdb5761d Prefer xenstore driver for listDomains, since xen HV reports ghost ids of
already shutdown domains in some xen versions
2008-11-28 15:25:04 +00:00
Daniel P. Berrange
d88d459d7b Allow remote://hostname/ style URIs for automatic driver probe. Fix virGetVersion impl 2008-11-28 12:03:20 +00:00
Daniel P. Berrange
319b83fc28 Fix XM driver handling of disk source paths 2008-11-28 11:23:34 +00:00
Daniel P. Berrange
c23ff311fc Fix libnuma use to build with v1 compatability code 2008-11-28 11:20:27 +00:00
Chris Lalancette
a9567e09ef Instead of relying solely on polling for /dev devices to appear in libvirt, we
really should be synchronizing against udev.  This is generally done by a call
to udevsettle, which is exactly what this patch implements for the storage
backends that are likely to create new /dev nodes.  I believe I've read that
even after udevsettle, you are not guaranteed that devices are all the way
created, so we still need the polling in the rest of the sources, but this
should give us a much better chance of things existing as we expect.

Signed-off-by: Chris Lalancette <clalance@redhat.com>
2008-11-28 07:50:20 +00:00
Chris Lalancette
d20d6b1bb0 Currently libvirt can race with udev
creation of /dev/disk/by-{id,path}, so if we fail to open the directory, retry
up to 5 seconds.  This is only likely to happen on hosts that are:

1) diskless (so /dev/disk/by-{id,path} doesn't exist already), and
2) slow, and/or heavily loaded (meaning that udev can take some time to create
the /dev nodes).

Signed-off-by: Chris Lalancette <clalance@redhat.com>
2008-11-28 07:42:21 +00:00
Daniel Veillard
431d40fa9c * src/xen_unified.c: use preferably xend method to update
the maximum memory of a xen guest (Jim Fehlig)
Daniel
2008-11-27 16:16:13 +00:00
Daniel Veillard
517ff04bec Release of 0.5.0
* configure.in docs/* NEWS: release of 0.5.0
* po/*: updated from the translators and merged
* docs/apibuild.py src/libvirt.c: avoid some warnings at doc
  generation time
daniel
2008-11-25 15:48:11 +00:00
Daniel P. Berrange
5a01629128 Add missing translations 2008-11-25 11:18:08 +00:00
Daniel P. Berrange
8f7e086f19 Implement autostart for XM driver 2008-11-25 11:04:34 +00:00
Daniel P. Berrange
1eeceaa649 Support domain lifecycle events for Xen (Ben Guthro & Daniel Berrange) 2008-11-25 10:44:52 +00:00
Daniel P. Berrange
b2dbfefcf3 Avoid symbol clash with win32 headers and node device APIs 2008-11-25 10:37:02 +00:00
Jim Meyering
9a7c05d995 * src/virterror.c (virReportErrorHelper): Sync doc to code. 2008-11-25 10:32:27 +00:00
Jim Meyering
335de2ba1f libvirt.c: document the virState* functions
* src/libvirt.c (virStateActive, virStateCleanup, virStateReload):
(virStateActive): Add per-function comments.
2008-11-25 10:31:52 +00:00
Daniel P. Berrange
1ad44362e3 Set default vCPUs to match pCPUs for OpenVZ containers (Evgeniy Sokolov ) 2008-11-24 19:34:21 +00:00
Guido Günther
4b4a6d9d56 * src/Makefile.am: look for libvirt_sym.version in builddir 2008-11-24 15:07:45 +00:00
Jim Meyering
62bcd5d32b tests: new test: virsh-synopsis
* 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
2008-11-24 07:13:29 +00:00
Jim Meyering
4733f0a781 * gnulib/tests/test-EOVERFLOW: Remove.
* gnulib/tests/.cvsignore: Add test-EOVERFLOW, then...
Run "make sync-vcs-ignore-files" to Update .gitignore files.
2008-11-24 07:09:36 +00:00
Daniel P. Berrange
145bb1e821 Misc tweaks to node device impl 2008-11-21 12:46:39 +00:00
Daniel P. Berrange
1ee5367c19 Node device support in virsh (David Lively) 2008-11-21 12:39:48 +00:00
Daniel P. Berrange
8325fcf13d Remote protocol support for node devices (David Lively) 2008-11-21 12:31:04 +00:00
Daniel P. Berrange
620d4be7ae Node device driver for HAL and DeviceKit (David Lively) 2008-11-21 12:27:11 +00:00
Daniel P. Berrange
149322c530 Internal APIs for handling node device XML configuration (David Lively) 2008-11-21 12:20:45 +00:00
Daniel P. Berrange
0793e73c02 Public API for node device enumeration (David Lively) 2008-11-21 12:19:22 +00:00
Daniel P. Berrange
2c855c1c66 Optional dlopen support for drivers 2008-11-21 12:16:08 +00:00
Daniel P. Berrange
410fb96cbc Add export of virDomainEventCallbackListRemoveConn method 2008-11-21 11:44:03 +00:00
Daniel P. Berrange
c67700be8a Fix two memory leaks in domain conf and LXC code 2008-11-21 11:42:51 +00:00
Daniel P. Berrange
660418cff4 Misc fixes to event registration failure cases 2008-11-21 10:22:58 +00:00
Daniel P. Berrange
41f14d6ea5 Fix crash due to failure to unregister event callbacks in QEMU driver (David Lively) 2008-11-21 10:17:22 +00:00
Daniel P. Berrange
f6dacb21d2 Add Xen compiler flags for stats_linux.c build 2008-11-21 10:12:03 +00:00
Daniel Veillard
4815221333 * po/POTFILES.in src/uml_conf.h src/uml_driver.c: fixes syntax
check errors, reported by Ben Guthro
daniel
2008-11-21 10:06:28 +00:00
Daniel P. Berrange
d378791480 Fix crash on NULL uri scheme 2008-11-20 14:33:59 +00:00
Daniel P. Berrange
714bef5b6a Add an initial User Mode Linux Driver 2008-11-19 16:58:23 +00:00
Daniel P. Berrange
6d04effac7 Add a virFreeCallback to event loop APIs 2008-11-19 16:24:01 +00:00
Daniel P. Berrange
6d41cb87d3 Change public API for virEventAddHandle to allow multiple registrations per FD 2008-11-19 16:19:36 +00:00
Daniel P. Berrange
3d41e86534 Add a virFreeCallback to virDomainEventRegister (from David Lively) 2008-11-19 15:25:24 +00:00
Daniel P. Berrange
8a1553e43a Fix windows build & build without QEMU driver 2008-11-18 12:46:13 +00:00
Daniel P. Berrange
a5e72f9177 Add QEMU driver events for defined/undefined config files 2008-11-17 16:52:32 +00:00
Daniel P. Berrange
d3d54d2fc9 Add domain events detail information 2008-11-17 16:43:00 +00:00
Daniel P. Berrange
89156f1985 Link QEMU, LXC, network and storage drivers directly into libvirtd 2008-11-17 12:18:18 +00:00
Daniel P. Berrange
618276de19 Push URI probing logic down into individual drivers 2008-11-17 11:44:51 +00:00
Daniel P. Berrange
c08a47b853 Refactor storage backends to avoid dependancy from config parser to implementation 2008-11-17 11:19:33 +00:00
Daniel P. Berrange
25047e7cf8 Use a versioned linker script 2008-11-17 11:03:25 +00:00
Daniel P. Berrange
41ebac421e Build drivers as libtool convenience libs 2008-11-17 10:43:30 +00:00
Daniel P. Berrange
4f956c040c Fix updating of openvz config file params 2008-11-17 09:55:59 +00:00
Cole Robinson
00e8a7a491 Use different separator for lvs command to unbreak parsing for encrypted devs. 2008-11-14 16:10:47 +00:00
Jim Meyering
94359e16d3 avoid format string warnings
* src/openvz_driver.c (ADD_ARG_LIT): Add "%s" arg before _(...).
* src/qemu_driver.c (PCI_ATTACH_OK_MSG): Likewise.
* src/util.c (virExec, virRun): Likewise.
2008-11-14 14:19:37 +00:00
Daniel Veillard
df285bdd8d KVM/QEmu migration support
* 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
2008-11-14 08:42:47 +00:00
Daniel P. Berrange
bfdac58c36 Add bridged network to openvz driver & add some openvz docs 2008-11-12 16:35:47 +00:00
Daniel P. Berrange
48f32d8033 Revert previous storage patch which broke test driver 2008-11-12 16:28:27 +00:00
Daniel P. Berrange
8a8826600c Re-arrange storage backend registration 2008-11-11 15:52:16 +00:00
Daniel P. Berrange
9b7fd9c4ae Support OpenVZ filesystem template config in XML dump 2008-11-10 12:08:19 +00:00
Jim Meyering
0e7a565229 mark a few diagnostics for translation
* src/lxc_conf.c (lxcLoadDriverConfig): Mark a diagnostic.
* src/lxc_driver.c (lxcDomainStart): Likewise.
* po/POTFILES.in: Add src/lxc_conf.c.
* Makefile.maint (msg_gen_function): Add virReportErrorHelper
and lxcError.
2008-11-07 16:43:58 +00:00
Jim Meyering
0d4cdc0569 always compile iptables.c
Avoid a build error when configuring --without-xen --without-qemu.
* src/iptables.c [WITH_QEMU]: Don't #ifdef-out.
* src/iptables.h [WITH_QEMU]: Don't #ifdef-out.
* src/util.c (virRun) [__MINGW32__]: Define a stub that always fails.
2008-11-07 16:43:23 +00:00
Daniel Veillard
df93e1ee24 add new logging module, and move existing definitions there
* src/logging.c src/logging.h proxy/Makefile.am proxy/libvirt_proxy.c
  src/Makefile.am src/cgroup.c src/datatypes.c src/domain_event.c
  src/internal.h src/libvirt.c src/lxc_container.c src/lxc_controller.c
  src/lxc_driver.c src/proxy_internal.c src/qemu_driver.c
  src/remote_internal.c src/storage_backend_disk.c src/util.c
  src/veth.c src/xen_internal.c src/xen_unified.c src/xend_internal.c:
  add new logging module, and move existing definitions there
Daniel
2008-11-06 16:36:07 +00:00
Cole Robinson
3796e5802f Log stdout and stderr in virRun 2008-11-05 18:57:42 +00:00
Cole Robinson
a9a11b5393 Log the argv passed to virExec and virRun 2008-11-05 18:41:07 +00:00
Cole Robinson
f1ca068666 Move local argvToString to virArgvToString in util. 2008-11-05 18:22:10 +00:00
Jim Meyering
7271a92bec plug two leaks and fix a diagnostic
* src/qemu_conf.c (qemudLoadDriverConfig): Don't leak ->vncListen.
Fix an erroneous copy-and-pasted diagnostic.
* src/qemu_driver.c (qemudShutdown): Don't leak another ->vncListen.
2008-11-05 14:24:21 +00:00
Chris Lalancette
1ac47e34f2 Call vgscan before attempting to scan logical volumes. This makes sure we've
"touched" any logical volumes, so they appear in the subsequent "pvs" call.

Signed-off-by: Chris Lalancette <clalance@redhat.com>
2008-11-05 11:41:43 +00:00
Daniel P. Berrange
c9ff52fb8a Move WITH_XXX driver feature flags into config.h instead of direct compiler/linker args 2008-11-04 23:37:23 +00:00
Daniel P. Berrange
2ea1eceb75 Move domain events helpers into dedicated file 2008-11-04 23:33:57 +00:00
Daniel P. Berrange
6ace5a39c3 Move some API declarations out of internal.h & hash.c into dedicated files 2008-11-04 23:22:06 +00:00
Daniel P. Berrange
2f19b24a03 Remove unused internal virStateSigDispatcher() API 2008-11-04 22:55:51 +00:00
Daniel P. Berrange
d714b2afae Move internal error APIs into virterror_internal.h & drop leading __ prefix 2008-11-04 22:30:33 +00:00
Daniel P. Berrange
78439117bc Add support for -uuid and -domid args to QEMU 2008-11-04 22:15:30 +00:00
Daniel P. Berrange
cbb1dd0a9b Remove use of virStringList in favour of strongly typed APIs 2008-11-04 21:54:21 +00:00
Jim Meyering
b5bb5d950f don't print an uninitialized integer in a diagnostic
* src/virterror.c (__virErrorMsg) [VIR_ERR_XEN_CALL]:
Use a format with only one % directive.
2008-11-04 15:02:36 +00:00
Daniel Veillard
d9c75acde1 * src/qemu_conf.c: switch off cache if disk is shared and not read-only
patch by Charles Duffy
Daniel
2008-11-03 15:58:02 +00:00
Daniel Veillard
c1a9be4c1b * src/qemu_driver.c: oops trailing blanks
Daniel
2008-11-03 15:52:55 +00:00
Chris Lalancette
17a9e03cd1 Give iSCSI and disk storage backend drivers the
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>
2008-11-03 11:37:11 +00:00
Daniel Veillard
ba2dff372c * src/xm_internal.c: add minimum domain memory size check for Xen
patch by Shigeki Sakamoto
* AUTHORS: add Shigeki Sakamoto
Daniel
2008-10-31 13:06:17 +00:00
Cole Robinson
c5ee075dd9 Add a test storage driver. 2008-10-30 17:40:57 +00:00
Daniel Veillard
4780a00b14 * src/domain_conf.h src/qemu_driver.c: patch adding hor removal of
scsi/virtio disks for KVM, patch by Guido Günther
daniel
2008-10-29 14:32:40 +00:00
Jim Meyering
f79ebbd121 remove src/socketcompat.h; no longer needed
* 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.
2008-10-28 19:09:04 +00:00
Jim Meyering
487d57b341 avoid compiler warning when all storage backends are disabled
* src/storage_backend.c (backends): Add a NULL terminator.
(virStorageBackendForType): Use NULL terminator rather than
warning-provoking (possibly 0) array size.
2008-10-28 17:48:06 +00:00
Jim Meyering
57d54689da cvsignore mingw build artifacts: *.exe 2008-10-28 17:47:54 +00:00
Jim Meyering
2bbf76ebeb include netinet etc #ifndef HAVE_WINSOCK2_H 2008-10-28 17:47:45 +00:00
Jim Meyering
78d4d969e2 * src/remote_internal.c (remoteFindDaemonPath) [!WIN32]: Don't compile. 2008-10-28 17:47:40 +00:00
Jim Meyering
c5f45efd06 use errno, not socket_errno()
* remote_internal.c: s/socket_errno()/errno/, now that gnulib's
socket module ensures errno is useful in those cases.
2008-10-28 17:47:33 +00:00
Jim Meyering
b80b3ce4b3 socketcompat.h: simplify, to match latest gnulib
Now, sys/socket.h is always available, and errno works.
2008-10-28 17:47:23 +00:00
Jim Meyering
cabb75c503 adapt to API change in gnulib
* qemud/qemud.c: Include <netdb.h>, not "getaddrinfo.h"
* src/remote_internal.c: Likewise.
2008-10-28 17:46:00 +00:00
Jim Meyering
9801d7c595 * src/network_conf.c: Include <string.h> for declaration of memcmp. 2008-10-28 17:45:41 +00:00
Jim Meyering
05589b72c4 use ARRAY_CARDINALITY more
* tests/nodeinfotest.c: Include "util.h".
* src/xen_internal.c: Likewise.
* src/qemu_conf.c (qemudCapsInit): Use ARRAY_CARDINALITY.
* src/storage_backend.c (virStorageBackendForType): Likewise.
* src/storage_backend_fs.c (virStorageBackendProbeFile): Likewise.
* src/xen_internal.c (xenHypervisorMakeCapabilitiesInternal): Likewise.
* src/xend_internal.c (xenDaemonParseSxpr): Likewise.
* tests/nodeinfotest.c (mymain): Likewise.
* tests/qparamtest.c (DO_TEST): Likewise.
2008-10-28 17:43:24 +00:00
Daniel P. Berrange
b38d045dea Remove use of sys/poll.h on mingw 2008-10-24 13:10:30 +00:00
Daniel P. Berrange
bfc86e8a74 Fix syntax check errors 2008-10-24 12:05:39 +00:00
Daniel P. Berrange
3091bdd31a Implement getVersion API for openvz driver 2008-10-24 11:32:48 +00:00
Daniel P. Berrange
6d35116e33 Fix mingw build due to missing icons in tar.gz 2008-10-24 11:31:15 +00:00
Daniel P. Berrange
bdd50bc7f3 Centralize domain mac address handling in domain_conf.c/util.c 2008-10-24 11:20:08 +00:00
Jim Meyering
327b2eea26 fix mingw compilation warning
* src/libvirt.c (winsock_init) [HAVE_WINSOCK2_H]: Always return a value.
2008-10-24 08:55:13 +00:00
Chris Lalancette
c402724354 Brown paper bag bug. I didn't preserve the
<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>
2008-10-23 13:21:01 +00:00
Daniel Veillard
1509b8027f Massive patch adding event APIs by Ben Guthro
* 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
2008-10-23 13:18:18 +00:00
Chris Lalancette
e3b792d6e3 An updated patch for adding <device> tags to logical
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>
2008-10-23 11:39:53 +00:00
Chris Lalancette
c0c0fb8eef As suggested by danpb, to fix up the regression caused by last week's VIR_ENUM
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>
2008-10-23 11:32:22 +00:00
Chris Lalancette
c6f0a7b2db Currently, you can define a logical storage pool with something like:
<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>
2008-10-21 17:23:38 +00:00
Chris Lalancette
46db2b2968 Because of my patch last week that converted the various virStorage*FromString
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>
2008-10-21 17:18:45 +00:00
Chris Lalancette
c83c3e9e5c While doing on this patch series, I mistakenly added a bogus piece of
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>
2008-10-21 17:15:53 +00:00
Dan Smith
e98d8d7997 Fix up cgroup initialization order and allow /dev/pts device access in LXC 2008-10-21 16:46:47 +00:00
Daniel Veillard
6d6fd6b305 * src/qemu_driver.c: cleanup patch for usb masstorage hotadd
by Guido Günther
daniel
2008-10-21 13:09:23 +00:00
Daniel Veillard
7b9344686a * src/qemu_driver.c: add scsi/virtio hotplug support for KVM
patch by Guido Günther
daniel
2008-10-17 12:36:39 +00:00
Jim Meyering
164fbbd6e6 generate .gitignore files from .cvsignore ones
* 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.
2008-10-17 10:03:15 +00:00
Daniel Veillard
8348610c5e qemudDomainBlockStats use qemudDiskDeviceName
* src/qemu_driver.c: use qemudDiskDeviceName to determine the block
  device name in qemudDomainBlockStats(), patch by Guido Günther
daniel
2008-10-17 09:29:29 +00:00
Daniel Veillard
f009e2aae2 * src/qemu_driver.c: fix qemudDiskDeviceName to handle disk devices
too, patch by Guido Günther
daniel
2008-10-17 09:24:07 +00:00
Daniel Veillard
aadb84a547 * src/domain_conf.c: fix virDiskNameToBusDeviceIndex() to allow 0
patch by Guido Günther
Daniel
2008-10-17 09:18:21 +00:00
Chris Lalancette
eeff3cdcbc Add support for detecting the partition table type when scanning
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>
2008-10-16 15:06:03 +00:00
Chris Lalancette
164f786626 Compiling with -Werror showed a possible use before initialization
in src/qemu_driver.c.  Make sure to initialize the olddisk ptr to NULL.

Signed-off-by: Chris Lalancette <clalance@redhat.com>
2008-10-16 13:44:09 +00:00
Chris Lalancette
0fd0cb6037 "make syntax-check" was complaining that network_driver.c was missing from
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>
2008-10-16 12:04:06 +00:00
Richard W.M. Jones
d0a8e88b95 * configure.in, src/Makefile.am, src/virsh_win_icon.rc:
Add a Windows icon resource.
2008-10-15 18:39:34 +00:00
Richard W.M. Jones
d510d4bf92 * src/libvirt.c: Register the remote driver even when we are
configured --without-libvirtd.  Also adds debugging of
        registration events.
2008-10-15 10:33:01 +00:00
Jim Meyering
fd52c6ff67 avoid many format string warnings
Building with --disable-nls exposed many new warnings like these:
virsh.c:4952: warning: format not a string literal and no format ...
util.c:163: warning: format not a string literal and no format arguments
All but one of the following changes add a "%s" argument before
the offending _(...) argument.

This was the only manual change:
* src/lxc_driver.c (lxcVersion): Use %s and strerror(errno)
rather than %m, to avoid a warning from gcc -Wformat-security.

Add "%s" before each warned about format-string-with-no-%-directive:
* src/domain_conf.c (virDomainHostdevSubsysUsbDefParseXML)
(virDomainDefParseString, virDomainDefParseFile):
* src/hash.c (virGetConnect, __virGetDomain, virReleaseDomain)
(__virGetNetwork, virReleaseNetwork, __virGetStoragePool)
(virReleaseStoragePool, __virGetStorageVol, virReleaseStorageVol):
* src/lxc_container.c (lxcContainerChild):
* src/lxc_driver.c (lxcDomainDefine, lxcDomainUndefine)
(lxcDomainGetInfo, lxcGetOSType, lxcDomainDumpXML)
(lxcSetupInterfaces, lxcDomainStart, lxcDomainCreateAndStart)
(lxcVersion, lxcGetSchedulerParameters):
* src/network_conf.c (virNetworkDefParseString)
(virNetworkDefParseFile):
* src/openvz_conf.c (openvzReadNetworkConf, openvzLoadDomains):
* src/openvz_driver.c (openvzDomainDefineCmd)
(openvzDomainGetInfo, openvzDomainDumpXML, openvzDomainShutdown)
(openvzDomainReboot, ADD_ARG_LIT, openvzDomainDefineXML)
(openvzDomainCreateXML, openvzDomainCreate, openvzDomainUndefine)
(openvzDomainSetAutostart, openvzDomainGetAutostart)
(openvzDomainSetVcpus):
* src/qemu_driver.c (qemudDomainBlockPeek, qemudDomainMemoryPeek):
* src/remote_internal.c (remoteDomainBlockPeek)
(remoteDomainMemoryPeek, remoteAuthPolkit):
* src/sexpr.c (sexpr_new, _string2sexpr):
* src/storage_backend_disk.c (virStorageBackendDiskMakeDataVol)
(virStorageBackendDiskCreateVol):
* src/storage_backend_fs.c
(virStorageBackendFileSystemNetFindPoolSources):
* src/storage_backend_logical.c (virStorageBackendLogicalFindLVs)
(virStorageBackendLogicalFindPoolSources):
* src/test.c (testOpenDefault, testOpenFromFile, testOpen)
(testGetDomainInfo, testDomainRestore)
(testNodeGetCellsFreeMemory):
* src/util.c (virExec):
* src/virsh.c (cmdAttachDevice, cmdDetachDevice)
(cmdAttachInterface, cmdDetachInterface, cmdAttachDisk)
(cmdDetachDisk, cmdEdit):
* src/xend_internal.c (do_connect, wr_sync, xend_op_ext)
(urlencode, xenDaemonDomainCreateXML)
(xenDaemonDomainLookupByName_ids, xenDaemonDomainLookupByID)
(xenDaemonParseSxprOS, xend_parse_sexp_desc_char)
(xenDaemonParseSxprChar, xenDaemonParseSxprDisks)
(xenDaemonParseSxpr, sexpr_to_xend_topology, sexpr_to_domain)
(xenDaemonDomainFetch, xenDaemonDomainGetAutostart)
(xenDaemonDomainSetAutostart, xenDaemonDomainMigratePerform)
(xenDaemonDomainDefineXML, xenDaemonGetSchedulerType)
(xenDaemonGetSchedulerParameters)
(xenDaemonSetSchedulerParameters, xenDaemonDomainBlockPeek)
(xenDaemonFormatSxprChr, virDomainXMLDevID):
* src/xm_internal.c (xenXMConfigCacheRefresh, xenXMDomainPinVcpu)
(xenXMDomainCreate, xenXMDomainDefineXML)
(xenXMDomainAttachDevice, xenXMDomainDetachDevice):
* src/xml.c (virXPathString, virXPathNumber, virXPathLong)
(virXPathULong, virXPathBoolean, virXPathNode, virXPathNodeSet):
* src/xs_internal.c (xenStoreOpen):
2008-10-13 16:46:28 +00:00
Richard W.M. Jones
c13f07fc88 Build failure fixed.
* src/domain_conf.c: Fix build failure of the Xen proxy.
2008-10-13 15:24:34 +00:00
Jim Meyering
6ac274673c testError format strings: explicitly include domain and network names
This repairs the "make check" failure of tests/undefine.
* src/test.c (testResumeDomain, testPauseDomain): Likewise.
(testShutdownDomain, testGetDomainInfo, ): Likewise.
(testSetMemory, testSetVcpus, testDomainCreate, testDomainUndefine)
(testDomainGetSchedulerType, testDomainGetSchedulerParams): Likewise.
(testDomainSetSchedulerParams, testNetworkUndefine): Likewise.
(testNetworkStart, testNetworkGetBridgeName): Likewise.
(testDomainCoreDump, testDomainSave): Likewise, and...
Name the file upon failed open or write.
Use strerror(errno) in diagnostics.
* tests/undefine: Adjust expected output.

test.c (testError): Remove now-ignored dom and net parameters.
This is a sytnax-only change: removing the two unused parameters
and updating all callers:
* src/test.c (GET_DOMAIN, GET_NETWORK, testError)
(testBuildCapabilities, testOpenDefault, testOpenFromFile)
(testOpen, testGetHostname, testGetURI, testGetCapabilities)
(testLookupDomainByID, testLookupDomainByUUID)
(testLookupDomainByName, testResumeDomain, testPauseDomain)
(testShutdownDomain, testGetDomainInfo, testDomainSave)
(testDomainRestore, testDomainCoreDump, testGetOSType)
(testSetMemory, testSetVcpus, testListDefinedDomains)
(testNodeGetCellsFreeMemory, testDomainCreate)
(testDomainUndefine, testDomainGetSchedulerType)
(testDomainGetSchedulerParams, testDomainSetSchedulerParams)
(testLookupNetworkByUUID, testLookupNetworkByName)
(testListNetworks, testListDefinedNetworks, testNetworkUndefine)
(testNetworkStart, testNetworkGetBridgeName): Update callers.
2008-10-11 07:24:49 +00:00
Daniel P. Berrange
0c4a048485 Fix virRealloc bug for zero-size 2008-10-10 18:17:13 +00:00
Daniel P. Berrange
7e0d3e62e9 Support SDL config with QEMU guests 2008-10-10 16:52:20 +00:00
Daniel P. Berrange
427f7a8b09 Switch domain device objects to array instead of linked list 2008-10-10 16:08:01 +00:00
Daniel P. Berrange
2e53a9912e Switch storage objects to array instead of linked list 2008-10-10 15:13:28 +00:00
Daniel P. Berrange
dd48e929c7 Switch network objects to array instead of linked list 2008-10-10 14:50:26 +00:00
Daniel P. Berrange
4789154063 Switch domain objects to array instead of linked list 2008-10-10 14:20:37 +00:00
Daniel P. Berrange
1564711a27 Split network driver out into separate files 2008-10-10 13:57:13 +00:00
Daniel P. Berrange
0107578c5e Fix two format string warnings on 32bit hosts 2008-10-10 12:54:10 +00:00
Daniel Veillard
f6803c960f virDomainDefineXML, and a few additional cleanups
* include/libvirt/libvirt.h[.in] include/libvirt/virterror.h
  qemud/remote* src/driver.h src/libvirt.c src/libvirt_sym.version
  src/lxc_driver.c src/openvz_driver.c src/proxy_internal.c
  src/qemu_driver.c src/remote_internal.c src/test.c src/virsh.c
  src/xen_internal.c src/xen_unified.c src/xen_unified.h
  src/xend_internal.c src/xend_internal.h src/xm_internal.c
  src/xs_internal.c docs/*: cleanup virDomainCreateLinux into
  virDomainDefineXML, and a few additional cleanups
Daniel
2008-10-10 09:32:27 +00:00
Daniel Veillard
3d038d101f fix index creation for disks
* src/domain_conf.c src/util.c: fix index creation for disks >
  {sd,hd,xvd,vd}z (Sanjay Rao and Chris Wright)
Daniel
2008-10-10 08:37:35 +00:00
Cole Robinson
02fc93d624 Centralize majority of error reporting logic. 2008-10-09 15:38:31 +00:00
Daniel P. Berrange
218334d1b2 Fix two compile warnings 2008-10-09 14:50:25 +00:00
Dan Smith
6c504d6a7c Add LXC scheduling parameters and support in virsh schedinfo 2008-10-08 16:28:48 +00:00
Daniel Veillard
6d670a1fc1 use safewrite() and plug a leak
* src/cgroup.c: use safewrite()
* src/qemu_driver.c: missing VIR_FREE pojnted out by Eduardo Habkost
Daniel
2008-10-08 13:44:40 +00:00
Jim Meyering
3ca608b5d6 avoid "make syntax-check" failure
* src/cgroup.c (virCgroupSetValueStr): Use safe_write, not write.
2008-10-08 09:31:13 +00:00
Daniel Veillard
f9dbe46b44 * src/qemu_driver.c: another OOM handling cleanup (Guido Günther)
daniel
2008-10-07 16:39:32 +00:00
Daniel Veillard
9f4c047935 * src/qemu_driver.c: don't print and extra OOM error on top of getpwuid error
(Guido Günther)
Daniel
2008-10-07 16:01:23 +00:00
Cole Robinson
e2a43cdb87 Move DEBUG macros to central location. 2008-10-06 19:53:06 +00:00
Cole Robinson
8206b421d6 Fix segfault if starting qemu VM with an inactive virtual network. 2008-10-06 19:36:46 +00:00
Daniel Veillard
72c40b0622 use C99 initializers for virState
* src/lxc_driver.c src/qemu_driver.c src/remote_internal.c
  src/storage_driver.c: use C99 initializers for virState (Guido
  Gunther)
Daniel
2008-10-06 15:40:37 +00:00
Dan Smith
dd062d4209 Add forgotten cgroup.{c,h} and ChangeLog 2008-10-03 17:58:02 +00:00
Dan Smith
4461568ab4 Add cgroup manipulation and LXC driver 2008-10-03 16:46:01 +00:00
Cole Robinson
a166cdbb6e Fix starting qemu VM with multiple pty char devices. 2008-10-02 14:10:20 +00:00
Daniel Veillard
3bc324139e Xen interface order and fix python parallel build
* src/xend_internal.c: fix ordering when parsing multiple Xen
  interfaces, patch by Jim Fehlig
* python/Makefile.am: fix parallel build
Daniel
2008-10-01 15:31:02 +00:00
Daniel Veillard
321c9a7f51 * configure.in libvirt.spec.in NEWS docs/*: release of libvirt-0.4.6
* src/storage_backend_logical.c: re-add the -f flag to vgremove
* po/*: rebuilt
Daniel
2008-09-23 20:48:49 +00:00
Daniel Veillard
ad5723e792 cleanup and removal for pools in logical backend
* 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
2008-09-22 20:22:35 +00:00
Daniel Veillard
4f84e631ed * src/storage_conf.c: fixes parsing to allow no sources for a pool
fix by Dan and Chris Lalancette
Daniel
2008-09-22 19:57:47 +00:00
Daniel Veillard
0958489ca5 * src/remote_internal.c src/storage_driver.c: structure init cleanup
by Chris Lalancette
Daniel
2008-09-22 19:53:42 +00:00
Daniel Veillard
7e0ff3aab0 read network config in OpenVZ driver
* src/openvz_conf.c: patch from Evgeniy Sokolov to read
  network config in OpenVZ driver.
Daniel
2008-09-22 15:21:44 +00:00
Daniel P. Berrange
0aac8c9447 Fix trailing whitespace & unmarked diagnostic warning 2008-09-18 08:54:23 +00:00
Richard W.M. Jones
a0208e6635 src/openvz_driver.c: Fix segfault in OpenVZ driver
(Evgeniy Sokolov).
2008-09-17 16:07:03 +00:00
Richard W.M. Jones
4f1e6e7ef2 src/storage_backend_disk.c: Missing include file. 2008-09-17 14:29:47 +00:00
Richard W.M. Jones
dd57b821e4 Remove some deadcode (Nguyen Anh Quynh). 2008-09-17 14:21:27 +00:00
Richard W.M. Jones
3b7c7d888a Change name of "blocked" state to "idle" (John Levon). 2008-09-17 14:18:15 +00:00
Richard W.M. Jones
a744ddad59 include/libvirt/libvirt.h.in, src/libvirt.c: Fix comments
which incorrectly referred to non-existent 'virDomainFlags'
type (Anton Protopopov).
2008-09-17 14:15:20 +00:00
Richard W.M. Jones
7076981f50 src/conf.c: Improved error messages in XM conf module. 2008-09-17 14:11:21 +00:00
Richard W.M. Jones
04e9e1b2a6 configure.in, src/qemu_driver.h, src/qemu_driver.c: KVM
can determine max VCPUs at runtime (Guido Günther).
2008-09-17 14:07:49 +00:00
Cole Robinson
bf26cd8ecb Implement disk volume deleting. 2008-09-16 16:46:08 +00:00
Cole Robinson
a82bd0784b Fix reading vncdisplay from xend, add several test cases for xen vnc corner case
s.
2008-09-09 13:53:58 +00:00
Cole Robinson
bf3e2132a7 Fix a segfault if defining a qemu domain without an emulator. 2008-09-09 13:44:42 +00:00
Daniel Veillard
58686c3dd8 add domain name in network configurations suport and on OpenVZ config bugfix
* 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
2008-09-08 12:45:29 +00:00
Daniel P. Berrange
3aa7c4639d Fix potential NULL deref in openvz driver 2008-09-08 12:15:33 +00:00
Daniel Veillard
914e1c61de finish applying initialization patch for logical storage backend
* src/storage_backend_logical.c: finish applying initialization
  from Jim Fehlig patch for logical storage backend
Daniel
2008-09-08 08:03:54 +00:00
Daniel P. Berrange
a8936295ce Fix trailing whitespace mistakes 2008-09-05 15:00:14 +00:00
Daniel P. Berrange
1cc9f9b3d8 Convert openvz driver to generic domain XML APIs 2008-09-05 14:10:58 +00:00
Daniel P. Berrange
542039fab0 Fully support mingw builds 2008-09-05 12:03:45 +00:00
Daniel P. Berrange
126d3ebeea Fix starting of xen domains without a PVFB console by removing default emulator 2008-09-05 11:52:12 +00:00
Daniel P. Berrange
f193e19536 Fix xen capabilities data creation 2008-09-05 11:35:43 +00:00
Daniel Veillard
e88295804a * src/storage_backend_fs.c: fix a signed/unsigned issue breaking
virStorageBackendProbeFile(), patch by Cole Robinson
Daniel
2008-09-04 13:34:42 +00:00
Daniel Veillard
a8d0600762 * src/qemu_driver.c: fix an error message, patch by Nguyen Anh Quynh
Daniel
2008-09-04 13:20:28 +00:00
Daniel Veillard
c37031ebf3 fix a miscalculation of command line size for vgcreate
* src/storage_backend_logical.c: fix a miscalculation of command line
  size for vgcreate, patch from Jim Fehlig
Daniel
2008-09-04 13:13:32 +00:00
Daniel Veillard
18626bd225 when dumping code don't keep Xen domain live
* src/xend_internal.c: patch from John Levon shutting down a live
  domain is just more hazardous
Daniel
2008-09-04 09:11:37 +00:00
Daniel Veillard
584ff19452 * src/xend_internal.c src/xs_internal.c: use poweroff instead of halt
when shutting down a xen domain, patch by John Levon
Daniel
2008-09-04 09:07:42 +00:00
Daniel Veillard
821dcf0ff7 * src/qemu_driver.c: switch flags to unsigned by James Morris
* AUTHORS: add James Morris
Daniel
2008-09-04 08:15:05 +00:00
Dan Smith
df01e14bd7 Add LXC version implementation
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.
2008-09-03 17:21:27 +00:00
Cole Robinson
e0b4fcc280 Fix qemu media connect/eject to work with latest syntax. Add support for ejecting floppy devices and scsi cdroms. 2008-09-03 16:05:25 +00:00
Cole Robinson
fe7bb57a8b Update domain xml after usb device hotplug. 2008-09-03 15:05:31 +00:00
Cole Robinson
f4af06d812 Scrap media eject output to try and determine success/fail. 2008-09-03 14:43:34 +00:00
Cole Robinson
34b1a03402 Fix disk ordering and add target duplication checking when parsing domain xml. 2008-09-03 14:30:24 +00:00
Daniel Veillard
53738f83a5 avoid a segfault on CD eject in KVM/QEmu
* src/qemu_driver.c: patch from Cole Robinson to avoid a segfault
  on KVM CD eject
Daniel
2008-09-03 12:52:27 +00:00
Daniel Veillard
54a4f8d44d add output on attach and detach success
* src/virsh.c: patch from Cole Robinson to add output on attach
  and detach success
daniel
2008-09-03 12:38:28 +00:00
Daniel Veillard
b419ebc7e9 * src/storage_conf.c: add one missing check in virStoragePoolDefParseDoc
Daniel
2008-09-03 07:12:37 +00:00
Daniel Veillard
10ccfc92f3 * src/domain_conf.c: fix a parsing error for input devices
patch by Cole Robinson
daniel
2008-09-02 15:33:39 +00:00
Daniel Veillard
b8f2610280 check availbility of emulators before reporting them in capabilities
* 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
2008-09-02 15:00:09 +00:00
Daniel Veillard
41ce15a586 Adds storage source element for pools
* 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
2008-09-02 14:15:42 +00:00
Jim Meyering
81cb09f9fe qemu_conf.c: use new function, virFileReadLimFD
* src/qemu_conf.c (qemudExtractVersionInfo): Use virFileReadLimFD
and VIR_FREE in place of an open-coded loop and a static buffer.
2008-09-02 10:30:40 +00:00
Jim Meyering
d2ac46f2b0 util.c: add a file-descriptor-based wrapper for fread_file_lim
* src/util.c (virFileReadLimFP): New function.
(__virFileReadLimFD): New function.
* src/util.h (__virFileReadLimFD): Declare.
(virFileReadLimFD): Define.
(virFileReadAll): Rewrite to use virFileReadLimFP.
2008-09-02 10:29:51 +00:00
Daniel P. Berrange
3348a97bd3 Switch over fork/exec code to use virExec 2008-08-29 07:11:15 +00:00
Daniel P. Berrange
afac1439aa Allow for private root filessytem in containers using pivot_root 2008-08-28 22:40:50 +00:00
Daniel P. Berrange
8f762e34f3 Fix lookup of xen VM after define (Cole Robinson) 2008-08-28 11:59:07 +00:00
Daniel P. Berrange
39c9354c5c Add storage pool source discovery support (patch from David Lively) 2008-08-27 20:05:58 +00:00
Daniel P. Berrange
da1963381b Fix QEMU domain creation by allowing virExec to preserve certain FDs 2008-08-27 11:42:52 +00:00
Daniel P. Berrange
2875ed81bd Fix EOF handling when reading openvz domain list 2008-08-27 11:21:01 +00:00
Daniel P. Berrange
d81b038cc2 Remove use of virState apis from openvz driver 2008-08-27 11:19:45 +00:00
Dan Smith
5fb17bcc1e [LXC] Cleanup devices on container shutdown 2008-08-22 15:35:37 +00:00
Daniel P. Berrange
9472d3e2f3 Improve error reporting from remote driver 2008-08-21 10:14:54 +00:00
Daniel P. Berrange
11a2e2972a Propagate virConnectOpen errors to global error object 2008-08-21 10:12:32 +00:00
Daniel P. Berrange
c2bbf99e48 Remove unused lx_controller.h file 2008-08-21 10:07:21 +00:00
Daniel P. Berrange
5f134f0197 Ignore libvirt_lxc binary 2008-08-21 09:14:39 +00:00
Daniel P. Berrange
177c74b1fa Create lxc_controller standalone binary 2008-08-20 20:55:32 +00:00
Daniel P. Berrange
bb16f4a25d Do conditional driver config in Makefile.am, not source files 2008-08-20 20:48:35 +00:00
Daniel P. Berrange
6334cd16df Remove configFile/autostartLink vars from virDomainObj struct 2008-08-20 19:42:36 +00:00
Daniel Veillard
b1e5880740 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
2008-08-20 13:44:03 +00:00
Daniel Veillard
ce9439358c 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
2008-08-20 13:33:01 +00:00
Daniel Veillard
ace1b6bf98 Fix size reporting for disks without partitions.
* src/parthelper.c: Patch from Cole Robinson, fix size reporting for
  disks without partitions.
Daniel
2008-08-20 13:20:01 +00:00
Daniel Veillard
b73d495754 * src/network_conf.c src/network_conf.h src/qemu_driver.c: allow to
add static host definition for dnsmasq
Daniel
2008-08-20 12:50:29 +00:00
Daniel P. Berrange
1b4bb7d4ab Allow non-blocking/daemon mode to be specified via virExec flags 2008-08-20 09:24:14 +00:00
Daniel P. Berrange
6bc99a7775 Allow a pre-opened FD to be be pass to virExec for stdout/err 2008-08-20 09:08:17 +00:00
Daniel P. Berrange
60ed1d2a7a Avoid signal race in virExec 2008-08-20 08:53:49 +00:00
Daniel P. Berrange
f2172946e5 Improve virExec error reporting 2008-08-20 08:30:04 +00:00
Daniel P. Berrange
5cd1d3c53c Remove duplicated call to virInitialize 2008-08-18 09:24:46 +00:00
Mark McLoughlin
7c3ccd6f14 Fri Aug 15 11:00:38 IST 2008 Mark McLoughlin <markmc@redhat.com>
* 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
2008-08-15 10:02:33 +00:00
Atsushi SAKAI
6fd4c30285 fix typos src/virsh.c from John Levon,
and 3 more files(src/domain_conf.c src/openvz_driver.c src/qemu_driver.c)
2008-08-15 01:41:49 +00:00
Daniel P. Berrange
2e7a373646 Switch LXC driver over to generic domain XML processing APIs 2008-08-13 12:50:55 +00:00
Daniel P. Berrange
763dacda97 Make LXC I/O controller process a parent of the container process 2008-08-13 10:52:15 +00:00
Daniel P. Berrange
518c2144e5 Re-arrange code between LXC driver files 2008-08-13 10:25:34 +00:00
Daniel P. Berrange
e82c913680 Refactor LXC driver to pass tty/socket state directly 2008-08-13 10:14:47 +00:00
Daniel Veillard
415b92101f * docs/storage.html[.in] src/storage_backend_disk.c: revert previous
msdos patch and apply new one from Cole Robinson
daniel
2008-08-13 09:45:10 +00:00
Jim Meyering
4ee755d641 rewrite virFileLinkPointsTo
* src/util.c (SAME_INODE): Define.
(virFileLinkPointsTo): Rewrite to be more portable and more efficient.
2008-08-12 17:38:08 +00:00
Daniel Veillard
8fdb2cffa5 make sure parted doesn't ask for confirmation
* src/storage_backend_disk.c: make sure parted doesn't ask
  confirmation,  patch by Cole Robinson
Daniel
2008-08-12 11:29:49 +00:00
Daniel Veillard
ef7fec1168 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
2008-08-12 11:26:00 +00:00
Atsushi SAKAI
413c5dbf07 add _fd to stdin, stderr stdout in struct virDomainObj for compilation on MinGW 2008-08-12 08:38:22 +00:00
Atsushi SAKAI
43c7f972aa fix compilation for MinGW 2008-08-12 08:25:48 +00:00
Daniel P. Berrange
b3728d7d72 Fix const-correctness of virRUn and virExec 2008-08-08 15:43:38 +00:00
Daniel Veillard
5ba372306a 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
2008-08-08 15:03:00 +00:00
Daniel Veillard
d1710d35ea 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
2008-08-08 14:27:05 +00:00
Dan Smith
e94c12451b Fix device name clash in src/veth.c 2008-08-07 13:34:17 +00:00
Daniel Veillard
2194f1c983 * src/bridge.c: fix a build failure on RHEL4
Daniel
2008-08-07 10:22:52 +00:00
Jim Meyering
3fb53d1181 fix failing "make syntax-check"
* src/stats_linux.c: Don't include <c-ctype.h> no longer used.
2008-08-06 13:07:55 +00:00
Jim Meyering
783158511a 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.
2008-08-06 12:08:49 +00:00
Chris Lalancette
b8fb68be37 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>
2008-08-06 11:26:47 +00:00
Chris Lalancette
6335c2a0cc 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>
2008-08-05 16:45:07 +00:00
Chris Lalancette
8c30002862 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>
2008-08-05 16:38:49 +00:00
Daniel Veillard
063679580d 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
2008-08-05 10:53:05 +00:00
Jim Meyering
6d72e14178 make distclean: remove generated source files
* src/Makefile.am (DISTCLEANFILES): Define to $(BUILT_SOURCES)
so "make distcheck" passes.
2008-08-05 08:43:03 +00:00
Atsushi SAKAI
adc1d93f97 fix syntax-check error (replace TAB to space) 2008-08-04 06:33:25 +00:00
Jim Meyering
deefaf1891 src/xend_internal.c (xenDaemonParseSxpr): Add const to "root" parameter.
This piece was mistakenly omitted from the previous patch.
2008-08-01 15:32:28 +00:00
Jim Meyering
07f8a8b34a xend_internal.c, sexpr.c: const-correctness fixes 2008-08-01 14:43:12 +00:00
Richard W.M. Jones
969fa847c1 '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.
2008-08-01 14:30:41 +00:00
Daniel P. Berrange
0dee7feb74 Fix initial VM state 2008-08-01 14:19:06 +00:00
Jim Meyering
66f9bb5b95 virsh.c: more const-correctness fixes 2008-08-01 13:51:18 +00:00
Daniel P. Berrange
a7600746fb Support for container related domain XML extensions 2008-08-01 13:31:37 +00:00
Daniel P. Berrange
ffc839fb20 Always set forward-delay on bridge, even if 0 2008-08-01 12:56:52 +00:00
Richard W.M. Jones
3f3345aa85 Const-correctness fixes in virsh.c
* src/virsh.c: Const-correctness.
2008-08-01 12:19:56 +00:00
Daniel Veillard
c810c6cc23 * src/qemu_driver.c: patch from Chris Lalancette adding missing
carriage returns to logs
Daniel
2008-08-01 11:24:04 +00:00
Richard W.M. Jones
cf11bb2249 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.
2008-08-01 09:39:44 +00:00
Daniel Veillard
eba65e1c6d * 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
2008-08-01 06:42:45 +00:00
Daniel Veillard
7711e6858c * src/qemu_driver.c: apply patch from Charles Duffy fixing erro
messages when trying to crate a domain already defined.
Daniel
2008-08-01 06:23:31 +00:00
Daniel P. Berrange
42e559a324 Fix autoport when domain is inactive 2008-07-31 14:39:30 +00:00
Chris Lalancette
6f17fb2851 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.
2008-07-31 12:30:34 +00:00
Daniel Veillard
55e1221686 * src/qemu_driver.c: patch from Guido Günther, interface stats should
not crash on interfaces without an ifname.
Daniel
2008-07-30 09:20:19 +00:00
Daniel Veillard
c05cf3f3e1 * src/storage_backend_logical.c: patch from David Lively fixing
small differences of behaviour for 'lvs' and 'vgs' on SLES
Daniel
2008-07-30 08:52:44 +00:00
Chris Lalancette
654c5714bf The new generic domain re-factor introduced a small regression into the drive
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>
2008-07-29 12:09:21 +00:00
Daniel Veillard
4779e0bcb2 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
2008-07-29 08:42:56 +00:00
Daniel Veillard
996933bbcd 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
2008-07-28 14:06:54 +00:00
Daniel Veillard
387e06421f * src/qemu_driver.c: patch from Guido Günther to make sure create
doesn't override an existing domain definition or UUID
Daniel
2008-07-28 12:52:37 +00:00
Daniel P. Berrange
c5ecc66658 Fix misc typos in domain XML handling 2008-07-25 16:25:11 +00:00
Daniel P. Berrange
e8a84817d4 Remove unused c-ctype.h include 2008-07-25 16:19:00 +00:00
Daniel P. Berrange
9351cb0ab0 Fix reporting of errors against virConnect object in XML apis 2008-07-25 14:27:25 +00:00
Daniel P. Berrange
cb29913fb1 Switch XM config file driver to use new domain APIs for XML to config conversion 2008-07-25 14:10:49 +00:00
Daniel P. Berrange
547bd71a4a Switch XM config file driver to use new domain APIs for XML generation 2008-07-25 13:50:08 +00:00
Daniel P. Berrange
225fb3e93c Prepare xm_internal driver for new domain XML apis 2008-07-25 13:39:02 +00:00
Daniel P. Berrange
73d021c5c1 Fix test driver inactive domains and domain ID allocation 2008-07-25 13:27:12 +00:00