Libvirt provides a portable, long term stable C API for managing the virtualization technologies provided by many operating systems. It includes support for QEMU, KVM, Xen, LXC, bhyve, Virtuozzo, VMware vCenter and ESX, VMware Desktop, Hyper-V, VirtualBox and the POWER Hypervisor.
Go to file
Jonathon Jongsma bcdcaa2d08 nodedev: handle mdevctl errors consistently
Currently, we have three different types of mdevctl errors:
 1. the command cannot be constructed ecause of unsatisfied
    preconditions
 2. the command cannot be executed due to some error
 3. the command is executed, but returns an error status

These different failures are handled differently. Some cases set an
error and return and error status, and some return a error message but
do not set an error.

This means that the caller has to check both whether the return value is
negative and whether the errmsg parameter is non-NULL before deciding
whether to report the error or not. The situation is further complicated
by the fact that there are occasional instances where mdevctl exits with
an error status but does not print an error message.  This results in
errmsg being an empty string "" (i.e. non-NULL).

Simplify the situation by ensuring that virReportError() is called for
all error conditions rather than returning an error message back to the
calling function.

Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
Reviewed-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
2021-07-01 16:34:03 +02:00
.ctags.d
.github
.gitlab/issue_templates
build-aux syntax-check: Only prohibit empty first lines in non-empty files 2021-06-15 14:15:42 +02:00
ci ci: Also perform package upgrades on macOS and FreeBSD 2021-06-24 09:14:08 +02:00
docs docs: Fix information for default TPM version 2021-07-01 16:15:05 +02:00
examples
include Add basic driver for the Cloud-Hypervisor 2021-06-04 10:56:06 +01:00
po Translated using Weblate (Ukrainian) 2021-06-29 08:54:00 +02:00
scripts
src nodedev: handle mdevctl errors consistently 2021-07-01 16:34:03 +02:00
tests nodedev: handle mdevs from multiple parents 2021-07-01 16:34:03 +02:00
tools virsh-volume: Apply virshStorageVolNameCompleter to vol-{key,path} commands 2021-06-16 10:32:43 +02:00
.color_coded.in
.ctags
.dir-locals.el
.editorconfig
.gitignore
.gitlab-ci.yml ci: Also perform package upgrades on macOS and FreeBSD 2021-06-24 09:14:08 +02:00
.gitmodules
.gitpublish
.mailmap
.ycm_extra_conf.py.in
AUTHORS.rst.in
config.h meson: Declare GLIB_VERSION_* macros at configure 2021-05-03 12:08:26 +02:00
configmake.h.in
CONTRIBUTING.rst
COPYING
COPYING.LESSER
gitdm.config
libvirt-admin.pc.in
libvirt-lxc.pc.in
libvirt-qemu.pc.in
libvirt.pc.in
libvirt.spec.in spec: avoid rpm warning about macro in comment 2021-06-25 17:56:26 +00:00
meson_options.txt remote: switch to auto-spawn modular daemons by default 2021-06-18 17:13:15 +01:00
meson.build Post-release version bump to 7.6.0 2021-07-01 15:44:22 +02:00
mingw-libvirt.spec.in meson: Turn apparmor_profiles into a feature 2021-06-01 14:32:02 +02:00
NEWS.rst NEWS: Fix spacing between releases 2021-07-01 16:15:05 +02:00
README.rst
run.in

GitLab CI Build Status

CII Best Practices

Translation status

Libvirt API for virtualization

Libvirt provides a portable, long term stable C API for managing the virtualization technologies provided by many operating systems. It includes support for QEMU, KVM, Xen, LXC, bhyve, Virtuozzo, VMware vCenter and ESX, VMware Desktop, Hyper-V, VirtualBox and the POWER Hypervisor.

For some of these hypervisors, it provides a stateful management daemon which runs on the virtualization host allowing access to the API both by non-privileged local users and remote users.

Layered packages provide bindings of the libvirt C API into other languages including Python, Perl, PHP, Go, Java, OCaml, as well as mappings into object systems such as GObject, CIM and SNMP.

Further information about the libvirt project can be found on the website:

https://libvirt.org

License

The libvirt C API is distributed under the terms of GNU Lesser General Public License, version 2.1 (or later). Some parts of the code that are not part of the C library may have the more restrictive GNU General Public License, version 2.0 (or later). See the files COPYING.LESSER and COPYING for full license terms & conditions.

Installation

Instructions on building and installing libvirt can be found on the website:

https://libvirt.org/compiling.html

Contributing

The libvirt project welcomes contributions in many ways. For most components the best way to contribute is to send patches to the primary development mailing list. Further guidance on this can be found on the website:

https://libvirt.org/contribute.html

Contact

The libvirt project has two primary mailing lists:

Further details on contacting the project are available on the website:

https://libvirt.org/contact.html