- 17 12月, 2010 5 次提交
-
-
由 Daniel P. Berrange 提交于
The QEMU driver file is far too large. Move all the hostdev helper code out into a separate file. No functional change. * src/qemu/qemu_hostdev.c, src/qemu/qemu_hostdev.h, src/Makefile.am: Add hostdev helper file * src/qemu/qemu_driver.c: Delete hostdev code
-
由 Daniel P. Berrange 提交于
The QEMU driver file is far too large. Move all the cgroup helper code out into a separate file. No functional change. * src/qemu/qemu_cgroup.c, src/qemu/qemu_cgroup.h, src/Makefile.am: Add cgroup helper file * src/qemu/qemu_driver.c: Delete cgroup code
-
由 Daniel P. Berrange 提交于
Move the code for handling the QEMU virDomainObjPtr private data, and custom XML namespace into a separate file * src/qemu/qemu_domain.c, src/qemu/qemu_domain.h: New file for private data & namespace code * src/qemu/qemu_driver.c, src/qemu/qemu_driver.h: Remove private data & namespace code * src/qemu/qemu_driver.h, src/qemu/qemu_command.h: Update includes * src/Makefile.am: Add src/qemu/qemu_domain.c
-
由 Daniel P. Berrange 提交于
The qemu_conf.c code is doing three jobs, driver config file loading, QEMU capabilities management and QEMU command line management. Move the command line code into its own file * src/qemu/qemu_command.c, src/qemu/qemu_command.h: New command line management code * src/qemu/qemu_conf.c, src/qemu/qemu_conf.h: Delete command line code * src/qemu/qemu_conf.h, src/qemu_conf.c: Adapt for API renames * src/Makefile.am: add src/qemu/qemu_command.c * src/qemu/qemu_monitor_json.c, src/qemu/qemu_monitor_text.c: Add import of qemu_command.h
-
由 Daniel P. Berrange 提交于
The qemu_conf.c code is doing three jobs, driver config file loading, QEMU capabilities management and QEMU command line management. Move the capabilities code into its own file * src/qemu/qemu_capabilities.c, src/qemu/qemu_capabilities.h: New capabilities management code * src/qemu/qemu_conf.c, src/qemu/qemu_conf.h: Delete capabilities code * src/qemu/qemu_conf.h: Adapt for API renames * src/Makefile.am: add src/qemu/qemu_capabilities.c
-
- 03 12月, 2010 1 次提交
-
-
由 Daniel P. Berrange 提交于
This introduces a new set of APIs in src/util/command.h to use for invoking commands. This is intended to replace all current usage of virRun and virExec variants, with a more flexible and less error prone API. * src/util/command.c: New file. * src/util/command.h: New header. * src/Makefile.am (UTIL_SOURCES): Build it. * src/libvirt_private.syms: Export symbols internally. * tests/commandtest.c: New test. * tests/Makefile.am (check_PROGRAMS): Run it. * tests/commandhelper.c: Auxiliary program. * tests/commanddata/test2.log - test15.log: New expected outputs. * cfg.mk (useless_free_options): Add virCommandFree. (msg_gen_function): Add virCommandError. * po/POTFILES.in: New translation. * .x-sc_avoid_write: Add exemption. * tests/.gitignore: Ignore new built file.
-
- 18 11月, 2010 1 次提交
-
-
由 Eric Blake 提交于
Per the gettext developer: http://lists.gnu.org/archive/html/bug-gnu-utils/2010-10/msg00019.html http://lists.gnu.org/archive/html/bug-gnu-utils/2010-10/msg00021.html gettext() doesn't work correctly on all platforms unless you have called setlocale(). Furthermore, gnulib's gettext.h has provisions for setting up a default locale, which is the preferred method for libraries to use gettext without having to call textdomain() and override the main program's default domain (virInitialize already calls bindtextdomain(), but this is insufficient without the setlocale() added in this patch; and a redundant bindtextdomain() in this patch doesn't hurt, but serves as a good example for other packages that need to bind a second translation domain). This patch is needed to silence a new gnulib 'make syntax-check' rule in the next patch. * daemon/libvirtd.c (main): Setup locale and gettext. * src/lxc/lxc_controller.c (main): Likewise. * src/security/virt-aa-helper.c (main): Likewise. * src/storage/parthelper.c (main): Likewise. * tools/virsh.c (main): Fix exit status. * src/internal.h (DEFAULT_TEXT_DOMAIN): Define, for gettext.h. (_): Simplify definition accordingly. * po/POTFILES.in: Add src/storage/parthelper.c.
-
- 12 11月, 2010 1 次提交
-
-
由 Daniel P. Berrange 提交于
To avoid the need for duplicating implementations of virStream drivers, provide a generic implementation that can handle any FD based stream. This code is copied from the existing impl in the QEMU driver, with the locking moved into the stream impl, and addition of a read callback The FD stream code will refuse to operate on regular files or block devices, since those can't report EAGAIN properly when they would block on I/O * include/libvirt/virterror.h, include/libvirt/virterror.h: Add VIR_FROM_STREAM error domain * src/qemu/qemu_driver.c: Remove code obsoleted by the new generic streams driver. * src/fdstream.h, src/fdstream.c, src/fdstream.c, src/libvirt_private.syms: Generic reusable FD based streams
-
- 09 11月, 2010 1 次提交
-
-
由 Matthias Bolte 提交于
Suggested by danpb, as it's not up-to-date anymore and lacks many functions that were added to libvirtd.
-
- 08 11月, 2010 1 次提交
-
-
由 Daniel Veillard 提交于
Move existing routines about virSysinfoDef to an util module, add a new entry point virSysinfoRead() to read the host values with dmidecode * src/conf/domain_conf.c src/conf/domain_conf.h src/util/sysinfo.c src/util/sysinfo.h: move to a new module, add virSysinfoRead() * src/Makefile.am: handle the new module build * src/libvirt_private.syms: new internal symbols * include/libvirt/virterror.h src/util/virterror.c: defined a new error code for that module * po/POTFILES.in: add new file for translations
-
- 29 10月, 2010 1 次提交
-
-
由 Matthias Bolte 提交于
This partly reverts df90ca76. Don't disable the VirtualBox driver when configure can't find VBoxXPCOMC.so, rely on detection at runtime again instead. Keep --with-vbox=/path/to/virtualbox intact, added to for: https://bugzilla.redhat.com/show_bug.cgi?id=609185 Detection order for VBoxXPCOMC.so: 1. VBOX_APP_HOME environment variable 2. configure provided location 3. hardcoded list of known locations 4. dynamic linker search path Also cleanup the glue code and improve error reporting.
-
- 22 10月, 2010 2 次提交
-
-
由 Daniel P. Berrange 提交于
Instead of storing the IP address string in virNetwork related structs, store the parsed virSocketAddr. This will make it easier to add IPv6 support in the future, by letting driver code directly check what address family is present * src/conf/network_conf.c, src/conf/network_conf.h, src/network/bridge_driver.c: Convert to use virSocketAddr in virNetwork, instead of char *. * src/util/bridge.c, src/util/bridge.h, src/util/dnsmasq.c, src/util/dnsmasq.h, src/util/iptables.c, src/util/iptables.h: Convert to take a virSocketAddr instead of char * for any IP address parameters * src/util/network.h: Add macros to determine if an address is set, and what address family is set.
-
由 Daniel P. Berrange 提交于
The getnameinfo() function is more flexible than inet_ntop() avoiding the need to if/else the code based on socket family. Also make it support UNIX socket addrs and allow inclusion of a port (service) address. Finally do proper error reporting via normal APIs. * src/conf/domain_conf.c, src/nwfilter/nwfilter_ebiptables_driver.c, src/qemu/qemu_conf.c: Fix error handling with virSocketFormat * src/util/network.c: Rewrite virSocketFormat to use getnameinfo and cope with UNIX socket addrs.
-
- 20 10月, 2010 1 次提交
-
-
由 Daniel P. Berrange 提交于
Integrate with libaudit.so for auditing of important operations. libvirtd gains a couple of config entries for auditing. By default it will enable auditing, if its enabled on the host. It can be configured to force exit if auditing is disabled on the host. It will can also send audit messages via libvirt internal logging API Places requiring audit reporting can use the VIR_AUDIT macro to report data. This is a no-op unless auditing is enabled * autobuild.sh, mingw32-libvirt.spec.in: Disable audit on mingw * configure.ac: Add check for libaudit * daemon/libvirtd.aug, daemon/libvirtd.conf, daemon/test_libvirtd.aug, daemon/libvirtd.c: Add config options to enable auditing * include/libvirt/virterror.h, src/util/virterror.c: Add VIR_FROM_AUDIT source * libvirt.spec.in: Enable audit * src/util/virtaudit.h, src/util/virtaudit.c: Simple internal API for auditing messages
-
- 30 7月, 2010 1 次提交
-
-
由 Ryota Ozaki 提交于
Previously, the functions in src/lxc/veth.c could sometimes return positive values on failure rather than -1. This made accurate error reporting difficult, and led to one failure to catch an error in a calling function. This patch makes all the functions in veth.c consistently return 0 on success, and -1 on failure. It also fixes up the callers to the veth.c functions where necessary. Note that this patch may be related to the bug: https://bugzilla.redhat.com/show_bug.cgi?id=607496. It will not fix the bug, but should unveil what happens. * po/POTFILES.in - add veth.c, which previously had no translatable strings * src/lxc/lxc_controller.c * src/lxc/lxc_container.c * src/lxc/lxc_driver.c - fixup callers to veth.c, and remove error logs, as they are now done in veth.c * src/lxc/veth.c - make all functions consistently return -1 on error. * src/lxc/veth.h - use ATTRIBUTE_NONNULL to protect against NULL args.
-
- 26 5月, 2010 2 次提交
-
-
由 Matthias Bolte 提交于
Allows listing existing pools and requesting information about them. Alter the esxVI_ProductVersion enum in a way that allows to check for product type by masking.
-
由 Daniel P. Berrange 提交于
Allow for a host UUID in the capabilities XML. Local drivers will initialize this from the SMBIOS data. If a sanity check shows SMBIOS uuid is invalid, allow an override from the libvirtd.conf configuration file * daemon/libvirtd.c, daemon/libvirtd.conf: Support a host_uuid configuration option * docs/schemas/capability.rng: Add optional host uuid field * src/conf/capabilities.c, src/conf/capabilities.h: Include host UUID in XML * src/libvirt_private.syms: Export new uuid.h functions * src/lxc/lxc_conf.c, src/qemu/qemu_driver.c, src/uml/uml_conf.c: Set host UUID in capabilities * src/util/uuid.c, src/util/uuid.h: Support for host UUIDs * src/node_device/node_device_udev.c: Use the host UUID functions * tests/confdata/libvirtd.conf, tests/confdata/libvirtd.out: Add new host_uuid config option to test
-
- 21 5月, 2010 1 次提交
-
-
由 Jim Meyering 提交于
* po/POTFILES.in: Add 3 files.
-
- 19 5月, 2010 1 次提交
-
-
由 Jim Meyering 提交于
* po/POTFILES.in: Remove src/util/logging.c and src/util/uuid.c. * src/phyp/phyp_driver.c (phypUUIDTable_ReadFile): Correct more VIR_WARN uses, now manually. (phypUUIDTable_Init, phypUUIDTable_Pull): Likewise.
-
- 26 4月, 2010 1 次提交
-
-
由 Satoru SATOH 提交于
* po/POTFILES.in: the new module contains translatable strings * src/Makefile.am: include the files in the utils set * src/libvirt_private.syms: exports the symbols internally
-
- 17 4月, 2010 1 次提交
-
-
由 Jiri Denemark 提交于
-
- 13 4月, 2010 1 次提交
-
-
由 Stefan Berger 提交于
Changes from v1 to v2: - changed function name prefixes to 'iface' from previous 'Iface' - Further to make make syntax-check pass: - indentation fix in interface.h - added entry to POTFILES.in I am consolidating network interface related functions used in nwfilter and macvtap code in utils/interface.c. All function names are prefixed with 'Iface'. The following functions are now available through interface.h: int ifaceCtrl(const char *name, bool up); int ifaceUp(const char *name); int ifaceDown(const char *name); int ifaceCheck(bool reportError, const char *ifname, const unsigned char *macaddr, int ifindex); int ifaceGetIndex(bool reportError, const char *ifname, int *ifindex); I added 'int ifindex' as parameter to ifaceCheck to the original function and modified the code accordingly.
-
- 08 4月, 2010 1 次提交
-
-
由 Daniel P. Berrange 提交于
* po/POTFILES.in: Add src/nwfilter/nwfilter_learnipaddr.c
-
- 07 4月, 2010 1 次提交
-
-
由 Matthias Bolte 提交于
Also define ESX_ERROR and ESX_VI_ERROR in a central place, instead of defining them in each source file. Add ESX_ERROR and ESX_VI_ERROR to the msg_gen_function list in cfg.mk. Update po/POTFILES.in accordingly.
-
- 31 3月, 2010 1 次提交
-
-
由 Jim Meyering 提交于
* cfg.mk (msg_gen_function): Add xenapiSessionErrorHandler. * po/POTFILES.in: Add src/xenapi/xenapi_driver.c * src/xenapi/xenapi_driver.c: Mark strings for translation. * src/xenapi/xenapi_utils.c (xenapiUtil_ParseQuery):
-
- 30 3月, 2010 1 次提交
-
-
由 Daniel Veillard 提交于
This exports 3 basic routines: - virHookInitialize() initializing the hook support by looking for scripts availability - virHookPresent() used to test if there is a hook for a given driver - virHookCall() which actually calls a synchronous script hook with the needed parameters Note that this doesn't expose any public API except for the locations and arguments passed to the scripts * src/Makefile.am: add the 2 new files * src/util/hooks.h src/util/hooks.c: implements the 3 functions * src/libvirt_private.syms: export the 3 symbols internally * po/POTFILES.in: add src/util/hooks.c to translatables modules
-
- 27 3月, 2010 2 次提交
-
-
由 Stefan Berger 提交于
This patch implements the core driver and provides - management functionality for managing the filter XMLs - compiling the internal filter representation into ebtables rules - applying ebtables rules on a network (tap,macvtap) interface - tearing down ebtables rules that were applied on behalf of an interface - updating of filters while VMs are running and causing the firewalls to be rebuilt - other bits and pieces Signed-off-by: NStefan Berger <stefanb@us.ibm.com>
-
由 Stefan Berger 提交于
This patch adds XML processing for the network filter schema and extends the domain XML processing to parse the top level referenced filter along with potentially provided parameters Signed-off-by: NStefan Berger <stefanb@us.ibm.com> Signed-off-by: NGerhard Stenzel <gerhard.stenzel@de.ibm.com>
-
- 17 3月, 2010 2 次提交
-
-
由 Matthias Bolte 提交于
-
由 Jim Meyering 提交于
* src/xenapi/xenapi_driver.c (xenapiOpen): Remove useless-if-before-free. * po/POTFILES.in: Add src/xenapi/xenapi_utils.c.
-
- 16 2月, 2010 1 次提交
-
-
由 Stefan Berger 提交于
This part adds the helper code to setup and tear down macvtap devices using direct communication with the device driver via netlink sockets. The rather short messages received from the netlink layer are now written into a dynamically allocated buffer * src/util/macvtap.h src/util/macvtap.c: provides the new module * po/POTFILES.in: the module contains translated strings
-
- 11 2月, 2010 1 次提交
-
-
由 Jiri Denemark 提交于
Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
- 09 2月, 2010 1 次提交
-
-
由 Matthias Bolte 提交于
It was used for error reporting only.
-
- 21 1月, 2010 1 次提交
-
-
由 Daniel P. Berrange 提交于
This new security driver is responsible for managing UID/GID changes to the QEMU process, and any files/disks/devices assigned to it. * qemu/qemu_conf.h: Add flag for disabling automatic file permission changes * qemu/qemu_security_dac.h, qemu/qemu_security_dac.c: New DAC driver for QEMU guests * Makefile.am: Add new files
-
- 14 1月, 2010 2 次提交
-
-
由 Cole Robinson 提交于
Based off how QEMU does it, look through /sys/bus/usb/devices/* for matching vendor:product info, and if found, use info from the surrounding files to build the device's /dev/bus/usb path. This fixes USB device assignment by vendor:product when running qemu as non-root (well, it should, but for some reason I couldn't reproduce the failure people are seeing in [1], but it appears to work properly) [1] https://bugzilla.redhat.com/show_bug.cgi?id=542450
-
由 Cole Robinson 提交于
-
- 18 12月, 2009 2 次提交
-
-
由 Jiri Denemark 提交于
Each driver supporting CPU selection must fill in host CPU capabilities. When filling them, drivers for hypervisors running on the same node as libvirtd can use cpuNodeData() to obtain raw CPU data. Other drivers, such as VMware, need to implement their own way of getting such data. Raw data can be decoded into virCPUDefPtr using cpuDecode() function. When implementing virConnectCompareCPU(), a hypervisor driver can just call cpuCompareXML() function with host CPU capabilities. For each guest for which a driver supports selecting CPU models, it must set the appropriate feature in guest's capabilities: virCapabilitiesAddGuestFeature(guest, "cpuselection", 1, 0) Actions needed when a domain is being created depend on whether the hypervisor understands raw CPU data (currently CPUID for i686, x86_64 architectures) or symbolic names has to be used. Typical use by hypervisors which prefer CPUID (such as VMware and Xen): - convert guest CPU configuration from domain's XML into a set of raw data structures each representing one of the feature policies: cpuEncode(conn, architecture, guest_cpu_config, &forced_data, &required_data, &optional_data, &disabled_data, &forbidden_data) - create a mask or whatever the hypervisor expects to see and pass it to the hypervisor Typical use by hypervisors with symbolic model names (such as QEMU): - get raw CPU data for a computed guest CPU: cpuGuestData(conn, host_cpu, guest_cpu_config, &data) - decode raw data into virCPUDefPtr with a possible restriction on allowed model names: cpuDecode(conn, guest, data, n_allowed_models, allowed_models) - pass guest->model and guest->features to the hypervisor * src/cpu/cpu.c src/cpu/cpu.h src/cpu/cpu_generic.c src/cpu/cpu_generic.h src/cpu/cpu_map.c src/cpu/cpu_map.h src/cpu/cpu_x86.c src/cpu/cpu_x86.h src/cpu/cpu_x86_data.h * configure.in: check for CPUID instruction * src/Makefile.am: glue the new files in * src/libvirt_private.syms: add new private symbols * po/POTFILES.in: add new cpu files containing translatable strings
-
由 Daniel Veillard 提交于
* po/POTFILES.in: adds src/conf/cpu_conf.c in teh set of files with translatable content * src/conf/cpu_conf.c: remove an unused include
-
- 11 12月, 2009 1 次提交
-
-
由 Daniel Veillard 提交于
-
- 08 12月, 2009 1 次提交
-
-
由 Daniel P. Berrange 提交于
Initial support for the new QEMU monitor protocol using JSON as the data encoding format instead of plain text * po/POTFILES.in: Add src/qemu/qemu_monitor_json.c * src/qemu/qemu_conf.c, src/qemu/qemu_conf.h: Hack to turn on QMP mode. Replace with a version number check on >= 0.12 later * src/qemu/qemu_monitor.c: Delegate to json monitor if enabled * src/qemu/qemu_monitor_json.c, src/qemu/qemu_monitor_json.h: Add impl of QMP protocol * src/Makefile.am: Add src/qemu/qemu_monitor_json.{c,h}
-