mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-11 23:37:42 +00:00
Eric Blake
0e16ae404c
virsh: add --all flag to 'event' command
Similar to our event-test demo program, it's nice to be able to have a mode where we can sniff all events at once, rather than having to spawn multiple virsh in parallel with one for each event type. (Can I just say our RegisterAny design is lousy? The fact that the majority of our callback pointers have a function signature with the opaque data in a different position, and that we have to cast the function signature before registering it, makes it hard to write a generic callback function; we have to write one for every type of event id. Life would have been easier if we had designed the callback as a fixed signature with a void* and size parameter, and then allowed the caller to downcast the void* to a particular struct for data specific to their callback id, where we could have then had a single function with a switch statement for each event id, and register that one function for all types of events. It would also be nicer if the callback functions knew which callbackID was being used when invoking that callback, so that I could use a common data structure among all registrations instead of having to create an array of one data per callback. But I really don't want to go add yet another event API design.) * tools/virsh-domain.c (cmdEvent): Add --all parameter; convert all callbacks to support shared counter. * tools/virsh.pod (event): Document it. Signed-off-by: Eric Blake <eblake@redhat.com>
LibVirt : simple API for virtualization Libvirt is a C toolkit to interact with the virtualization capabilities of recent versions of Linux (and other OSes). It is free software available under the GNU Lesser General Public License. Virtualization of the Linux Operating System means the ability to run multiple instances of Operating Systems concurrently on a single hardware system where the basic resources are driven by a Linux instance. The library aim at providing long term stable C API initially for the Xen paravirtualization but should be able to integrate other virtualization mechanisms if needed. Daniel Veillard <veillard@redhat.com>
Description
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.
Languages
C
94.8%
Python
2%
Meson
0.9%
Shell
0.8%
Dockerfile
0.6%
Other
0.8%