- 21 7月, 2014 1 次提交
-
-
由 Peter Krempa 提交于
max_id could be used uninitialized in the cleanup section after the domain wasn't found. Discovered by Coverity.
-
- 18 7月, 2014 1 次提交
-
-
由 Michal Privoznik 提交于
There's this question on the list that is asked over and over again. How do I get {cpu, memory, ...} usage in percentage? Or its modified version: How do I plot nice graphs like virt-manager does? It would be nice if we have an example to inspire people. And that's what domtop should do. Yes, it could be written in different ways, but I've chosen this one as I think it show explicitly what users need to implement in order to imitate virt-manager's graphing. Note: The usage is displayed from host perspective. That is, how much host CPUs the domain is using. But it should be fairly simple to switch do just guest CPU usage if needed. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 16 7月, 2014 1 次提交
-
-
由 Cédric Bosdonnat 提交于
Rework the apparmor lxc profile abstraction to mimic ubuntu's container-default. This profile allows quite a lot, but strives to restrict access to dangerous resources. Removing the explicit authorizations to bash, systemd and cron files, forces them to keep the lxc profile for all applications inside the container. PUx permissions where leading to running systemd (and others tasks) unconfined. Put the generic files, network and capabilities restrictions directly in the TEMPLATE.lxc: this way, users can restrict them on a per container basis.
-
- 07 7月, 2014 1 次提交
-
-
由 Cédric Bosdonnat 提交于
Tiny fix for virt-lxc-convert: we are setting memory values in bytes, while free may give us values in a different unit by default: force free to output bytes with -b flag.
-
- 18 6月, 2014 1 次提交
-
-
由 Cédric Bosdonnat 提交于
-
- 30 4月, 2014 1 次提交
-
-
由 Sahid Orentino Ferdjaoui 提交于
This commit adds a new example to illustrate peer to peer domain migration with virDomainMigrateToURI. Signed-off-by: NSahid Orentino Ferdjaoui <sahid.ferdjaoui@cloudwatt.com>
-
- 27 3月, 2014 1 次提交
-
-
由 Cédric Bosdonnat 提交于
See lp#1276719 for the bug description. As virt-aa-helper doesn't know the VFIO groups to use for the guest, allow access to all /dev/vfio/[0-9]* and /dev/vfio/vfio files if there is a potential need for vfio Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 25 3月, 2014 1 次提交
-
-
由 Ján Tomko 提交于
-
- 21 3月, 2014 1 次提交
-
-
由 Martin Kletzander 提交于
Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
- 04 3月, 2014 2 次提交
-
-
由 Cédric Bosdonnat 提交于
-
由 Cédric Bosdonnat 提交于
use_apparmor() was first designed to be called from withing libvirtd, but libvirt_lxc also uses it. in libvirt_lxc, there is no need to check whether to use apparmor or not: just use it if possible.
-
- 12 2月, 2014 1 次提交
-
-
由 Cédric Bosdonnat 提交于
The security driver expects /etc/apparmor.d/libvirt/TEMPLATE but we installed it to /etc/apparmor.d/libvirtd/TEMPLATE. Move the template to the expected place since that code was here long before.
-
- 08 2月, 2014 1 次提交
-
-
由 Felix Geyer 提交于
Tested on Debian unstable. The profile updates are partly taken from the Ubuntu trusty libvirt package. Signed-off-by: NGuido Günther <agx@sigxcpu.org>
-
- 20 1月, 2014 1 次提交
-
-
由 Thorsten Behrens 提交于
-
- 08 1月, 2014 1 次提交
-
-
由 Guido Günther 提交于
Make it easy to install the shipped examples. The aim is to have reasonably working templates so that distros only need to minimally patch these and can feed things upstream more easily. This was prompted by http://bugs.debian.org/725144
-
- 25 12月, 2013 2 次提交
-
-
由 Michal Privoznik 提交于
When registering a close callback, the connection refcount is increased as the connection object is passed to the callback and hence we must prevent deleting it too soon. However, when closing the connection, the connection object is just unrefed. So whenever a connection with a close callback is closed, we end up with the connection object which has exactly one reference. Leaving the code as-is doesn't mean the end of the world as we know it, but why give a bad example? ==14531== 288 bytes in 1 blocks are still reachable in loss record 695 of 762 ==14531== at 0x4C2BDE4: calloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==14531== by 0x4E9FE09: virAllocVar (viralloc.c:558) ==14531== by 0x4EDBE45: virObjectNew (virobject.c:190) ==14531== by 0x4F71AAC: virGetConnect (datatypes.c:116) ==14531== by 0x4F78511: do_open (libvirt.c:1136) ==14531== by 0x4F7B3AC: virConnectOpenAuth (libvirt.c:1481) ==14531== by 0x4011D2: main (event-test.c:499) (and other leaks tied to virGetConnect()) Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
This partially reverts 5eb4b042 and 62774afb. Rewrite the domsuspend example from scratch. This time do it right. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 14 12月, 2013 2 次提交
-
-
由 Daniel P. Berrange 提交于
-
由 Daniel P. Berrange 提交于
The domain events demo program isn't really tied to domain events anymore, so rename it to object events. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 05 12月, 2013 1 次提交
-
-
由 Peter Krempa 提交于
The domsuspend example code is a really old and bad exmample of (how not to use) the libvirt API. Remove it as it's apparent that nobody tried to use it. It was broken and nobody complained.
-
- 26 11月, 2013 1 次提交
-
-
由 Daniel P. Berrange 提交于
The python binding now lives in http://libvirt.org/git/?p=libvirt-python.git that repo also provides an RPM which is upgrade compatible with the old libvirt-python sub-RPM. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 21 10月, 2013 1 次提交
-
-
由 Daniel P. Berrange 提交于
The libvirt.so library has far too many library deps to allow linking against it from setuid programs. Those libraries can do stuff in __attribute__((constructor) functions which is not setuid safe. The virt-login-shell needs to link directly against individual files that it uses, with all library deps turned off except for libxml2 and libselinux. Create a libvirt-setuid-rpc-client.la library which is linked to by virt-login-shell. A config-post.h file allows this library to disable all external deps except libselinux and libxml2. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 05 9月, 2013 1 次提交
-
-
由 Eric Blake 提交于
'make rpm' with client_local set to 1 (by manual modification, or with RHEL 5 on s390) warns: RPM build errors: Installed (but unpackaged) file(s) found: /etc/libvirt/nwfilter/allow-arp.xml /etc/libvirt/nwfilter/allow-dhcp-server.xml /etc/libvirt/nwfilter/allow-dhcp.xml /etc/libvirt/nwfilter/allow-incoming-ipv4.xml /etc/libvirt/nwfilter/allow-ipv4.xml /etc/libvirt/nwfilter/clean-traffic.xml /etc/libvirt/nwfilter/no-arp-ip-spoofing.xml /etc/libvirt/nwfilter/no-arp-mac-spoofing.xml /etc/libvirt/nwfilter/no-arp-spoofing.xml /etc/libvirt/nwfilter/no-ip-multicast.xml /etc/libvirt/nwfilter/no-ip-spoofing.xml /etc/libvirt/nwfilter/no-mac-broadcast.xml /etc/libvirt/nwfilter/no-mac-spoofing.xml /etc/libvirt/nwfilter/no-other-l2-traffic.xml /etc/libvirt/nwfilter/no-other-rarp-traffic.xml /etc/libvirt/nwfilter/qemu-announce-self-rarp.xml /etc/libvirt/nwfilter/qemu-announce-self.xml /usr/share/polkit-1/actions/org.libvirt.api.policy The bulk of these are fixed with this patch. * examples/xml/nwfilter/Makefile.am (install-data-local) (uninstall-local): Make conditional. Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 04 9月, 2013 1 次提交
-
-
由 Eric Blake 提交于
Bug introduced in commit 5c6ff422; 'make dist' fails: make[3]: Entering directory `/home/eblake/libvirt-tmp/build3/examples/python' make[3]: *** No rule to make target `topoology.py', needed by `distdir'. Stop. make[3]: Leaving directory `/home/eblake/libvirt-tmp/build3/examples/python' * examples/python/Makefile.am (EXTRA_DIST): Spell topology right. Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 03 9月, 2013 1 次提交
-
-
由 Peter Krempa 提交于
Add a demo script originally written by Amador Pahim to parse topology of the host from data provided in the capabilities XML.
-
- 23 8月, 2013 1 次提交
-
-
由 Claudio Bley 提交于
Consistently use "is" or "is not" to compare variables to None, because doing so is preferrable, as per PEP 8 (http://www.python.org/dev/peps/pep-0008/#programming-recommendations): > Comparisons to singletons like None should always be done with is or > is not, never the equality operators.
-
- 15 8月, 2013 1 次提交
-
-
由 Giuseppe Scrivano 提交于
commit 14e7e0ae adds the support for crash events. Solves: https://bugzilla.redhat.com/show_bug.cgi?id=994317Signed-off-by: NGiuseppe Scrivano <gscrivan@redhat.com>
-
- 30 7月, 2013 1 次提交
-
-
由 Eric Blake 提交于
Mingw *printf is a moving target; newer mingw now provides a version of asprintf() that fails to understand %lld: CC event_test-event-test.o ../../../../examples/domain-events/events-c/event-test.c: In function 'myDomainEventRTCChangeCallback': ../../../../examples/domain-events/events-c/event-test.c:270:18: error: unknown conversion type character 'l' in format [-Werror=format=] virDomainGetID(dom), offset) < 0) ^ But since our examples already admitted that they were hacking around a mingw deficiency, it is easier to just use printf() directly, coupled with <inttypes.h> macros, for a more portable work-around. * examples/domain-events/events-c/event-test.c (myDomainEventRTCChangeCallback): Use PRIdMAX instead of asprintf. Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 18 7月, 2013 1 次提交
-
-
由 Jiri Denemark 提交于
-
- 12 7月, 2013 1 次提交
-
-
由 John Ferlan 提交于
Recent changes uncovered a NEGATIVE_RETURNS when processing 'numNames' in 'showDomains' in the for loop after a possible -1 return.
-
- 11 7月, 2013 1 次提交
-
-
由 Daniel P. Berrange 提交于
Convert the type of loop iterators named 'i', 'j', k', 'ii', 'jj', 'kk', to be 'size_t' instead of 'int' or 'unsigned int', also santizing 'ii', 'jj', 'kk' to use the normal 'i', 'j', 'k' naming Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 03 7月, 2013 1 次提交
-
-
由 Chen Fan 提交于
This patch introduces domain crashed types and crashed reasons which will be used while guest panicked.
-
- 28 5月, 2013 1 次提交
-
-
由 Eric Blake 提交于
I noticed several unusual spacings in for loops, and decided to fix them up. See the next commit for the syntax check that found all of these. * examples/domsuspend/suspend.c (main): Fix spacing. * python/libvirt-override.c: Likewise. * src/conf/interface_conf.c: Likewise. * src/security/virt-aa-helper.c: Likewise. * src/util/virconf.c: Likewise. * src/util/virhook.c: Likewise. * src/util/virlog.c: Likewise. * src/util/virsocketaddr.c: Likewise. * src/util/virsysinfo.c: Likewise. * src/util/viruuid.c: Likewise. * src/vbox/vbox_tmpl.c: Likewise. * src/xen/xen_hypervisor.c: Likewise. * tools/virsh-domain-monitor.c (vshDomainStateToString): Drop default case, to let compiler check us. * tools/virsh-domain.c (vshDomainVcpuStateToString): Likewise. Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 21 5月, 2013 2 次提交
-
-
由 Osier Yang 提交于
-
由 Eric Blake 提交于
Several files called out COPYING or COPYING.LIB instead of using the normal boilerplate. It's especially important that we don't call out COPYING from an LGPL file, since COPYING is traditionally used for the GPL. A few files were lacking copyright altogether. * src/rpc/gendispatch.pl: Add missing copyright. * Makefile.nonreentrant: Likewise. * src/check-symfile.pl: Likewise. * src/check-symsorting.pl: Likewise. * src/driver.h: Likewise. * src/internal.h: Likewise. * tools/libvirt-guests.sh.in: Likewise. * tools/virt-pki-validate.in: Mention copyright in comment, not just code. * tools/virt-sanlock-cleanup.in: Likewise. * src/rpc/genprotocol.pl: Spell out license terms. * src/xen/xend_internal.h: Likewise. * src/xen/xend_internal.c: Likewise. * Makefile.am: Likewise. * daemon/Makefile.am: Likewise. * docs/Makefile.am: Likewise. * docs/schemas/Makefile.am: Likewise. * examples/apparmor/Makefile.am: Likewise. * examples/domain-events/events-c/Makefile.am: Likewise. * examples/dominfo/Makefile.am: Likewise. * examples/domsuspend/Makefile.am: Likewise. * examples/hellolibvirt/Makefile.am: Likewise. * examples/openauth/Makefile.am: Likewise. * examples/python/Makefile.am: Likewise. * examples/systemtap/Makefile.am: Likewise. * examples/xml/nwfilter/Makefile.am: Likewise. * gnulib/lib/Makefile.am: Likewise. * gnulib/tests/Makefile.am: Likewise. * include/Makefile.am: Likewise. * include/libvirt/Makefile.am: Likewise. * python/Makefile.am: Likewise. * python/tests/Makefile.am: Likewise. * src/Makefile.am: Likewise. * tests/Makefile.am: Likewise. * tools/Makefile.am: Likewise. * configure.ac: Likewise. Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 11 5月, 2013 1 次提交
-
-
由 Daniel P. Berrange 提交于
Update the hellolibvirt example program to demonstrate use of the virGetLastErrorMessage() API for quick error reporting Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 10 5月, 2013 2 次提交
-
-
由 Jesse J. Cook 提交于
Added error checking to virEventRegisterDefaultImpl call for consistency.
-
由 Jesse J. Cook 提交于
In the domain-events example C code virEventRegisterDefaultImpl was being called before virConnectOpen without first calling virInitialize. While this code worked, it is incorrect. Adding a call to g_string_new prior to the call to virEventRegisterDefaultImpl would cause the code to break. This fix will help avoid unintentional misue of the API. Relates to: Ret Hat Bugzilla - Bug 961155
-
- 14 3月, 2013 1 次提交
-
-
由 Daniel P. Berrange 提交于
When converting to virObject, the probes on the 'Free' functions were removed on the basis that there is a probe on virObjectFree that suffices. This puts a burden on people writing probe scripts to identify which object is being dispose. This adds back probes in the 'Dispose' functions and updates the rpc monitor systemtap example to use them Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 05 3月, 2013 1 次提交
-
-
由 John Ferlan 提交于
Change the order of some conditions and use the AllDomains API to get a list of all the active and defined domains, then use the Active and Name API's in order to print. This changes here adjust the output from: Attempting to connect to hypervisor Connected to hypervisor at "qemu:///system" Hypervisor: "QEMU" version: 0.32.656 There are 0 active and 2 inactive domains Inactive domains: foo bar Disconnected from hypervisor to Attempting to connect to hypervisor Connected to hypervisor at "qemu:///system" Hypervisor: "QEMU" version: 0.32.656 There are 0 active and 2 inactive domains foo (non-active) bar (non-active) Disconnected from hypervisor
-