- 05 4月, 2010 1 次提交
-
-
由 Chris Lalancette 提交于
Signed-off-by: NChris Lalancette <clalance@redhat.com>
-
- 04 4月, 2010 1 次提交
-
-
由 Daniel Veillard 提交于
virDomainManagedSave() is to be run on a running domain. Once the call complete, as in virDomainSave() the domain is stopped upon completion, but there is no restore counterpart as any order to start the domain from the API would load the state from the managed file, similary if the domain is autostarted when libvirtd starts. Once a domain has restarted his managed save image is destroyed, basically managed save image can only exist for a stopped domain, for a running domain that would be by definition outdated data. * include/libvirt/libvirt.h.in src/libvirt.c src/libvirt_public.syms: adds the new entry points virDomainManagedSave(), virDomainHasManagedSaveImage() and virDomainManagedSaveRemove() * src/driver.h src/esx/esx_driver.c src/lxc/lxc_driver.c src/opennebula/one_driver.c src/openvz/openvz_driver.c src/phyp/phyp_driver.c src/qemu/qemu_driver.c src/vbox/vbox_tmpl.c src/remote/remote_driver.c src/test/test_driver.c src/uml/uml_driver.c src/xen/xen_driver.c: add corresponding new internal drivers entry points
-
- 01 4月, 2010 1 次提交
-
-
由 Matthias Bolte 提交于
virParseVersionString uses virStrToLong_ui instead of sscanf. This also fixes a bug in the UML driver, that always returned 0 as version number. Introduce STRSKIP to check if a string has a certain prefix and to skip this prefix.
-
- 27 3月, 2010 2 次提交
-
-
由 Jiri Denemark 提交于
When a domain is defined on host1, migrated to host2 and then migrated back to host1, its current configuration would overwrite the libvirtd's in-memory copy of persistent configuration of that domain. This is not desired as we want to preserve the persistent configuration untouched. This patch introduces new 'live' parameter to virDomainAssignDef. Passing 'true' for 'live' means the configuration passed to virDomainAssignDef describes a configuration of live instance of the domain. This applies for saved domains which are being restored or for incoming domains during migration. All callers have been changed to pass the appropriate value.
-
由 Stefan Berger 提交于
To find out where the net type 'direct' needs to be handled I introduced the 'enum virDomainNetType' in the virDomainNetDef structure and let the compiler tell me where the case statement is missing. Then I added the unhandled device statement to the UML driver. * src/conf/domain_conf.h: change _virDomainNetDef type from int to virDomainNetType enum * src/conf/domain_conf.c src/lxc/lxc_driver.c src/qemu/qemu_conf.c src/uml/uml_conf.c: make sure all enum cases are properly handled in switches
-
- 26 3月, 2010 2 次提交
-
-
由 Daniel P. Berrange 提交于
The current virDomainAttachDevice API can be (ab)used to change the media of an existing CDROM/Floppy device. Going forward there will be more devices that can be configured on the fly and overloading virDomainAttachDevice for this is not too pleasant. This patch adds a new virDomainUpdateDeviceFlags() explicitly just for modifying existing devices. * include/libvirt/libvirt.h.in: Add virDomainUpdateDeviceFlags * src/driver.h: Internal API for virDomainUpdateDeviceFlags * src/libvirt.c, src/libvirt_public.syms: Glue public API to driver API * src/esx/esx_driver.c, src/lxc/lxc_driver.c, src/opennebula/one_driver.c, src/openvz/openvz_driver.c, src/phyp/phyp_driver.c, src/qemu/qemu_driver.c, src/remote/remote_driver.c, src/test/test_driver.c, src/uml/uml_driver.c, src/vbox/vbox_tmpl.c, src/xen/xen_driver.c, src/xenapi/xenapi_driver.c: Add stubs for new driver entry point
-
由 Daniel P. Berrange 提交于
The current API for domain events has a number of problems - Only allows for domain lifecycle change events - Does not allow the same callback to be registered multiple times - Does not allow filtering of events to a specific domain This introduces a new more general purpose domain events API typedef enum { VIR_DOMAIN_EVENT_ID_LIFECYCLE = 0, /* virConnectDomainEventCallback */ ...more events later.. } int virConnectDomainEventRegisterAny(virConnectPtr conn, virDomainPtr dom, /* Optional, to filter */ int eventID, virConnectDomainEventGenericCallback cb, void *opaque, virFreeCallback freecb); int virConnectDomainEventDeregisterAny(virConnectPtr conn, int callbackID); Since different event types can received different data in the callback, the API is defined with a generic callback. Specific events will each have a custom signature for their callback. Thus when registering an event it is neccessary to cast the callback to the generic signature eg int myDomainEventCallback(virConnectPtr conn, virDomainPtr dom, int event, int detail, void *opaque) { ... } virConnectDomainEventRegisterAny(conn, NULL, VIR_DOMAIN_EVENT_ID_LIFECYCLE, VIR_DOMAIN_EVENT_CALLBACK(myDomainEventCallback) NULL, NULL); The VIR_DOMAIN_EVENT_CALLBACK() macro simply does a "bad" cast to the generic signature * include/libvirt/libvirt.h.in: Define new APIs for registering domain events * src/driver.h: Internal driver entry points for new events APIs * src/libvirt.c: Wire up public API to driver API for events APIs * src/libvirt_public.syms: Export new APIs * src/esx/esx_driver.c, src/lxc/lxc_driver.c, src/opennebula/one_driver.c, src/openvz/openvz_driver.c, src/phyp/phyp_driver.c, src/qemu/qemu_driver.c, src/remote/remote_driver.c, src/test/test_driver.c, src/uml/uml_driver.c, src/vbox/vbox_tmpl.c, src/xen/xen_driver.c, src/xenapi/xenapi_driver.c: Stub out new API entries
-
- 20 3月, 2010 1 次提交
-
-
由 Jiri Denemark 提交于
-
- 10 3月, 2010 1 次提交
-
-
由 Eric Blake 提交于
* global: patch created by running: for f in $(git ls-files '*.[ch]') ; do cppi $f > $f.t && mv $f.t $f done
-
- 08 3月, 2010 1 次提交
-
-
由 Eric Blake 提交于
Prior to this patch, there was an inconsistent mix between GNU and C99. For consistency, and potential portability to other compilers, stick with the C99 vararg macro syntax. * src/conf/cpu_conf.c (virCPUReportError): Use C99 rather than GNU vararg macro syntax. * src/conf/domain_conf.c (virDomainReportError): Likewise. * src/conf/domain_event.c (eventReportError): Likewise. * src/conf/interface_conf.c (virInterfaceReportError): Likewise. * src/conf/network_conf.c (virNetworkReportError): Likewise. * src/conf/node_device_conf.h (virNodeDeviceReportError): Likewise. * src/conf/secret_conf.h (virSecretReportError): Likewise. * src/conf/storage_conf.h (virStorageReportError): Likewise. * src/esx/esx_device_monitor.c (ESX_ERROR): Use C99 rather than GNU vararg macro syntax. * src/esx/esx_driver.c (ESX_ERROR): Likewise. * src/esx/esx_interface_driver.c (ESX_ERROR): Likewise. * src/esx/esx_network_driver.c (ESX_ERROR): Likewise. * src/esx/esx_secret_driver.c (ESX_ERROR): Likewise. * src/esx/esx_storage_driver.c (ESX_ERROR): Likewise. * src/esx/esx_util.c (ESX_ERROR): Likewise. * src/esx/esx_vi.c (ESX_VI_ERROR): Likewise. * src/esx/esx_vi_methods.c (ESX_VI_ERROR): Likewise. * src/esx/esx_vi_types.c (ESX_VI_ERROR): Likewise. * src/esx/esx_vmx.c (ESX_ERROR): Likewise. * src/util/hostusb.c (usbReportError): Use C99 rather than GNU vararg macro syntax. * src/util/json.c (virJSONError): Likewise. * src/util/macvtap.c (ReportError): Likewise. * src/util/pci.c (pciReportError): Likewise. * src/util/stats_linux.c (virStatsError): Likewise. * src/util/util.c (virUtilError): Likewise. * src/util/xml.c (virXMLError): Likewise. * src/xen/proxy_internal.c (virProxyError): Use C99 rather than GNU vararg macro syntax. * src/xen/sexpr.c (virSexprError): Likewise. * src/xen/xen_driver.c (xenUnifiedError): Likewise. * src/xen/xen_hypervisor.c (virXenError): Likewise. * src/xen/xen_inotify.c (virXenInotifyError): Likewise. * src/xen/xend_internal.c (virXendError): Likewise. * src/xen/xm_internal.c (xenXMError): Likewise. * src/xen/xs_internal.c (virXenStoreError): Likewise. * src/cpu/cpu.h (virCPUReportError): Use C99 rather than GNU vararg macro syntax. * src/datatypes.c (virLibConnError): Likewise. * src/interface/netcf_driver.c (interfaceReportError): Likewise. * src/libvirt.c (virLibStreamError): Likewise. * src/lxc/lxc_conf.h (lxcError): Likewise. * src/network/bridge_driver.c (networkReportError): Likewise. * src/nodeinfo.c (nodeReportError): Likewise. * src/opennebula/one_conf.h (oneError): Likewise. * src/openvz/openvz_conf.h (openvzError): Likewise. * src/phyp/phyp_driver.c (PHYP_ERROR): Likewise. * src/qemu/qemu_conf.h (qemuReportError): Likewise. * src/remote/remote_driver.c (errorf): Likewise. * src/security/security_driver.h (virSecurityReportError): Likewise. * src/test/test_driver.c (testError): Likewise. * src/uml/uml_conf.h (umlReportError): Likewise. * src/vbox/vbox_driver.c (vboxError): Likewise. * src/vbox/vbox_tmpl.c (vboxError): Likewise.
-
- 03 3月, 2010 3 次提交
-
-
由 Eric Blake 提交于
Coverity detected a potential dereference of uninitialized memory if recvfrom got cut short. * src/uml/uml_driver.c (umlMonitorCommand): Validate complete read prior to dereferencing res.
-
由 Daniel P. Berrange 提交于
This provides the internal glue for the driver API * src/driver.h: Internal API contract * src/libvirt.c, src/libvirt_public.syms: Connect public API to driver API * src/esx/esx_driver.c, src/lxc/lxc_driver.c, src/opennebula/one_driver.c, src/openvz/openvz_driver.c, src/phyp/phyp_driver.c, src/qemu/qemu_driver.c, src/remote/remote_driver.c, src/test/test_driver.c src/uml/uml_driver.c, src/vbox/vbox_tmpl.c, src/xen/xen_driver.c: Stub out entry points
-
由 Daniel P. Berrange 提交于
The internal glue layer for the new pubic API * src/driver.h: Define internal driver API contract * src/libvirt.c, src/libvirt_public.syms: Wire up public API to internal driver API * src/esx/esx_driver.c, src/lxc/lxc_driver.c, src/opennebula/one_driver.c, src/openvz/openvz_driver.c, src/phyp/phyp_driver.c, src/qemu/qemu_driver.c, src/remote/remote_driver.c, src/test/test_driver.c, src/uml/uml_driver.c, src/vbox/vbox_tmpl.c, src/xen/xen_driver.c: Stub new entry point
-
- 17 2月, 2010 1 次提交
-
-
由 Jim Meyering 提交于
* src/uml/uml_driver.c (umlMonitorCommand): This function would sometimes return -1, yet fail to free the "reply" it had allocated. Hence, no caller would know to free the corresponding argument. When returning -1, be sure to free all allocated resources.
-
- 12 2月, 2010 1 次提交
-
-
由 Jiri Denemark 提交于
-
- 10 2月, 2010 1 次提交
-
-
由 Daniel P. Berrange 提交于
-
- 09 2月, 2010 4 次提交
-
-
由 Matthias Bolte 提交于
It was used for error reporting only.
-
由 Matthias Bolte 提交于
-
由 Matthias Bolte 提交于
-
由 Jim Fehlig 提交于
Implementation of domain{Attach,Detach}DeviceFlags handlers in the drivers.
-
- 21 1月, 2010 1 次提交
-
-
由 Laine Stump 提交于
* src/lxc/lxc_container.c src/lxc/lxc_controller.c src/lxc/lxc_driver.c src/network/bridge_driver.c src/qemu/qemu_driver.c src/uml/uml_driver.c: virFileMakePath returns 0 for success, or the value of errno on failure, so error checking should be to test if non-zero, not if lower than 0
-
- 20 12月, 2009 1 次提交
-
-
由 Adam Litke 提交于
Set up the types for the domainMemoryStats function and insert it into the virDriver structure definition. Because of static initializers, update every driver and set the new field to NULL. * include/libvirt/libvirt.h.in: new API * src/driver.h src/*/*_driver.c src/vbox/vbox_tmpl.c: add the new entry to the driver structure * python/generator.py: fix compiler errors, the actual python binding is implemented later
-
- 18 12月, 2009 1 次提交
-
-
由 Jiri Denemark 提交于
* src/driver.h: add an extra entry point in the structure * src/esx/esx_driver.c src/lxc/lxc_driver.c src/opennebula/one_driver.c src/openvz/openvz_driver.c src/phyp/phyp_driver.c src/qemu/qemu_driver.c src/remote/remote_driver.c src/test/test_driver.c src/uml/uml_driver.c src/vbox/vbox_tmpl.c src/xen/xen_driver.c: add NULL entry points for all drivers
-
- 10 12月, 2009 1 次提交
-
-
由 Matthias Bolte 提交于
Replace free(virBufferContentAndReset()) with virBufferFreeAndReset(). Update documentation and replace all remaining calls to free() with calls to VIR_FREE(). Also add missing calls to virBufferFreeAndReset() and virReportOOMError() in OOM error cases.
-
- 08 12月, 2009 1 次提交
-
-
由 Daniel P. Berrange 提交于
* src/uml/uml_driver.c: Introduce umlDomainObjPrivateData for storing monitor device state. Remove unneccessary VIR_FREE on vcpupids
-
- 12 11月, 2009 1 次提交
-
-
由 Cole Robinson 提交于
There is currently no way to determine the libvirt version of a remote libvirtd we are connected to. This is a useful piece of data to enable feature detection.
-
- 11 11月, 2009 2 次提交
-
-
由 Daniel P. Berrange 提交于
This implements the virConnectIsSecure, virConnectIsEncrypted, virDomainIsPersistent, virDomainIsActive, virNetworkIsActive, virNetworkIsPersistent, virStoragePoolIsActive, virStoragePoolIsPersistent, virInterfaceIsActive APIs in (nearly) all drivers. Exceptions are: phyp: missing domainIsActive/Persistent esx: missing domainIsPersistent opennebula: missing domainIsActive/Persistent * src/remote/remote_protocol.x: Define remote wire ABI for newly added APIs. * daemon/remote_dispatch*.h: Re-generated from remote_protocol.x * src/esx/esx_driver.c, src/lxc/lxc_driver.c, src/network/bridge_driver.c, src/opennebula/one_driver.c, src/openvz/openvz_conf.c, src/openvz/openvz_driver.c, src/phyp/phyp_driver.c, src/remote/remote_driver.c, src/storage/storage_driver.c, src/test/test_driver.c, src/uml/uml_driver.c, src/vbox/vbox_tmpl.c, src/xen/xen_driver.c, src/xen/xen_driver.h, src/xen/xen_inotify.c, src/xen/xen_inotify.h: Implement all the new APIs where possible
-
由 Daniel P. Berrange 提交于
Introduce a number of new APIs to expose some boolean properties of objects, which cannot otherwise reliably determined, nor are aspects of the XML configuration. * virDomainIsActive: Checking virDomainGetID is not reliable since it is not possible to distinguish between error condition and inactive domain for ID of -1. * virDomainIsPersistent: Check whether a persistent config exists for the domain * virNetworkIsActive: Check whether the network is active * virNetworkIsPersistent: Check whether a persistent config exists for the network * virStoragePoolIsActive: Check whether the storage pool is active * virStoragePoolIsPersistent: Check whether a persistent config exists for the storage pool * virInterfaceIsActive: Check whether the host interface is active * virConnectIsSecure: whether the communication channel to the hypervisor is secure * virConnectIsEncrypted: whether any network based commnunication channels are encrypted NB, a channel can be secure, even if not encrypted, eg if it does not involve the network, like a UNIX socket, or pipe. * include/libvirt/libvirt.h.in: Define public API * src/driver.h: Define internal driver API * src/libvirt.c: Implement public API entry point * src/libvirt_public.syms: Export API symbols * src/esx/esx_driver.c, src/lxc/lxc_driver.c, src/interface/netcf_driver.c, src/network/bridge_driver.c, src/opennebula/one_driver.c, src/openvz/openvz_driver.c, src/phyp/phyp_driver.c, src/qemu/qemu_driver.c, src/remote/remote_driver.c, src/test/test_driver.c, src/uml/uml_driver.c, src/vbox/vbox_tmpl.c, src/xen/xen_driver.c: Stub out driver tables
-
- 06 11月, 2009 1 次提交
-
-
由 Cole Robinson 提交于
Use this function in the qemu, uml, lxc, and test drivers.
-
- 05 11月, 2009 1 次提交
-
-
由 Matthew Booth 提交于
A character device's target (it's interface in the guest) had only a single property: port. This patch is in preparation for adding targets which require other properties. Since this changes the conf type for character devices this affects a number of drivers: * src/conf/domain_conf.[ch] src/esx/esx_vmx.c src/qemu/qemu_conf.c src/qemu/qemu_driver.c src/uml/uml_conf.c src/uml/uml_driver.c src/vbox/vbox_tmpl.c src/xen/xend_internal.c src/xen/xm_internal.c: target properties are moved into a union in virDomainChrDef, and a targetType field is added to identify which union member should be used. All current code which touches a virDomainChrDef is updated both to use the new union field, and to populate targetType if necessary.
-
- 04 11月, 2009 1 次提交
-
-
由 Cole Robinson 提交于
All drivers have copy + pasted inadequate error reporting which wraps util.c:virGetHostname. Move all error reporting to this function, and improve what we report. Changes from v1: Drop the driver wrappers around virGetHostname. This means we still need to keep the new conn argument to virGetHostname, but I think it's worth it.
-
- 03 11月, 2009 3 次提交
-
-
由 Daniel P. Berrange 提交于
The LXC driver was mistakenly returning -1 for lxcStartup() in scenarios that are not an error. This caused the libvirtd to quit for unprivileged users. This fixes the return code of LXC driver, and also adds a "name" field to the virStateDriver struct and logging to make it easier to find these problems in the future * src/driver.h: Add a 'name' field to state driver to allow easy identification during failures * src/libvirt.c: Log name of failed driver for virStateInit failures * src/lxc/lxc_driver.c: Don't return a failure code for lxcStartup() if LXC is not available on this host, simply disable the driver. * src/network/bridge_driver.c, src/node_device/node_device_devkit.c, src/node_device/node_device_hal.c, src/opennebula/one_driver.c, src/qemu/qemu_driver.c, src/remote/remote_driver.c, src/secret/secret_driver.c, src/storage/storage_driver.c, src/uml/uml_driver.c, src/xen/xen_driver.c: Fill in name field in virStateDriver struct
-
由 Daniel P. Berrange 提交于
Rename virDomainIsActive to virDomainObjIsActive, and virInterfaceIsActive to virInterfaceObjIsActive and finally virNetworkIsActive to virNetworkObjIsActive. * src/conf/domain_conf.c, src/conf/domain_conf.h, src/conf/interface_conf.h, src/conf/network_conf.c, src/conf/network_conf.h, src/lxc/lxc_driver.c, src/network/bridge_driver.c, src/opennebula/one_driver.c, src/openvz/openvz_driver.c, src/qemu/qemu_driver.c, src/test/test_driver.c, src/uml/uml_driver.c: Update for renamed APIs.
-
由 Daniel P. Berrange 提交于
The virDomainObjPtr object stores state about a running domain. This object is shared across all drivers so it is not appropriate to include driver specific state here. This patch adds the ability to request a blob of private data per domain object instance. The driver must provide a allocator & deallocator for this purpose THis patch abuses the virCapabilitiesPtr structure for storing the allocator/deallocator callbacks, since it is already being abused for other internal things relating to parsing. This should be moved out into a separate object at some point. * src/conf/capabilities.h: Add privateDataAllocFunc and privateDataFreeFunc fields * src/conf/domain_conf.c: Invoke the driver allocators / deallocators when creating/freeing virDomainObjPtr instances. * src/conf/domain_conf.h: Pass virCapsPtr into virDomainAssignDef to allow access to the driver specific allocator function * src/lxc/lxc_driver.c, src/opennebula/one_driver.c, src/openvz/openvz_driver.c, src/qemu/qemu_driver.c, src/test/test_driver.c, src/uml/uml_driver.c: Update for change in virDomainAssignDef contract
-
- 29 10月, 2009 1 次提交
-
-
由 Daniel P. Berrange 提交于
The current virDomainObjListPtr object stores domain objects in an array. This means that to find a particular objects requires O(n) time, and more critically acquiring O(n) mutex locks. The new impl replaces the array with a virHashTable, keyed off UUID. Finding a object based on UUID is now O(1) time, and only requires a single mutex lock. Finding by name/id is unchanged in complexity. In changing this, all code which iterates over the array had to be updated to use a hash table iterator function callback. Several of the functions which were identically duplicating across all drivers were pulled into domain_conf.c * src/conf/domain_conf.h, src/conf/domain_conf.c: Change virDomainObjListPtr to use virHashTable. Add a initializer method virDomainObjListInit, and rename virDomainObjListFree to virDomainObjListDeinit, since its not actually freeing the container, only its contents. Also add some convenient methods virDomainObjListGetInactiveNames, virDomainObjListGetActiveIDs and virDomainObjListNumOfDomains which can be used to implement the correspondingly named public API entry points in drivers * src/libvirt_private.syms: Export new methods from domain_conf.h * src/lxc/lxc_driver.c, src/opennebula/one_driver.c, src/openvz/openvz_conf.c, src/openvz/openvz_driver.c, src/qemu/qemu_driver.c, src/test/test_driver.c, src/uml/uml_driver.c, src/vbox/vbox_tmpl.c: Update all code to deal with hash tables instead of arrays for domains
-
- 02 10月, 2009 1 次提交
-
-
由 Chris Lalancette 提交于
Implementation of tunnelled migration, using a Unix Domain Socket on the qemu backend. Note that this requires very new versions of qemu (0.10.7 at least) in order to get the appropriate bugfixes. Signed-off-by: NChris Lalancette <clalance@redhat.com>
-
- 23 9月, 2009 1 次提交
-
-
由 Chris Lalancette 提交于
Add the virStrncpy function, which takes a dst string, source string, the number of bytes to copy and the number of bytes available in the dest string. If the source string is too large to fit into the destination string, including the \0 byte, then no data is copied and the function returns NULL. Otherwise, this function copies n bytes from source into dst, including the \0, and returns a pointer to the dst string. This function is intended to replace all unsafe uses of strncpy in the code base, since strncpy does *not* guarantee that the buffer terminates with a \0. Signed-off-by: NChris Lalancette <clalance@redhat.com>
-
- 22 9月, 2009 1 次提交
-
-
由 Chris Lalancette 提交于
Signed-off-by: NChris Lalancette <clalance@redhat.com>
-
- 21 9月, 2009 1 次提交
-
-
由 Daniel P. Berrange 提交于
* src/uml_conf.c, src/uml_conf.h, src/uml_driver.c, src/uml_driver.h: Move to src/uml/ * daemon/qemud.c, src/Makefile.am: Adjust for changed paths
-