Migration just seems to go from bad to worse. We already had to
introduce a second migration protocol when adding the QEMU driver,
since the one from Xen was insufficiently flexible to cope with
passing the data the QEMU driver required.
It turns out that this protocol still has some flaws that we
need to address. The current sequence is
* Src: DumpXML
- Generate XML to pass to dst
* Dst: Prepare
- Get ready to accept incoming VM
- Generate optional cookie to pass to src
* Src: Perform
- Start migration and wait for send completion
- Kill off VM if successful, resume if failed
* Dst: Finish
- Wait for recv completion and check status
- Kill off VM if unsuccessful
The problems with this are:
- Since the first step is a generic 'DumpXML' call, we can't
add in other migration specific data. eg, we can't include
any VM lease data from lock manager plugins
- Since the first step is a generic 'DumpXML' call, we can't
emit any 'migration begin' event on the source, or have
any hook that runs right at the start of the process
- Since there is no final step on the source, if the Finish
method fails to receive all migration data & has to kill
the VM, then there's no way to resume the original VM
on the source
This patch attempts to introduce a version 3 that uses the
improved 5 step sequence
* Src: Begin
- Generate XML to pass to dst
- Generate optional cookie to pass to dst
* Dst: Prepare
- Get ready to accept incoming VM
- Generate optional cookie to pass to src
* Src: Perform
- Start migration and wait for send completion
- Generate optional cookie to pass to dst
* Dst: Finish
- Wait for recv completion and check status
- Kill off VM if failed, resume if success
- Generate optional cookie to pass to src
* Src: Confirm
- Kill off VM if success, resume if failed
The API is designed to allow both input and output cookies
in all methods where applicable. This lets us pass around
arbitrary extra driver specific data between src & dst during
migration. Combined with the extra 'Begin' method this lets
us pass lease information from source to dst at the start of
migration
Moving the killing of the source VM out of Perform and
into Confirm, means we can now recover if the dst host
can't successfully Finish receiving migration data.
Fix some driver names:
s/virDrvCPUCompare/virDrvCompareCPU/
s/virDrvCPUBaseline/virDrvBaselineCPU/
s/virDrvQemuDomainMonitorCommand/virDrvDomainQemuMonitorCommand/
s/virDrvSecretNumOfSecrets/virDrvNumOfSecrets/
s/virDrvSecretListSecrets/virDrvListSecrets/
And some driver struct field names:
s/getFreeMemory/nodeGetFreeMemory/
The public API and RPC over-the-wire format have no flags argument,
so neither should the internal callback API. This simplifies the
RPC generator.
* src/driver.h (virDrvNWFilterDefineXML): Drop argument that does
not match public API.
* src/nwfilter/nwfilter_driver.c (nwfilterDefine): Likewise.
* src/libvirt.c (virNWFilterDefineXML): Likewise.
* daemon/remote_generator.pl: Drop special case.
This matches the public API and helps to get rid of some special
case code in the remote generator.
Rename driver API functions and XDR protocol structs.
No functional change included outside of the remote generator.
New APIs are added allowing streaming of content to/from
storage volumes.
* include/libvirt/libvirt.h.in: Add virStorageVolUpload and
virStorageVolDownload APIs
* src/driver.h, src/libvirt.c, src/libvirt_public.syms: Stub
code for new APIs
* src/storage/storage_driver.c, src/esx/esx_storage_driver.c:
Add dummy entries in driver table for new APIs
It is possible to set a migration speed limit when starting
migration. This new API allows the speed limit to be changed
on the fly to adjust to changing conditions
* src/driver.h, src/libvirt.c, src/libvirt_public.syms,
include/libvirt/libvirt.h.in: Add virDomainMigrateSetMaxSpeed
* 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/vmware/vmware_driver.c, src/xen/xen_driver.c,
src/libxl/libxl_driver.c: Stub new API
Add a new xen driver based on libxenlight [1], which is the primary
toolstack starting with Xen 4.1.0. The driver is stateful and runs
privileged only.
Like the existing xen-unified driver, the libxenlight driver is
accessed with xen:// URI. Driver selection is based on the status
of xend. If xend is running, the libxenlight driver will not load
and xen:// connections are handled by xen-unified. If xend is not
running *and* the libxenlight driver is available, xen://
connections are deferred to the libxenlight driver.
V6:
- Address several code style issues noted by Daniel Veillard
- Make drive work with xen:/// URI
- Hold domain object reference while domain is injected in
libvirt event loop. Race found and fixed by Markus Groß.
V5:
- Ensure events are unregistered when domain private data
is destroyed. Discovered and fixed by Markus Groß.
V4:
- Handle restart of libvirtd, reconnecting to previously
started domains
- Rebased to current master
- Tested against Xen 4.1 RC7-pre (c/s 22961:c5d121fd35c0)
V3:
- Reserve vnc port within driver when autoport=yes
V2:
- Update to Xen 4.1 RC6-pre (c/s 22940:5a4710640f81)
- Rebased to current master
- Plug memory leaks found by Stefano Stabellini and valgrind
- Handle SHUTDOWN_crash domain death event
[1] http://lists.xensource.com/archives/html/xen-devel/2009-11/msg00436.html
This patch introduces a new libvirt API (virDomainSetMemoryFlags) and
a flag (virDomainMemoryModFlags).
Signed-off-by: Taku Izumi <izumi.taku@jp.fujitsu.com>
The public object is called NWFilter but the corresponding private
object is called NWFilterPool. I don't see compelling reasons for this
Pool suffix. One might argue that an NWFilter is a "pool" of rules, etc.
Remove the Pool suffix from NWFilterPool. No functional change included.
virDrvSupportsFeature API is allowed to return -1 on error while all but
one uses of VIR_DRV_SUPPORTS_FEATURE only check for (non)zero return
value. Let's make this macro return zero on error, which is what
everyone expects anyway.
To enable virsh console (or equivalent) to be used remotely
it is necessary to provide remote access to the /dev/pts/XXX
pseudo-TTY associated with the console/serial/parallel device
in the guest. The virStream API provide a bi-directional I/O
stream capability that can be used for this purpose. This
patch thus introduces a virDomainOpenConsole API that uses
the stream APIs.
* src/libvirt.c, src/libvirt_public.syms,
include/libvirt/libvirt.h.in, src/driver.h: Define the
new virDomainOpenConsole 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: Stub
API entry point
Public api to set/get memory tunables supported by the hypervisors.
dv:
* some cleanups in libvirt.c
* adding extra checks in libvirt.c new entry points
v4:
* Move exporting public API to this patch
* Add unsigned int flags to the public api for future extensions
v3:
* Add domainGetMemoryParamters and NULL in all the driver interface
v2:
* Initialize domainSetMemoryParameters to NULL in all the driver
interface structure.
Add the library entry point for the new virDomainQemuMonitorCommand()
entry point. Because this is not part of the "normal" libvirt API,
it gets its own header file, library file, and will eventually
get its own over-the-wire protocol later in the series.
Changes since v1:
- Go back to using the virDriver table for qemuDomainMonitorCommand, due to
linking issues
- Added versioning information to the libvirt-qemu.so
Changes since v2:
- None
Changes since v3:
- Add LGPL header to libvirt-qemu.c
- Make virLibConnError and virLibDomainError macros instead of function calls
Changes since v4:
- Move exported symbols to libvirt_qemu.syms
Signed-off-by: Chris Lalancette <clalance@redhat.com>
This defines the internal driver API and stubs out each driver
* src/driver.h: Define virDrvDomainGetBlockInfo signature
* src/libvirt.c, src/libvirt_public.syms: Glue public API to drivers
* 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/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 driver
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
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
This wires up the remote driver to handle the new events APIs.
The public API allows an application to request a callback filters
events to a specific domain object, and register multiple callbacks
for the same event type. On the wire there are two strategies for
this
- Register multiple callbacks with the remote daemon, each
with filtering as needed
- Register only one callback per event type, with no filtering
Both approaches have potential inefficiency. In the first scheme,
the same event gets sent over the wire many times if multiple
callbacks are registered. With the second scheme, unneccessary
events get sent over the wire if a per-domain filter is set on
the client. The second scheme is far easier to implement though,
so this patch takes that approach.
* daemon/dispatch.h: Don't export remoteRelayDomainEvent since it
is no longer needed for unregistering callbacks, instead the
unique callback ID is used
* daemon/libvirtd.c, daemon/libvirtd.h: Track and unregister
callbacks based on callback ID, instead of function pointer
* daemon/remote.c: Switch over to using virConnectDomainEventRegisterAny
instead of legacy virConnectDomainEventRegister function. Refactor
remoteDispatchDomainEventSend() to cope with arbitrary event types
* src/driver.h, src/driver.c: Move verify() call into source file
instead of header, to avoid polluting the global namespace with
the verify function name
* src/remote/remote_driver.c: Implement new APIs for event
registration. Refactor processCallDispatchMessage() to cope
with arbitrary incoming event types. Merge remoteDomainQueueEvent()
into processCallDispatchMessage() to avoid duplication of code.
Rename remoteDomainReadEvent() to remoteDomainReadEventLifecycle()
* src/remote/remote_protocol.x: Define wire format for the new
virConnectDomainEventRegisterAny and virConnectDomainEventDeregisterAny
functions
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
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
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
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
* 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
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.
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
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
Since virMigratePrepareTunnel() is used for migration over the
native libvirt connection, there is never any need to pass the
target URI to this method.
* daemon/remote.c, src/driver.h, src/libvirt.c, src/libvirt_internal.h,
src/qemu/qemu_driver.c, src/remote/remote_driver.c,
src/remote/remote_protocol.c, src/remote/remote_protocol.h,
src/remote/remote_protocol.x: Remove 'uri_in' parameter from
virMigratePrepareTunnel() method
Move the VIR_DRV_FEATURE* constants into libvirt_internal.h
since these flags are indicating whether APIs in the
libvirt_internal.h file are supported by a driver
* src/driver.h: Remove VIR_DRV_FEATURE* constants
* src/libvirt_internal.h: Add VIR_DRV_FEATURE* constants, using
an enum instead of #define
* src/internal.h: pull in libvirt_internal.h
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: Chris Lalancette <clalance@redhat.com>
* include/libvirt/libvirt.h.in: Public API contract for
virStreamPtr object
* src/libvirt_public.syms: Export data stream APIs
* src/libvirt_private.syms: Export internal helper APIs
* src/libvirt.c: Data stream API driver dispatch
* src/datatypes.h, src/datatypes.c: Internal helpers for virStreamPtr
object
* src/driver.h: Define internal driver API for streams
* .x-sc_avoid_write: Ignore src/libvirt.c because it trips
up on comments including write()
* python/Makefile.am: Add libvirt-override-virStream.py
* python/generator.py: Add rules for virStreamPtr class
* python/typewrappers.h, python/typewrappers.c: Wrapper
for virStreamPtr
* docs/libvirt-api.xml, docs/libvirt-refs.xml: Regenerate
with new APIs
* include/libvirt/libvirt.h, include/libvirt/libvirt.h.in: Add
virSecretGetUsageType, virSecretGetUsageID and virLookupSecretByUsage
* python/generator.py: Mark virSecretGetUsageType, virSecretGetUsageID
as not throwing exceptions
* qemud/remote.c: Implement dispatch for virLookupSecretByUsage
* qemud/remote_protocol.x: Add usage type & ID as attributes of
remote_nonnull_secret. Add RPC calls for new public APIs
* qemud/remote_dispatch_args.h, qemud/remote_dispatch_prototypes.h,
qemud/remote_dispatch_ret.h, qemud/remote_dispatch_table.h,
qemud/remote_protocol.c, qemud/remote_protocol.h: Re-generate
* src/datatypes.c, src/datatypes.h: Add usageType and usageID as
properties of virSecretPtr
* src/driver.h: Add virLookupSecretByUsage driver entry point
* src/libvirt.c: Implement virSecretGetUsageType, virSecretGetUsageID
and virLookupSecretByUsage
* src/libvirt_public.syms: Export virSecretGetUsageType, virSecretGetUsageID
and virLookupSecretByUsage
* src/remote_internal.c: Implement virLookupSecretByUsage entry
* src/secret_conf.c, src/secret_conf.h: Remove the
virSecretUsageType enum, now in public API. Make volume
path mandatory when parsing XML
* src/secret_driver.c: Enforce usage uniqueness when defining secrets.
Implement virSecretLookupByUsage api method
* src/virsh.c: Include usage for secret-list command
Convert all the secret/storage encryption APIs / wire format to
handle UUIDs in raw format instead of non-canonical printable
format. Guarentees data format correctness.
* docs/schemas/storageencryption.rng: Make UUID mandatory for a secret
and validate fully
* docs/schemas/secret.rng: Fully validate UUID
* include/libvirt/libvirt.h, include/libvirt/libvirt.h.in, Add
virSecretLookupByUUID and virSecretGetUUID. Make
virSecretGetUUIDString follow normal API design pattern
* python/generator.py: Skip generation of virSecretGetUUID,
virSecretGetUUIDString and virSecretLookupByUUID
* python/libvir.c, python/libvirt-python-api.xml: Manual impl
of virSecretGetUUID,virSecretGetUUIDString and virSecretLookupByUUID
* qemud/remote.c: s/virSecretLookupByUUIDString/virSecretLookupByUUID/
Fix get_nonnull_secret/make_nonnull_secret to use unsigned char
* qemud/remote_protocol.x: Fix remote_nonnull_secret to use a
remote_uuid instead of remote_nonnull_string for UUID field.
Rename REMOTE_PROC_SECRET_LOOKUP_BY_UUID_STRING to
REMOTE_PROC_SECRET_LOOKUP_BY_UUID_STRING and make it take an
remote_uuid value
* qemud/remote_dispatch_args.h, qemud/remote_dispatch_prototypes.h,
qemud/remote_dispatch_ret.h, qemud/remote_dispatch_table.h,
qemud/remote_protocol.c, qemud/remote_protocol.h: Re-generate
* src/datatypes.h, src/datatypes.c: Store UUID in raw format instead
of printable. Change virGetSecret to use raw format UUID
* src/driver.h: Rename virDrvSecretLookupByUUIDString to
virDrvSecretLookupByUUID and use raw format UUID
* src/libvirt.c: Add virSecretLookupByUUID and virSecretGetUUID
and re-implement virSecretLookupByUUIDString and
virSecretGetUUIDString in terms of those
* src/libvirt_public.syms: Add virSecretLookupByUUID and
virSecretGetUUID
* src/remote_internal.c: Rename remoteSecretLookupByUUIDString
to remoteSecretLookupByUUID. Fix typo in args for
remoteSecretDefineXML impl. Use raw UUID format for
get_nonnull_secret and make_nonnull_secret
* src/storage_encryption_conf.c, src/storage_encryption_conf.h:
Storage UUID in raw format, and require it to be present in
XML. Use UUID parser to validate.
* secret_conf.h, secret_conf.c: Generate a UUID if none is provided.
Storage UUID in raw format.
* src/secret_driver.c: Adjust to deal with raw UUIDs. Save secrets
in a filed with printable UUID, instead of base64 UUID.
* src/virsh.c: Adjust for changed public API contract of
virSecretGetUUIDString.
* src/storage_Backend.c: DOn't undefine secret we just generated
upon successful volume creation. Fix to handle raw UUIDs. Generate
a non-clashing UUID
* src/qemu_driver.c: Change to use lookupByUUID instead of
lookupByUUIDString
Add a VIR_SECRET_GET_VALUE_INTERNAL_CALL flag value, replacing the
originally separate libvirt_internal_call parameter. The flag is used
to differentiate external virSecretGetValue() calls from internal calls
by libvirt drivers that need to use the secret even if it is private.
* src/libvirt_internal.h Remove VIR_DOMAIN_XML_FLAGS_MASK
* src/driver.h Add VIR_SECRET_GET_VALUE_FLAGS_MASK constant and
VIR_SECRET_GET_VALUE_INTERNAL_CALL. Re-add the
VIR_DOMAIN_XML_FLAGS_MASK constant
* src/libvirt.c (virSecretGetValue): Don't allow the user to specify
internal flags.
* include/libvirt/virterror.h, src/virterror.c: Add VIR_WAR_NO_SECRET
* src/libvirt_private.syms, src/datatypes.h, src/datatypes.c: Type
virSecret struct definition and helper APIs
* src/driver.h: Sub-driver API definitions for secrets
* src/libvirt.c: Define new sub-driver for secrets
Features supported:
- Connects to HMC/VIOS or IVM systems.
- Life cycle commands (resume and shutdown).
- dumpxml
- 'list' and 'list --all'
What is being implemented:
- better and centralized control for UUID
- definexml
- CPU management commands
* src/domain_conf.c src/domain_conf.h: first version of the driver
* configure.in src/Makefile.am include/libvirt/virterror.h
src/domain_conf.[ch] src/libvirt.c src/virterror.c: glue the driver
in the general framework
* src/esx/esx_*.[ch]: the driver, uses a remote minimal SOAP client
to talk to the VI services on ESX nodes.
* configure.in include/libvirt/virterror.h src/Makefile.am src/driver.h
src/libvirt.c src/virterror.c: glue in the new driver
* src/driver.h: add new driver functions virDrvNumOfDefinedInterfaces
and virDrvListDefinedInterfaces
* src/libvirt.c: implements the entry points, calling new driver
functions
* qemud/remote.c qemud/remote_dispatch_args.h qemud/remote_protocol.[chx]
qemud/remote_dispatch_prototypes.h qemud/remote_dispatch_ret.h
qemud/remote_dispatch_table.h src/remote_internal.c: implement the
client/server side of the RPC
* src/opennebula/one_conf.[ch] src/opennebula/one_driver.[ch]:
the OpenNebula driver
* configure.in include/libvirt/virterror.h qemud/Makefile.am
qemud/qemud.c src/Makefile.am src/domain_conf.[ch] src/driver.h
src/libvirt.c src/virterror.c: integration of the OpenNebula
driver in the libvirt infrastructure
* AUTHORS: add Abel Miguez Rodriguez
daniel
* configure.in include/libvirt/virterror.h src/Makefile.am
src/domain_conf.[ch] src/driver.h src/virterror.c src/vbox/README
src/vbox/vbox_CAPI_v2_2.h src/vbox/vbox_V2_2.c
src/vbox/vbox_XPCOMCGlue.[ch] src/vbox/vbox_driver.[ch]
src/vbox/vbox_tmpl.c: integration of the VirtualBox support
patches by Pritesh Kothari
Daniel
* include/libvirt/libvirt.h include/libvirt/libvirt.h.in
src/driver.h src/libvirt.c src/libvirt_public.syms
src/lxc_driver.c src/openvz_driver.c src/qemu_driver.c
src/test.c src/uml_driver.c: add the public APIs for
virNodeDeviceDettach virNodeDeviceReAttach and virNodeDeviceReset
and extends the driver structure accordingly.
Daniel
* 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
* 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
* include/libvirt/libvirt.h.in, src/libvirt.c, src/driver.h,
src/libvirt_sym.version: New virDomainMemoryPeek API.
* qemud/remote.c, qemud/remote_protocol.x, src/remote_internal.c:
Support for remote.
* src/qemu_driver.c: QEMU driver implementation of API.
* src/test.c: Test driver (null) implementation of API.
* docs/hvsupport.html.in: Document API.
* libvirt.spec.in: New path /var/cache/libvirt for temporary
storage of memory images.
* qemud/libvirtd.init.in: Remove any old temp files in
/var/cache/libvirt on restarts.
* src/Makefile.am: make install creates /var/cache/libvirt.
* configure.in: Detect mkdir -p.
* configure.in: Document AC_SYS_LARGEFILE.
* docs/hvsupport.html.in: Document HV support for virDomainBlockPeek.
* include/libvirt/libvirt.h.in, src/driver.h, src/libvirt.c,
src/libvirt_sym.version: Add virDomainBlockPeek infrastructure.
* src/qemu_driver.c, src/test.c: Null versions of this call.
* src/xen_unified.c, src/xend_internal.c, src/xend_internal.h,
src/xm_internal.c, src/xm_internal.h: Xen implementation.
* tests/sexpr2xmldata/sexpr2xml-curmem.xml,
tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml: XML output
has been reordered slightly in the Xen driver, but should be
functionally the same.
Mon May 12 23:32:21 PST 2008 David L. Leskovec <dlesko@linux.vnet.ibm.com>
* qemud/qemud.c: get siginfo with signals, distribute to drivers that
register a handler
* src/driver.h: add sighandler function to state driver table
* src/internal.h: define virStateSigDispatcher functions
* src/libvirt.c: add __virStateSigDispatcher function
* src/libvirt_sym.version: add __virStateSigDispatcher
* src/lxc_driver.c: add sig handler function, cleanup vm when sigchld
received from container process
* src/qemu_driver.c: NULL for sig handler (no handler) in state driver
* src/remote_internal.c: NULL for sig handler (no handler) in state driver
* src/storage_driver.c: NULL for sig handler (no handler) in state driver
Done using this command (also includes .c.in and .h.in files):
for i in $(g ls-files|grep -E '\.[ch](\.in)?$'|grep -v gnulib); do
expand -i $i > j && mv j $i;done
* configure.in include/libvirt/virterror.h src/Makefile.am
src/driver.h src/lxc_conf.[ch] src/lxc_driver.[ch] src/virterror.c:
Applied 3 patches from Dave Leskovec for intial support of
Linux containers, configured off by default, work in progress.
* src/libvirt.c: improve virDomainCreateLinux xmlDesc description
Daniel
src/remote_internal.c src/test.c src/util.c src/util.h
src/xen_unified.c: added probe interface at the driver level,
use that to improve default hypervisor selection in the absence
of a given URI when connecting
Daniel
src/driver.h src/libvirt.c src/openvz_driver.c src/qemu_driver.c
src/test.c src/xen_unified.c src/xend_internal.c: add new API
virNodeGetFreeMemory(), extends the driver. Lacks remote and
QEmu support though.
* src/libvirt.c: allows to fix virNodeGetCellsFreeMemory() adding
parameter check for startCell.
* proxy/libvirt_proxy.c src/xend_internal.[ch]
include/libvirt/libvirt.h include/libvirt/libvirt.h.in: applied
vncpasswd dump patch from Mark Johnson but with the
virDomainXMLFlags extension as suggested by Daniel Berrange
this changed a couple of internal APIs too
* tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml: fix one of the
tests affected by bootloader dump change.
Daniel
src/qemu_driver.c src/remote_internal.c src/test.c
src/xen_internal.[ch] src/xen_unified.c src/xend_internal.[ch]
src/libvirt.c src/libvirt_sym.version: adding NUMA support patches
from Beth Kon adding new virNodeGetCellsFreeMemory entry point
and extending the virConnectGetCapabilities one. Fix a couple of
issues in the patch and add to exported symbols from shared lib.
* docs/virsh.pod docs/virsh.1 src/virsh.c: added new command
freecell to get the available memory on the node or in a NUMA cell.
* docs/*: updated and regenerated the documentation
Daniel
* src/libvirt.c (virDomainMigrate): Added virDomainMigrate
API call.
* src/xend_internal.c, src/xen_unified.c: Support for migration
of Xen domains.
* src/xen_internal.c: Xen capabilities indicates level of
support for migration.
* qemud/remote.c, qemud/remote_protocol.x, src/remote_internal.c:
Support for migration between remote hypervisors.
* src/virsh.c: Added 'virsh migrate' command.
* docs/libvir.html, docs/hvsupport.html: Updated hvsupport
documentation.
* qemud/remote.c, qemud/remote_protocol.x, src/driver.h,
src/internal.h, src/libvirt.c, src/libvirt_sym.version,
src/qemu_driver.c, src/remote_internal.c, src/test.c:
Add a private interface so that libvirt.c coordination
functions can detect the availability of features in
underlying drivers, using the VIR_DRV_SUPPORTS_FEATURE
macro.
applied patch from Shuveb Hussain to plug the developping
OpenVZ support. Disabled by default.
* src/openvz_conf.[ch] src/openvz_driver.[ch]: added new
OpenVZ driver files. Avoid a redefinition of readline().
Daniel
src/driver.h src/libvirt.c src/libvirt_sym.version
src/proxy_internal.c src/qemu_internal.c src/test.c
src/virsh.c src/xen_internal.c src/xen_internal.h src/xen_unified.c
src/xend_internal.c src/xm_internal.c src/xs_internal.c:
Applied patches from Atsushi SAKAI to add the scheduler API,
with patch from Rich Jones for error handing, and a number
of cleanups and more error checking from me
Daniel
proxy/libvirt_proxy.c qemud/Makefile.am qemud/conf.c qemud/conf.h
qemud/dispatch.c qemud/internal.h qemud/protocol.h
src/driver.h src/internal.h src/libvirt.c src/libvirt_sym.version
src/proxy_internal.c src/proxy_internal.h src/qemu_internal.c
src/test.c src/virsh.c src/virterror.c src/xen_internal.c
src/xen_internal.h src/xend_internal.c src/xm_internal.c
src/xml.h src/xs_internal.c: applied patch from Richard Jones
adding virConnectGetCapabilities(), plus various small little
fixes
* docs/*: fixed the api extractor script and regenerated
Daniel
src/driver.h src/libvirt.c src/libvirt_sym.version
src/proxy_internal.c src/qemu_internal.c src/test.c src/virsh.c
src/xen_internal.c src/xen_internal.h src/xend_internal.c
src/xm_internal.c src/xs_internal.c: applied patch from
Masayuki Sunou to add and entry point to check the maximum
number of virtual CPU supported by a virtualization mechanism
* doc/*.html doc/libvirt-*.xml: regenerated the interfaces descriptions
and associated docs.
Daniel
* include/libvirt/libvirt.h.in, src/libvirt.c add
virDomainGetAutostart(), virDomainSetAutostart(),
virNetworkGetAutostart() and virNetworkSetAutostart().
* src/libvirt_sym.version: export the API
* src/driver.h: add methods to the driver vtables.
* src/proxy_internal.c, src/qemu_internal.c,
src/test.c, src/xen_internal.c, src/xend_internal.c,
src/xm_internal.c, src/xs_internal.c: set those
methods to NULL
* include/libvirt/libvirt.h.in, src/libvirt.c: add
virNetworkGetBridgeName() to allow finding out what
bridge to connect to in order to join a network.
* src/driver.h: add networkGetBridgeName() to vtable.
* qemud/protocol.h: add the request and reply to
the qemud protocol.
* qemud/dispatch.c, qemud/driver.[ch]: handle them
here.
* src/qemu_internal.c: implement GetBridgeName()
in the qemu driver.
* src/libvirt_sym.version: add new symbol.
* include/libvirt/libvirt.h.in: add the networks APIs
* include/libvirt/virterror.h: add some error codes
* src/driver.h: add network driver vtable
* src/hash.c: add networks hash
* src/internal.h: add virNetwork
* src/libvirt.c: hook up the APIs to the network
driver
* src/libvirt_sym.version: add the new APIs
* src/virterror.c: handle the new error codes
* include/libvirt/libvirt.h include/libvirt/libvirt.h.in src/driver.h
src/libvirt.c src/proxy_internal.c src/test.c src/virsh.c
src/xen_internal.c src/xend_internal.c src/xm_internal.c
src/xs_internal.c: added support for dumping core of domains
assuming a xend with the latest patch to do so.
Daniel
src/driver.h src/libvirt.c src/libvirt_sym.version
src/proxy_internal.c src/test.c src/xen_internal.c
src/xend_internal.c src/xml.c src/xml.h src/xs_internal.c:
intagrated patch from Michel Ponceau to add hot-plug devices
support to the API, integrated in driver API and fixed
a few small things. Still a TODO in src/xml.c about
moving xenstore direct accesses to a new routine.
Daniel
src/xen_internal.c src/xend_internal.c src/xend_internal.h
src/xml.c src/xs_internal.c: cleanups, force the new vCPU
and affinity entry point to go though the driver framework,
and fix a few warning showing up in my pedantic environment.
Daniel
src/Makefile.am: moved proxy/proxy.h and proxy/proxy_client.c as
proxy_internal.[ch] and integrated them as a new driver.
* proxy/Makefile.am proxy/libvirt_proxy.c src/xen_internal.c
src/xen_internal.h src/xend_internal.c: various related cleanups.
Daniel
include/libvirt/virterror.h python/generator.py python/libvir.c
python/libvirt_wrap.h src/driver.h src/internal.h src/test.h
src/virsh.c src/virterror.c src/xend_internal.c src/xend_internal.h
src/xml.c src/xml.h: moved the includes from include/ to
include/libvirt to reflect the installed include tree. This
avoid using "" in the includes themselves.
Daniel
src/xend_internal.c src/xs_internal.c: add driver numbers and
tweak a bit suspend/resume/destroy operation to avoid doing
them directly though the hypervisor if other succeeded first.
Daniel
* src/driver.h src/libvirt.c src/test.c src/xen_internal.c
src/xend_internal.c src/xs_internal.c: started to fix some of
the driver related problem raised by Daniel Berrange, added a
ver version field to drivers.
Daniel
virDomainSetMemory to set up the target memory use for a domain
* src/driver.h src/libvirt.c src/xen_internal.c src/xend_internal.[ch]
src/xs_internal.[ch]: added a new entry point in the drivers for this,
also fixed the xen store entry, as changing
/local/domain/$$/memory/target affects the target memory not the max,
apparently max is not visible at the xenstore level (or I missed it)
Daniel
src/libvirt_sym.version src/*_internal.[ch]: added an entry
point for reboot and corresponding driver plug
* src/virsh.c: added a reboot option using it
* docs/*: regenerated
Daniel
src/internal.h src/libvirt_sym.version src/xen_internal.c
src/xs_internal.c: added a new entry point to get node hardware
informations virGetNodeInfo, and associated driver hook.
* src/xend_internal.c: implemented the node and version information
hooks for the Xen Daemon
* python/libvir.c python/libvirt-python-api.xml python/generator.py:
also added Python bindings for the new call
Daniel
src/xen_internal.h docs/apibuild.py: starting the refactoring,
first the direct Xen hypervisor module. New header describing the
entry points of a driver.
Daniel