- 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 3 次提交
-
-
由 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.
-
由 Srivatsa S. Bhat 提交于
Add the core functions that implement the functionality of the API. Suspend is done by using an asynchronous mechanism so that we can return the status to the caller before the host gets suspended. This asynchronous operation is achieved by suspending the host in a separate thread of execution. However, returning the status to the caller is only best-effort, but not guaranteed. To resume the host, an RTC alarm is set up (based on how long we want to suspend) before suspending the host. When this alarm fires, the host gets woken up. Suspend-to-RAM operation on a host running Linux can take upto more than 20 seconds, depending on the load of the system. (Freezing of tasks, an operation preceding any suspend operation, is given up after a 20 second timeout). And Suspend-to-Disk can take even more time, considering the time required for compaction, creating the memory image and writing it to disk etc. So, we do not allow the user to specify a suspend duration of less than 60 seconds, to be on the safer side, since we don't want to prematurely declare failure when we only had to wait for some more time.
-
由 Srivatsa S. Bhat 提交于
Implement the public definitions for the new API virNodeSuspendForDuration() which will be subsequently used to do a timed suspend on the host.
-
- 24 11月, 2011 2 次提交
-
-
由 Jiri Denemark 提交于
This API can be used to check if the socket associated with virConnectPtr is still open or it was closed (probably because keepalive protocol timed out). If there the connection is local (i.e., no socket is associated with the connection, it is trivially always alive.
-
由 Jiri Denemark 提交于
virConnectSetKeepAlive public API can be used by a client connecting to remote server to start using keepalive protocol. The API is handled directly by remote driver and not transmitted over the wire to the server.
-
- 23 11月, 2011 3 次提交
-
-
由 Eric Blake 提交于
Given that we can now handle the target's disk shorthand, in addition to an absolute path to the file or block device used on the host, the term 'disk' fits a bit better as the parameter name than 'path'. * include/libvirt/libvirt.h.in: Update some parameter names. * src/libvirt.c (virDomainBlockStats, virDomainBlockStatsFlags) (virDomainBlockPeek, virDomainGetBlockInfo, virDomainBlockJobAbort) (virDomainGetBlockJobInfo, virDomainBlockJobSetSpeed) (virDomainBlockPull): Likewise.
-
由 Eric Blake 提交于
Commit 89b6284f made it possible to pass either a source name or the target device to most API demanding a disk designation, but forgot to update the documentation. It also failed to update virDomainBlockStats to take both forms. This patch fixes both the documentation and the remaining function. Xen continues to use just device shorthand (that is, I did not implement path lookup there, since xen does not track a domain_conf to quickly tie a path back to the device shorthand). * src/libvirt.c (virDomainBlockStats, virDomainBlockStatsFlags) (virDomainGetBlockInfo, virDomainBlockPeek) (virDomainBlockJobAbort, virDomainGetBlockJobInfo) (virDomainBlockJobSetSpeed, virDomainBlockPull): Document acceptable disk naming conventions. * src/qemu/qemu_driver.c (qemuDomainBlockStats) (qemuDomainBlockStatsFlags): Allow lookup by source name. * src/test/test_driver.c (testDomainBlockStats): Likewise.
-
由 Eli Qiao 提交于
Signed-off-by: NEli Qiao <taget@linux.vnet.ibm.com> When configuring a URI alias like this in 'libvirt.conf': uri_aliases = [ "jj#j=qemu+ssh://root@127.0.0.1/system", "sleet=qemu+ssh://root@sleet.cloud.example.com/system", ] virsh -c jj#j It will show this error message: 'no connection driver available for No connection for URI jj#j' Actually,we expect this message below: Malformed 'uri_aliases' config entry 'jj#j=qemu+ssh://root@127.0.0.1/system', aliases may only contain 'a-Z, 0-9, _, -' Give this patch to fix this error.
-
- 12 11月, 2011 1 次提交
-
-
由 Eric Blake 提交于
This allows strings to be transported between client and server in the context of name-type-value virTypedParameter functions. For compatibility, o new clients will not send strings to old servers, based on a feature check o new servers will not send strings to old clients without the flag VIR_TYPED_PARAM_STRING_OKAY; this will be enforced at the RPC layer in the next patch, so that drivers need not worry about it in general. The one exception is that virDomainGetSchedulerParameters lacks a flags argument, so it must not return a string; drivers that forward that function on to virDomainGetSchedulerParametersFlags will have to pay attention to the flag. o the flag VIR_TYPED_PARAM_STRING_OKAY is set automatically, based on a feature check (so far, no driver implements it), so clients do not have to worry about it Future patches can then enable the feature on a per-driver basis. This patch also ensures that drivers can blindly strdup() field names (previously, a malicious client could stuff 80 non-NUL bytes into field and cause a read overrun). * src/libvirt_internal.h (VIR_DRV_FEATURE_TYPED_PARAM_STRING): New driver feature. * src/libvirt.c (virTypedParameterValidateSet) (virTypedParameterSanitizeGet): New helper functions. (virDomainSetMemoryParameters, virDomainSetBlkioParameters) (virDomainSetSchedulerParameters) (virDomainSetSchedulerParametersFlags) (virDomainGetMemoryParameters, virDomainGetBlkioParameters) (virDomainGetSchedulerParameters) (virDomainGetSchedulerParametersFlags, virDomainBlockStatsFlags): Use them. * src/util/util.h (virTypedParameterArrayClear): New helper function. * src/util/util.c (virTypedParameterArrayClear): Implement it. * src/libvirt_private.syms (util.h): Export it. Based on an initial patch by Hu Tao, with feedback from Daniel P. Berrange. Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 02 11月, 2011 2 次提交
-
-
由 Eric Blake 提交于
virDomainBlockStatsFlags was missing a check that was present in virDomainGetMemoryParameters. Additionally, I found that the existing descriptions were a bit hard to read. A later patch will fix qemu to return fewer than max parameters if @nparams was too small on input. * src/libvirt.c (virDomainGetMemoryParameters) (virDomainGetBlkioParameters, virDomainGetSchedulerParameters) (virDomainGetSchedulerParametersFlags): Tweak documentation wording. (virDomainBlockStatsFlags): Likewise, and add sanity check.
-
由 Wen Ruo Lv 提交于
with /etc/libvirt/libvirt.conf below: uri_aliases = [ "hail=qemu:///system", "sleet=qemu+ssh://root 9 115 122 57/system", "sam=qemu+unix:///system?socket=/var/run/libvirt/libvirt-sock", ] Neither "virsh -c hailly" nor "hai" should result in matching "hail=qemu:///system" Fix URI alias prefix matching when connecting Signed-off-by: NWen Ruo Lv <lvroyce@linux.vnet.ibm.com>
-
- 28 10月, 2011 1 次提交
-
-
由 Daniel P. Berrange 提交于
The virDomainOpenGraphics API allows a libvirt client to pass in a file descriptor for an open socket pair, and get it connected to the graphics display of the guest. This is limited to working with local libvirt hypervisors connected over a UNIX domain socket, since it will use UNIX FD passing * include/libvirt/libvirt.h.in: Define virDomainOpenGraphics * src/driver.h: Define driver for virDomainOpenGraphics * src/libvirt_public.syms, src/libvirt.c: Entry point for virDomainOpenGraphics * src/libvirt_internal.h: VIR_DRV_FEATURE_FD_PASSING
-
- 25 10月, 2011 1 次提交
-
-
由 Eric Blake 提交于
Based on a report by Coverity. waitpid() can leak resources if it fails with EINTR, so it should never be used without checking return status. But we already have a helper function that does that, so use it in more places. * src/lxc/lxc_container.c (lxcContainerAvailable): Use safer virWaitPid. * daemon/libvirtd.c (daemonForkIntoBackground): Likewise. * tests/testutils.c (virtTestCaptureProgramOutput, virtTestMain): Likewise. * src/libvirt.c (virConnectAuthGainPolkit): Simplify with virCommand.
-
- 19 10月, 2011 1 次提交
-
-
由 Daniel P. Berrange 提交于
This adds support for a libvirt client configuration file either /etc/libvirt/libvirt.conf for privileged clients, or $HOME/.libvirt/libvirt.conf for unprivileged clients. It allows one parameter uri_aliases = [ "hail=qemu+ssh://root@hail.cloud.example.com/system", "sleet=qemu+ssh://root@sleet.cloud.example.com/system", ] Any call to virConnectOpen with a non-NULL URI will first attempt to match against the uri_aliases list. An application can disable this by using VIR_CONNECT_NO_ALIASES * docs/uri.html.in: Document URI aliases * include/libvirt/libvirt.h.in: Add VIR_CONNECT_NO_ALIASES * libvirt.spec.in, mingw32-libvirt.spec.in: Add /etc/libvirt/libvirt.conf * src/Makefile.am: Install default config file * src/libvirt.c: Add support for URI aliases * src/remote/remote_driver.c: Don't try to handle URIs with no scheme and which clearly are not paths * src/util/conf.c: Don't raise error on virConfFree(NULL) * src/xen/xen_driver.c: Don't raise error on URIs with no scheme
-
- 15 10月, 2011 1 次提交
-
-
由 Jiri Denemark 提交于
Explicitly disallow conflicts between domain name from dxml and dname.
-
- 13 10月, 2011 2 次提交
-
-
由 Michal Privoznik 提交于
This flag is intended to allow user to do so called system reset after dump, instead of sending ACPI reboot event.
-
由 Eric Blake 提交于
Counterpart to --roots. * include/libvirt/libvirt.h.in (VIR_DOMAIN_SNAPSHOT_LIST_LEAVES): New flag. * src/libvirt.c (virDomainSnapshotNum, virDomainSnapshotListNames) (virDomainSnapshotNumChildren) (virDomainSnapshotListChildrenNames): Document it. * tools/virsh.c (cmdSnapshotList): Expose it. * tools/virsh.pod (snapshot-list): Document --leaves.
-
- 11 10月, 2011 1 次提交
-
-
由 Eric Blake 提交于
The previous API addition allowed traversal up the hierarchy; this one makes it easier to traverse down the hierarchy. In the python bindings, virDomainSnapshotNumChildren can be generated, but virDomainSnapshotListChildrenNames had to copy from the hand-written example of virDomainSnapshotListNames. * include/libvirt/libvirt.h.in (virDomainSnapshotNumChildren) (virDomainSnapshotListChildrenNames): New prototypes. (VIR_DOMAIN_SNAPSHOT_LIST_DESCENDANTS): New flag alias. * src/libvirt.c (virDomainSnapshotNumChildren) (virDomainSnapshotListChildrenNames): New functions. * src/libvirt_public.syms: Export them. * src/driver.h (virDrvDomainSnapshotNumChildren) (virDrvDomainSnapshotListChildrenNames): New callbacks. * python/generator.py (skip_impl, nameFixup): Update lists. * python/libvirt-override-api.xml: Likewise. * python/libvirt-override.c (libvirt_virDomainSnapshotListChildrenNames): New wrapper function.
-
- 06 10月, 2011 1 次提交
-
-
由 Eric Blake 提交于
Although reverting to a snapshot is a form of data loss, this is normally expected. However, there are two cases where additional surprises (failure to run the reverted state, or a break in connectivity to the domain) can come into play. Requiring extra acknowledgment in these cases will make it less likely that someone can get into an unrecoverable state due to a default revert. Also create a new error code, so users can distinguish when forcing would make a difference, rather than having to blindly request force. * include/libvirt/libvirt.h.in (VIR_DOMAIN_SNAPSHOT_REVERT_FORCE): New flag. * src/libvirt.c (virDomainRevertToSnapshot): Document it. * include/libvirt/virterror.h (VIR_ERR_SNAPSHOT_REVERT_RISKY): New error value. * src/util/virterror.c (virErrorMsg): Implement it. * tools/virsh.c (cmdDomainSnapshotRevert): Add --force to virsh. * tools/virsh.pod (snapshot-revert): Document it.
-
- 29 9月, 2011 1 次提交
-
-
由 Xu He Jie 提交于
Add new public api for 'reset'. It can reset domain immediately without any guest shutdown. Signed-off-by: NXu He Jie <xuhj@linux.vnet.ibm.com>
-
- 28 9月, 2011 1 次提交
-
-
由 Eric Blake 提交于
Although a client can already obtain a snapshot's parent by dumping and parsing the xml, then doing a snapshot lookup by name, it is more efficient to get the parent in one step, which in turn will make operations that must traverse a snapshot hierarchy easier to perform. * include/libvirt/libvirt.h.in (virDomainSnapshotGetParent): Declare. * src/libvirt.c (virDomainSnapshotGetParent): New function. * src/libvirt_public.syms: Export it. * src/driver.h (virDrvDomainSnapshotGetParent): New callback.
-
- 21 9月, 2011 1 次提交
-
-
由 Osier Yang 提交于
-
- 16 9月, 2011 2 次提交
-
-
由 Peter Krempa 提交于
/usr/lib/stdlib.h in Mac OS X and probably also in BSD's exports this symbol :(
-
由 Peter Krempa 提交于
Documentation did not specify, that some permissions are required on target path for coredump for the user running the hypervisor. Diff to v1: - reword statements
-
- 08 9月, 2011 1 次提交
-
-
由 Eric Blake 提交于
These functions access internals of the opaque object, and do not need any rpc counterpart. It could be argued that we should have provided these when snapshot objects were first introduced, since all the other vir*Ptr objects have at least a GetName accessor. * include/libvirt/libvirt.h.in (virDomainSnapshotGetName) (virDomainSnapshotGetDomain, virDomainSnapshotGetConnect): Declare. * src/libvirt.c (virDomainSnapshotGetName) (virDomainSnapshotGetDomain, virDomainSnapshotGetConnect): New functions. * src/libvirt_public.syms: Export them.
-
- 06 9月, 2011 1 次提交
-
-
由 Osier Yang 提交于
-
- 05 9月, 2011 2 次提交
-
-
由 Eric Blake 提交于
Prior to this patch, <domainsnapshot>/<disks> was ignored. This changes it to be an error unless an explicit disk snapshot is requested (a future patch may relax things if it turns out to be useful to have a <disks> specification alongside a system checkpoint). * include/libvirt/libvirt.h.in (VIR_DOMAIN_SNAPSHOT_CREATE_DISK_ONLY): New flag. * src/libvirt.c (virDomainSnapshotCreateXML): Document it. * src/esx/esx_driver.c (esxDomainSnapshotCreateXML): Disk snapshots not supported yet. * src/vbox/vbox_tmpl.c (vboxDomainSnapshotCreateXML): Likewise. * src/qemu/qemu_driver.c (qemuDomainSnapshotCreateXML): Likewise.
-
由 Eric Blake 提交于
Since a snapshot is fully recoverable, it is useful to have a snapshot as a means of hibernating a guest, then reverting to the snapshot to wake the guest up. This mode of usage is similar to 'virsh save/virsh restore', except that virsh save uses an external file while virsh snapshot keeps the vm state internal to a qcow2 file. However, it only works on persistent domains. In the usage pattern of snapshot/revert for hibernating a guest, there is no need to keep the guest running between the two points in time, especially since that would generate runtime state that would just be discarded. Add a flag to make it possible to stop the domain after the snapshot has completed. * include/libvirt/libvirt.h.in (VIR_DOMAIN_SNAPSHOT_CREATE_HALT): New flag. * src/libvirt.c (virDomainSnapshotCreateXML): Document it. * src/qemu/qemu_driver.c (qemuDomainSnapshotCreateXML) (qemuDomainSnapshotCreateActive): Implement it.
-