- 08 3月, 2012 1 次提交
-
-
由 Eric Blake 提交于
Yes, I like kilobytes better than kibibytes (when I say kilobytes, I generally mean 1024). But since the term is ambiguous, it can't hurt to say what we mean, by using both the correct name and calling out the numeric equivalent. * src/libvirt.c (virDomainGetMaxMemory, virDomainSetMaxMemory) (virDomainSetMemory, virDomainSetMemoryFlags) (virNodeGetFreeMemory): Tweak wording. * docs/formatdomain.html.in: Likewise. * docs/formatstorage.html.in: Likewise.
-
- 07 3月, 2012 1 次提交
-
-
由 Eric Blake 提交于
The RPC code assumed that the array returned by the driver would be fully populated; that is, ncpus on entry resulted in ncpus * return value on exit. However, while we don't support holes in the middle of ncpus, we do want to permit the case of ncpus on entry being longer than the array returned by the driver (that is, it should be safe for the caller to pass ncpus=128 on entry, and the driver will stop populating the array when it hits max_id). Additionally, a successful return implies that the caller will then use virTypedParamArrayClear on the entire array; for this to not free uninitialized memory, the driver must ensure that all skipped entries are explicitly zeroed (the RPC driver did this, but not the qemu driver). There are now three cases: server 0.9.10 and client 0.9.10 or newer: No impact - there were no hypervisor drivers that supported cpu stats server 0.9.11 or newer and client 0.9.10: if the client calls with ncpus beyond the max, then the rpc call will fail on the client side and disconnect the client, but the server is no worse for the wear server 0.9.11 or newer and client 0.9.11: the server can return a truncated array and the client will do just fine I reproduced the problem by using a host with 2 CPUs, and doing: virsh cpu-stats $dom --start 1 --count 2 * daemon/remote.c (remoteDispatchDomainGetCPUStats): Allow driver to omit tail of array. * src/remote/remote_driver.c (remoteDomainGetCPUStats): Accommodate driver that omits tail of array. * src/libvirt.c (virDomainGetCPUStats): Document this. * src/qemu/qemu_driver.c (qemuDomainGetPercpuStats): Clear all unpopulated entries.
-
- 06 3月, 2012 1 次提交
-
-
由 Eric Blake 提交于
Qemu supports sizing by bytes; we shouldn't force the user to round up if they really wanted an unaligned total size. * include/libvirt/libvirt.h.in (VIR_DOMAIN_BLOCK_RESIZE_BYTES): New flag. * src/libvirt.c (virDomainBlockResize): Document it. * src/qemu/qemu_monitor_json.c (qemuMonitorJSONBlockResize): Take size in bytes. * src/qemu/qemu_monitor_text.c (qemuMonitorTextBlockResize): Likewise. Pass bytes, not megabytes, to monitor. * src/qemu/qemu_driver.c (qemuDomainBlockResize): Implement new flag.
-
- 27 2月, 2012 2 次提交
-
-
由 Peter Krempa 提交于
This patch adds a set of flags to be used with the virDomainOpenConsole API call to specify if the user wishes to interrupt an existing console session or just to try open a new one. VIR_DOMAIN_CONSOLE_SAFE - specifies that the console connection should be opened only if the hypervisor supports mutually exclusive access to console devices VIR_DOMAIN_CONSOLE_FORCE - specifies that the caller wishes to interrupt existing session and force a creation of a new one.
-
由 Michal Privoznik 提交于
This API allows a domain which previously called virDomainPMSuspendForDuration() to be woken up.
-
- 25 2月, 2012 1 次提交
-
-
由 Martin Kletzander 提交于
Function xmlParseURI does not remove square brackets around IPv6 address when parsing. One of the solutions is making wrappers around functions working with xmlURI*. This assures that uri->server will be always properly assigned and it doesn't have to be changed when used on some new place in the code. For this purpose, functions virParseURI and virSaveURI were added. These function are wrappers around xmlParseURI and xmlSaveUri respectively. Also there is one new syntax check function to prohibit these functions anywhere else. File changes: - src/util/viruri.h -- declaration - src/util/viruri.c -- definition - src/libvirt_private.syms -- symbol export - src/Makefile.am -- added source and header files - cfg.mk -- added sc_prohibit_xmlURI - all others -- ID name and include fixes
-
- 22 2月, 2012 2 次提交
-
-
由 Jiri Denemark 提交于
This patch adds VIR_MIGRATE_UNSAFE flag for migration APIs and new VIR_ERR_MIGRATION_UNSAFE error code. The error code should be returned whenever migrating a domain is considered unsafe (e.g., it's configured in a way that does not ensure data integrity once it is migrated). VIR_MIGRATE_UNSAFE flag may be used to force migration even though it would normally be considered unsafe and forbidden.
-
由 Peter Krempa 提交于
Clarify the documentation of virConnectListDomains.
-
- 10 2月, 2012 1 次提交
-
-
由 Lai Jiangshan 提交于
Bug introduced in commit c6ec021b. Signed-off-by: NLai Jiangshan <laijs@cn.fujitsu.com>
-
- 04 2月, 2012 2 次提交
-
-
由 Laine Stump 提交于
When libvirt's virDomainDestroy API is shutting down the qemu process, it first sends SIGTERM, then waits for 1.6 seconds and, if it sees the process still there, sends a SIGKILL. There have been reports that this behavior can lead to data loss because the guest running in qemu doesn't have time to flush its disk cache buffers before it's unceremoniously whacked. This patch maintains that default behavior, but provides a new flag VIR_DOMAIN_DESTROY_GRACEFUL to alter the behavior. If this flag is set in the call to virDomainDestroyFlags, SIGKILL will never be sent to the qemu process; instead, if the timeout is reached and the qemu process still exists, virDomainDestroy will return an error. Once this patch is in, the recommended method for applications to call virDomainDestroyFlags will be with VIR_DOMAIN_DESTROY_GRACEFUL included. If that fails, then the application can decide if and when to call virDomainDestroyFlags again without VIR_DOMAIN_DESTROY_GRACEFUL (to force the issue with SIGKILL). (Note that this does not address the issue of existing applications that have not yet been modified to use VIR_DOMAIN_DESTROY_GRACEFUL. That is a separate patch.)
-
由 Philipp Hahn 提交于
compat{a->i}bility erron{->e}ous nec{c->}essary. Either "the" or "a". Signed-off-by: NPhilipp Hahn <hahn@univention.de>
-
- 03 2月, 2012 1 次提交
-
-
由 Osier Yang 提交于
-
- 02 2月, 2012 2 次提交
-
-
由 Eric Blake 提交于
Qemu is adding the ability to do a partial rebase. That is, given: base <- intermediate <- current virDomainBlockPull will produce: current but qemu now has the ability to leave base in the chain, to produce: base <- current Note that current qemu can only do a forward merge, and only with the current image as the destination, which is fully described by this API without flags. But in the future, it may be possible to enhance this API for additional scenarios by using flags: Merging the current image back into a previous image (that is, undoing a live snapshot), could be done by passing base as the destination and flags with a bit requesting a backward merge. Merging any other part of the image chain, whether forwards (the backing image contents are pulled into the newer file) or backwards (the deltas recorded in the newer file are merged back into the backing file), could also be done by passing a new flag that says that base should be treated as an XML snippet rather than an absolute path name, where the XML could then supply the additional instructions of which part of the image chain is being merged into any other part. * include/libvirt/libvirt.h.in (virDomainBlockRebase): New declaration. * src/libvirt.c (virDomainBlockRebase): Implement it. * src/libvirt_public.syms (LIBVIRT_0.9.10): Export it. * src/driver.h (virDrvDomainBlockRebase): New driver callback. * src/rpc/gendispatch.pl (long_legacy): Add exemption. * docs/apibuild.py (long_legacy_functions): Likewise.
-
由 Peter Krempa 提交于
This patch adds API to modify domain metadata for running and stopped domains. The api supports changing description, title as well as the newly added <metadata> element. The API has support for storing data in the metadata element using xml namespaces. * include/libvirt/libvirt.h.in * src/libvirt_public.syms - add function headers - add enum to select metadata to operate on - export functions * src/libvirt.c - add public api implementation * src/driver.h - add driver support * src/remote/remote_driver.c * src/remote/remote_protocol.x - wire up the remote protocol * include/libvirt/virterror.h * src/util/virterror.c - add a new error message note that metadata for domain are missing
-
- 01 2月, 2012 3 次提交
-
-
由 Jiri Denemark 提交于
We already provide ways to detect when a domain has been paused as a result of I/O error, but there was no way of getting the exact error or even the device that experienced it. This new API may be used for both.
-
由 Michal Privoznik 提交于
which contained some useless lines, copied code, NULL dereference.
-
由 Eric Blake 提交于
Our existing virDomainBlockResize takes an unsigned long long argument; if that command is later taught a DELTA and SHRINK flag, we cannot change its type without breaking API (but at least such a change would be ABI compatible). Meanwhile, the only time a negative size makes sense is if both DELTA and SHRINK are used together, but if we keep the argument unsigned, applications can pass the positive delta amount by which they would like to shrink the system, and have the flags imply the negative value. So, since this API has not yet been released, and in the interest of consistency with existing API, we swap virStorageVolResize to always pass an unsigned value. * include/libvirt/libvirt.h.in (virStorageVolResize): Use unsigned argument. * src/libvirt.c (virStorageVolResize): Likewise. * src/driver.h (virDrvStorageVolUpload): Adjust clients. * src/remote/remote_protocol.x (remote_storage_vol_resize_args): Likewise. * src/remote_protocol-structs: Regenerate. Suggested by Daniel P. Berrange.
-
- 29 1月, 2012 1 次提交
-
-
由 KAMEZAWA Hiroyuki 提交于
Unlike other users of virTypedParameter with RPC, this interface can return zero-filled entries because the interface assumes 2 dimensional array. We compress these entries out from the server when generating the over-the-wire contents, then reconstitute them in the client. Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 28 1月, 2012 4 次提交
-
-
由 Eric Blake 提交于
* src/libvirt.c (virDomainPMSuspendForDuration): Clarify usage.
-
由 KAMEZAWA Hiroyuki 提交于
add new API virDomainGetCPUStats() for getting cpu accounting information per real cpus which is used by a domain. The API is designed to allow future extensions for additional statistics. based on ideas by Lai Jiangshan and Eric Blake. * src/libvirt_public.syms: add API for LIBVIRT_0.9.10 * src/libvirt.c: define virDomainGetCPUStats() * include/libvirt/libvirt.h.in: add virDomainGetCPUStats() header * src/driver.h: add driver API * python/generator.py: add python API (as not implemented) Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Michal Privoznik 提交于
This API allows a domain to be put into one of S# ACPI states. Currently, S3 and S4 are supported. These states are shared with virNodeSuspendForDuration. However, for now we don't support any duration other than zero. The same apply for flags.
-
由 Zeeshan Ali (Khattak) 提交于
Add a new function to allow changing of capacity of storage volumes. Plan out several flags, even if not all of them will be implemented up front. Expose the new command via 'virsh vol-resize'. Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 26 1月, 2012 2 次提交
-
-
由 Daniel P. Berrange 提交于
The old virRandom() API was not generating good random numbers. Replace it with a new API virRandomBits which instead of being told the upper limit, gets told the number of bits of randomness required. * src/util/virrandom.c, src/util/virrandom.h: Add virRandomBits, and move virRandomInitialize * src/util/util.h, src/util/util.c: Delete virRandom and virRandomInitialize * src/libvirt.c, src/security/security_selinux.c, src/test/test_driver.c, src/util/iohelper.c: Update for changes from virRandom to virRandomBits * src/storage/storage_backend_iscsi.c: Remove bogus call to virRandomInitialize & convert to virRandomBits
-
由 Michal Privoznik 提交于
Currently, we support only filling a volume with zeroes on wiping. However, it is not enough as data might still be readable by experienced and equipped attacker. Many technical papers have been written, therefore we should support other wiping algorithms.
-
- 25 1月, 2012 1 次提交
-
-
由 Michal Privoznik 提交于
With this flag, virDomainSnapshotCreate will use fs-freeze and fs-thaw guest agent commands to quiesce guest's disks.
-
- 24 1月, 2012 1 次提交
-
-
由 Daniel P. Berrange 提交于
Add a new API virDomainShutdownFlags and define: VIR_DOMAIN_SHUTDOWN_DEFAULT = 0, VIR_DOMAIN_SHUTDOWN_ACPI_POWER_BTN = (1 << 0), VIR_DOMAIN_SHUTDOWN_GUEST_AGENT = (1 << 1), Also define some flags for the reboot API VIR_DOMAIN_REBOOT_DEFAULT = 0, VIR_DOMAIN_REBOOT_ACPI_POWER_BTN = (1 << 0), VIR_DOMAIN_REBOOT_GUEST_AGENT = (1 << 1), Although these two APIs currently have the same flags, using separate enums allows them to expand separately in the future. Add stub impls of the new API for all existing drivers
-
- 17 1月, 2012 1 次提交
-
-
由 Jiri Denemark 提交于
Commit 5d784bd6 was a nice attempt to clarify the semantics by requiring domain name from dxml to either match original name or dname. However, setting dxml domain name to dname doesn't really work since destination host needs to know the original domain name to be able to use it in migration cookies. This patch requires domain name in dxml to match the original domain name. The change should be safe and backward compatible since migration would fail just a bit later in the process.
-
- 12 1月, 2012 1 次提交
-
-
由 Shradha Shah 提交于
The above option helps to differentiate between implicit and explicit interface pools.
-
- 11 1月, 2012 2 次提交
-
-
由 Eric Blake 提交于
When disk snapshots were first implemented, libvirt blindly refused to allow an external snapshot destination that already exists, since qemu will blindly overwrite the contents of that file during the snapshot_blkdev monitor command, and we don't like a default of data loss by default. But VDSM has a scenario where NFS permissions are intentionally set so that the destination file can only be created by the management machine, and not the machine where the guest is running, so that libvirt will necessarily see the destination file already existing; adding a flag will allow VDSM to force the file reuse without libvirt complaining of possible data loss. https://bugzilla.redhat.com/show_bug.cgi?id=767104 * include/libvirt/libvirt.h.in (virDomainSnapshotCreateFlags): Add VIR_DOMAIN_SNAPSHOT_CREATE_REUSE_EXT. * src/libvirt.c (virDomainSnapshotCreateXML): Document it. Add note about partial failure. * tools/virsh.c (cmdSnapshotCreate, cmdSnapshotCreateAs): Add new flag. * tools/virsh.pod (snapshot-create, snapshot-create-as): Document it. * src/qemu/qemu_driver.c (qemuDomainSnapshotDiskPrepare) (qemuDomainSnapshotCreateXML): Implement the new flag.
-
由 Eric Blake 提交于
We had loads of different styles in describing the @flags parameter for various APIs, as well as several APIs that didn't list which enums provided the bit values valid for the flags. The end result is one of two formats: @flags: bitwise-OR of vir...Flags @flags: extra flags; not used yet, so callers should always pass 0 * src/libvirt.c: Use common sentences for flags. Also, (virDomainGetBlockIoTune): Mention virTypedParameterFlags. (virConnectOpenAuth): Mention virConnectFlags. (virDomainMigrate, virDomainMigrate2, virDomainMigrateToURI) (virDomainMigrateToURI2): Mention virDomainMigrateFlags. (virDomainMemoryPeek): Mention virDomainMemoryFlags. (virStoragePoolBuild): Mention virStoragePoolBuildFlags. (virStoragePoolDelete): Mention virStoragePoolDeleteFlags. (virStreamNew): Mention virStreamFlags. (virDomainOpenGraphics): Mention virDomainOpenGraphicsFlags.
-
- 10 1月, 2012 1 次提交
-
-
由 Jim Fehlig 提交于
I previously mentioned [1] a PolicyKit issue where libvirt would proceed with authentication even though polkit-auth failed: testusr xen134:~> virsh list --all Attempting to obtain authorization for org.libvirt.unix.manage. polkit-grant-helper: given auth type (8 -> yes) is bogus Failed to obtain authorization for org.libvirt.unix.manage. Id Name State ---------------------------------- 0 Domain-0 running - sles11sp1-pv shut off AFAICT, libvirt attempts to obtain a privilege it already has, causing polkit-auth to fail with above message. Instead of calling obtain and then checking auth, IMO the workflow should be for the server to check auth first, and if that fails ask the client to obtain it and check again. This workflow also allows for checking only successful exit of polkit-auth in virConnectAuthGainPolkit(). [1] https://www.redhat.com/archives/libvir-list/2011-December/msg00837.html
-
- 04 1月, 2012 1 次提交
-
- 03 1月, 2012 1 次提交
-
-
由 Eric Blake 提交于
Most severe here is a latent (but currently untriggered) memory leak if any hypervisor ever adds a string interface property; the remainder are mainly cosmetic. * include/libvirt/libvirt.h.in (VIR_DOMAIN_BANDWIDTH_*): Move macros closer to interface that uses them, and document type. * src/libvirt.c (virDomainSetInterfaceParameters) (virDomainGetInterfaceParameters): Formatting tweaks. * daemon/remote.c (remoteDispatchDomainGetInterfaceParameters): Avoid memory leak. * src/libvirt_public.syms (LIBVIRT_0.9.9): Sort lines. * src/libvirt_private.syms (domain_conf.h): Likewise. * src/qemu/qemu_driver.c (qemuDomainSetInterfaceParameters): Fix comments, break long lines.
-
- 29 12月, 2011 1 次提交
-
-
由 Hu Tao 提交于
* src/libvirt.c: implement the main entry points
-
- 21 12月, 2011 1 次提交
-
-
由 Hu Tao 提交于
Set up the types for the numa functions and insert them into the virDriver structure definition.
-
- 08 12月, 2011 1 次提交
-
-
由 Christophe Fergeau 提交于
It's referring to virSuspendDomain instead of virDomainSuspend.
-
- 30 11月, 2011 3 次提交
-
-
由 Daniel P. Berrange 提交于
* src/libvirt.c: Free user directory path
-
由 Lei Li 提交于
This patch add new pulic API virDomainSetBlockIoTune and virDomainGetBlockIoTune. Signed-off-by: NLei Li <lilei@linux.vnet.ibm.com> Signed-off-by: NZhi Yong Wu <wuzhy@linux.vnet.ibm.com> Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Eric Blake 提交于
Drivers were inconsistent when presented both --live and --config at once. For example, within qemu, getting memory parameters favored live, getting blkio tuning favored config, and getting scheduler parameters errored out. Also, some, but not all, attempts to mix flags on query were filtered at the virsh level. We shouldn't have to duplicate efforts in every client app, nor in every driver. So, it is simpler to just enforce that the two flags cannot both be used at once on query operations, which has precedent in libvirt.c, and which matches the documentation of virDomainModificationImpact. * src/libvirt.c (virDomainGetMemoryParameters) (virDomainGetBlkioParameters) (virDomainGetSchedulerParametersFlags, virDomainGetVcpuPinInfo): Borrow sanity checking from virDomainGetVcpusFlags.
-
- 29 11月, 2011 1 次提交
-
-
由 Osier Yang 提交于
The new API is named as "virDomainBlockResize", intending to add support for qemu monitor command "block_resize" (both HMP and QMP). Similar with APIs like "virDomainSetMemoryFlags", the units for argument "size" is kilobytes.
-