Jim Meyering
8cc2bbe33c
qparams.c: Use virReportOOMError(NULL), not qparam_report_oom()
...
* src/qparams.c (VIR_FROM_THIS): Define to VIR_FROM_NONE.
(qparam_report_oom): Remove definition.
Replace all uses.
2009-01-28 16:13:46 +00:00
John Levon
499189694a
fix mis-use of PF_UNIX as a protocol
2009-01-28 14:36:23 +00:00
Daniel P. Berrange
489fde7680
Add support for copy-on-write storage volumes
2009-01-27 18:30:03 +00:00
Jim Meyering
f03d3439cd
virterror.c: don't read beyond end of buffer upon OOM
...
* src/virterror.c (virReportSystemErrorFull): Fix typo in
my previous change. Patch by Daniel P. Berrange.
2009-01-27 12:26:53 +00:00
Mark McLoughlin
b4f62abbf1
kvm/virtio: Set IFF_VNET_HDR when setting up tap fds
...
IFF_VNET_HDR is a tun/tap flag that allows you to send and receive
large (i.e. GSO) packets and packets with partial checksums. Setting
the flag means that every packet is proceeded by the same header which
virtio uses to communicate GSO/csum metadata.
By enabling this flag on the tap fds we create, we greatly increase
the achievable throughput with virtio_net.
However, we need to be careful to only set the flag when a) QEMU has
support for this ABI and b) the value of the flag is queryable using
the TUNGETIFF ioctl.
It's nearly five months since kvm-74 - the first KVM release with this
feature - was released. Up until now, we've not added libvirt support
because there is no clean way to detect support for this in QEMU at
runtime. A brief attempt to add a "info capabilities" monitor command
to QEMU floundered. Perfect is the enemy of good enough. Probing the
KVM version will suffice for now.
Signed-off-by: Mark McLoughlin <markmc@redhat.com>
2009-01-27 11:12:05 +00:00
Jim Meyering
e15147c141
fix errors in virReportSystemErrorFull
...
* src/virterror.c (virStrerror): New function.
(virReportSystemErrorFull): Don't leak "combined".
In fact, don't even attempt allocation.
Do include the result of formatted print in final diagnostic.
2009-01-27 10:57:18 +00:00
Jim Meyering
339cc9d992
build: avoid format warnings
...
* src/proxy_internal.c (xenProxyCommand): Mark a diagnostic.
* src/xen_unified.c (xenUnifiedOpen, xenUnifiedAddDomainInfo):
Fix unmarked diagnostics by removing the diagnostic altogether:
replace each xenUnifiedError(...,VIR_ERR_NO_MEMORY call with a
call to virReportOOMError.
2009-01-27 08:50:03 +00:00
Jim Meyering
69d947eb80
* src/virterror.c (virErrorMsg): Correct indentation.
2009-01-27 08:49:15 +00:00
John Levon
39e49ad7c9
fix recursive lock hang in xenstore driver
2009-01-23 19:18:24 +00:00
Daniel P. Berrange
ad70b32414
Support QEMU disk format specification in XML
2009-01-23 16:22:20 +00:00
Jim Meyering
727d4fdc6e
fix comment typo: s/contains/continues/
...
* src/libvirt.c (virStorageVolFree): Correct typo in comment.
2009-01-23 14:18:43 +00:00
Jim Meyering
6278bb191a
maint: update list of error function names and adapt
...
* Makefile.maint (msg_gen_function): Update list.
Remove some now-unused names, add some new ones.
* src/hash.c (virHashError): Remove unused definition.
* src/openvz_conf.h (openvzLog): Likewise.
* src/xen_unified.c: Mark newly-exposed diagnostics for translation.
2009-01-23 12:29:29 +00:00
John Levon
e80f10064e
parse IP address for bridge interfaces
2009-01-23 01:48:47 +00:00
Daniel P. Berrange
c4985e9419
use the gnulib random_r function
2009-01-22 20:27:01 +00:00
Daniel P. Berrange
1b745219c7
Remove use of non-reentrant POSIX apis
2009-01-22 19:41:48 +00:00
Jim Meyering
d0eab955c2
xm_internal.c: fix locking bug: s/Lock/Unlock/
...
* src/xm_internal.c (xenXMDomainDefineXML): Release lock, (don't
try to acquire it) upon failure, just before returning.
2009-01-22 19:18:24 +00:00
John Levon
7420fec81b
Remove non-existent symbol from linker script
2009-01-22 18:33:13 +00:00
John Levon
fb4ec82358
Support script for bridge interface type
2009-01-22 18:29:13 +00:00
John Levon
2b29698352
Least privilege support for Solaris
2009-01-22 17:49:41 +00:00
Daniel P. Berrange
e52d74e536
Make xen driver threadsafe
2009-01-21 18:11:14 +00:00
Daniel P. Berrange
e3672d9695
Allow storage driver to handle daemon restarts
2009-01-20 22:43:07 +00:00
Daniel P. Berrange
23a090ab92
Allow virtual networks to survive daemon restart
2009-01-20 22:36:10 +00:00
Daniel P. Berrange
a964a6dad6
Support ac97 soundcard model
2009-01-20 22:15:55 +00:00
Daniel Veillard
5fb1e29c7e
* src/logging.c: fix openlog() ident lifetime for Solaris
...
daniel
2009-01-20 21:34:44 +00:00
Daniel P. Berrange
a888b22cf9
Support domain events in test driver
2009-01-20 20:23:53 +00:00
Jim Meyering
3548e9aae8
don't ignore write failure
...
* src/network_driver.c (networkEnableIpForwarding): This function
would always return 1 (success). Now it returns 0 upon write or
close failure, being careful to preserve any errno from a write failure.
Add comments.
2009-01-20 19:29:08 +00:00
Daniel P. Berrange
f61341173b
Allow concurrent processing of RPC calls in daemon
2009-01-20 19:25:15 +00:00
Daniel P. Berrange
84ef468ba8
Fix some misleading comments in XM driver
2009-01-20 18:20:09 +00:00
Daniel P. Berrange
2c7be88d15
Remove a use of strerror() in error reporting in remote driver
2009-01-20 17:47:13 +00:00
Daniel P. Berrange
788bedd904
Remove use of static data in Xen XM driver
2009-01-20 17:34:56 +00:00
Daniel P. Berrange
e428a69e6f
Remove use of static data in Xen inotify driver
2009-01-20 17:19:23 +00:00
Daniel P. Berrange
437ac354fc
Make error reporting threadsafe by avoiding strerror
2009-01-20 17:13:33 +00:00
Daniel Veillard
25415eb104
* src/qemu_driver.c: remove a warning when printing a file offset
...
daniel
2009-01-20 16:39:35 +00:00
Daniel P. Berrange
61674cc17d
Make RPC call dispatch threaded
2009-01-20 16:36:34 +00:00
Daniel Veillard
458a673cb7
remove stdout_fd, stderr_fd from virDomainObj
...
* src/domain_conf.h src/lxc_driver.c src/uml_driver.c: virDomainObj
doesn't need stdout and stderr fields anymore, patch from
Guido Günther
daniel
2009-01-20 16:10:20 +00:00
Daniel Veillard
6d004d3f8a
* src/domain_conf.h src/qemu_driver.c: use monitor fd for QEmu/KVM
...
domain shutdown and read saved vm status on libvirtd startup,
last 2 patches from Guido Günther finishing up the surviving the
libvirt daemon restart
daniel
2009-01-20 15:52:11 +00:00
Jim Meyering
45062390a6
fix "make syntax-check" failures
...
* ChangeLog: Start with TAB, not 8 spaces.
* src/virterror.c: Remove trailing spaces.
2009-01-20 13:51:52 +00:00
Daniel P. Berrange
a776fad370
Add public APIs for ref counting on public objects
2009-01-20 12:14:03 +00:00
Daniel P. Berrange
ead04dcbe8
Thread local error reporting
2009-01-20 12:01:45 +00:00
Daniel P. Berrange
c790f6d25e
Avoid bogus event loop wakeups in remote driver when doing RPC call
2009-01-20 11:45:09 +00:00
Daniel P. Berrange
ed493909f7
Add locking to the remote driver
2009-01-20 11:41:24 +00:00
Guido Günther
8dfbfe3145
daemonize qemu processes
2009-01-19 21:55:54 +00:00
Guido Günther
5d99a309e6
save domstate as string in status file
2009-01-19 21:06:26 +00:00
Daniel Veillard
9a969b86a9
* src/xen_internal.c src/xend_internal.c: Relax NUMA checking
...
for RHEL-5 and change the detection stategy for default Xen
accesses, patch by Markus Armbruster
daniel
2009-01-19 20:16:10 +00:00
Daniel Veillard
b751b46bc5
Fix PVFB version check for RHEL-5
...
* src/xend_internal.c src/xm_internal.c: fix paravirt framebuffer
handling since it was backoprted for RHEL-5, patch by Markus
Armbruster
daniel
2009-01-19 19:49:30 +00:00
Daniel Veillard
e676a699e8
* src/xend_internal.c src/xm_internal.c: fix fully virt network
...
device configuration for Xen on RHEL-5, patch by Markus Armbruster
daniel
2009-01-19 18:12:00 +00:00
Daniel Veillard
99ed5b4bee
Two bug fixes coming from RHEL and Markus being added to AUTHORS
...
* src/xm_internal.c: two bug fixes coming from RHEL package
posted by Markus Armbruster
* AUTHORS: adding Markus
daniel
2009-01-19 15:24:41 +00:00
Cole Robinson
46d4a5e047
Fix segfault with console device back compat.
2009-01-16 16:50:11 +00:00
Daniel P. Berrange
dd9b3fb594
Fix bug when fork isn't available (Win32) in remote driver
2009-01-15 20:13:12 +00:00
Daniel P. Berrange
2be79b1d5e
Reduce exit paths in remote driver APIs
2009-01-15 20:07:10 +00:00
Daniel P. Berrange
19d1bf2562
Remove use of macros in remote driver private data access
2009-01-15 20:04:44 +00:00
Daniel P. Berrange
0cd119e7b8
Fix incorrect use of private data field in remote driver
2009-01-15 20:03:10 +00:00
Daniel P. Berrange
4dac0a1105
Generic internal threads API
2009-01-15 19:56:05 +00:00
Daniel P. Berrange
52e51d278e
Implement virKill for Win32 platform
2009-01-15 19:40:21 +00:00
John Levon
4d713eabf5
Avoid passing NULL to printf %s specifier
2009-01-15 17:54:20 +00:00
John Levon
c7095a4b4c
Improve xend_get error message
2009-01-15 15:17:53 +00:00
John Levon
443698d2b2
implement capabilities parsing for Solaris
2009-01-15 01:35:17 +00:00
John Levon
406c05f2e7
Fix xs_unwatch() to correctly pass the token
2009-01-15 01:23:32 +00:00
John Levon
c8070bf632
Fix activeDomainList handling
2009-01-15 01:21:36 +00:00
John Levon
65316d7940
Fix ref-counting for Xen driver event registration
2009-01-15 01:18:37 +00:00
John Levon
5b6c39f51f
Mark Xen PV CD-ROM devices as such
2009-01-14 16:21:12 +00:00
Jim Meyering
6954d44e53
diagnose "libvirtd --config=no-such-file"
...
* qemud/qemud.c (remoteReadConfigFile): Don't return 0 (success)
when the config file is unreadable or nonexistent
Return -1, not 0, upon virConfReadFile failure.
(main): If remote_config_file is not specified via --config(-f),
use the default config file only if it exists. Otherwise,
use /dev/null.
* src/conf.c (virConfReadFile): Don't diagnose virFileReadAll
failure, since it already does that.
2009-01-12 18:22:32 +00:00
Guido Günther
8af87ea251
don't emulate snprintf
2009-01-11 11:21:29 +00:00
Guido Günther
4275be68fb
split out opening of the qemu logfile
2009-01-11 11:18:31 +00:00
John Levon
261c3a8fd0
src/logging.h: fix non-debug compile
2009-01-09 19:22:02 +00:00
Guido Günther
d6bd288da2
add missing flags argument
2009-01-08 19:52:15 +00:00
Guido Günther
46971d5ed7
pass flags argument to all virDomain*DefParse* functions
2009-01-08 13:54:20 +00:00
Daniel Veillard
c7cbbfa43b
* src/domain_conf.c src/qemu_conf.c: implement PCI passthrough
...
for recent KVM versions in a similar way to USB, patch by
Jason Krieg. Some cleanups and reformating too.
daniel
2009-01-07 12:56:13 +00:00
Daniel Veillard
d6eceb568f
* src/openvz_driver.c: fix the mac addresses generation for OpenVZ veth
...
devices, patch by Evgeniy Sokolov
* docs/apps.html: regenerated fixing a typo
Daniel
2009-01-07 10:55:54 +00:00
Daniel Veillard
fbba4423e9
* src/libvirt_private.syms src/qemu_driver.c src/test.c
...
src/uml_driver.c src/util.c src/util.h src/xen_unified.c:
unify hostname lookup using virGetHostname convenience function,
patch by David Lutterkort
daniel
2009-01-07 10:43:16 +00:00
Daniel P. Berrange
37e72aa542
Fix misc mingw portability problems
2009-01-06 18:32:03 +00:00
Guido Günther
83467de3ed
add virKillProcess
2009-01-06 17:46:46 +00:00
Guido Günther
ffafc252dd
trivial cleanups
2009-01-06 17:20:27 +00:00
Jim Meyering
2ad1ca3f6c
fix "make dist" (from scratch) failure
...
* src/Makefile.am (EXTRA_DIST): Don't distribute libvirt_sym.version,
now that it's been removed. Spotted by Daniel Veillard.
2009-01-06 15:22:57 +00:00
Jim Meyering
950c8b3916
dist: distribute all libvirt_*.syms files, ...
...
* src/Makefile.am (EXTRA_DIST): Distribute all libvirt_*.syms files,
not just those that happen to be selected at configure time.
2009-01-06 15:16:43 +00:00
Daniel Veillard
0dbcac6598
* src/storage_backend_fs.c: Make mntent.h specific to the FS storage
...
backend, patch by John Levon
daniel
2009-01-06 08:43:44 +00:00
Jim Meyering
34ac4c1fe7
Remove storage backend symbols from version script
...
* src/libvirt_private.syms: Remove virStorageBackend* symbol names.
They're linked into qemud, not libvirt.
Author: John Levon
2009-01-05 14:10:40 +00:00
Jim Meyering
b0119de82f
migrate linux-specific symbol names into their own sym file
...
* configure.in (WITH_LINUX): New automake conditional.
* src/Makefile.am (PRIVSYMFILES) [WITH_LINUX]: Append libvirt_linux.syms.
* src/libvirt_private.syms: Move two symbol names into...
* src/libvirt_linux.syms: ...this new file.
Author: John Levon
2009-01-05 14:08:26 +00:00
Jim Meyering
83dfc25c02
Move bridge symbols into a separate syms file
...
* configure.in: Provide a new --with-bridge option.
* src/Makefile.am (PRIVSYMFILES) [WITH_BRIDGE]: Append libvirt_bridge.syms.
* src/bridge.c: Test WITH_BRIDGE rather than particular drivers.
* src/libvirt_private.syms: Move bridge-related symbols into...
* src/libvirt_bridge.syms: ...this new file.
Author: John Levon
2009-01-05 14:07:31 +00:00
Jim Meyering
ea5775bf8e
Move --with-driver-modules symbols into a separate sym file
...
* src/Makefile.am (PRIVSYMFILES): Append libvirt_driver_modules.syms.
* src/libvirt_private.syms: Move virDriverLoadModule into...
* src/libvirt_driver_modules.syms: ... this new file.
Author: John Levon
2009-01-05 14:06:41 +00:00
Jim Meyering
ad17ffa034
split version script into multiple files
...
* src/Makefile.am (PRIVSYMFILES): Define.
(EXTRA_DIST): Append $(PRIVSYMFILES).
(libvirt.syms): New rule.
Reflect renaming: s/libvirt_sym.version/libvirt.syms/.
(BUILT_SOURCES): Depend on libvirt.syms.
* configure.in: Define ENABLE_DEBUG as an automake conditional.
(AC_OUTPUT): Remove src/libvirt_sym.version.
* src/.cvsignore: s/libvirt_sym.version/libvirt.syms/.
* src/.gitignore: Regenerate.
* src/libvirt_public.syms: Renamed from src/libvirt_sym.version.in.
* src/libvirt_debug.syms: New file.
* src/libvirt_private.syms: New file.
Author: John Levon
2009-01-05 14:05:29 +00:00
Jim Meyering
8f06d6b103
avoid bogus descriptions due to use of gettext with the empty string
...
* src/virsh.c: Use `""', not `gettext_noop("")', in numerous
vshCmdInfo definitions. The latter provokes a warning from gettext.
2009-01-05 13:27:43 +00:00
Daniel P. Berrange
ca34b4d777
Fix numa build on F9, 32-bit
2009-01-05 12:56:36 +00:00
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