[libvirt] [libvirt-glib] Add gvir_domain_update_device() and enums needed for it

2012-11-13 Thread Alexander Larsson
This is a wrapper for virDomainUpdateDeviceFlags. --- libvirt-gobject/libvirt-gobject-domain.c | 42 libvirt-gobject/libvirt-gobject-domain.h | 17 + libvirt-gobject/libvirt-gobject.sym | 7 ++ 3 files changed, 66 insertions(+) diff --git a/l

Re: [libvirt] [PATCH 09/11] Inhibit desktop shutdown while any virtual machines are running

2012-11-01 Thread Alexander Larsson
> @@ -728,6 +830,12 @@ void > virNetServerRemoveShutdownInhibition(virNetServerPtr srv) > { > virNetServerLock(srv); > srv->autoShutdownInhibitions--; > + > +VIR_DEBUG("srv=%p inhibitions=%zu", srv, > srv->autoShutdownInhibitions); > + > +if (srv->autoShutdownInhibitions == 0) >

Re: [libvirt] [PATCH 06/11] Make QEMU perform managed save of all VMs on stop of libvirtd

2012-11-01 Thread Alexander Larsson
> +/* Then we save the VMs to disk */ > +for (i = 0 ; i < numDomains ; i++) > +if (virDomainManagedSave(domains[i], flags[i]) < 0) > +ret = -1; Ok, so if any save fails we will report an error. > +VIR_FREE(domains); > +VIR_FREE(flags); > + > +ret = 0; Eh,

[libvirt] [PATCH 1/2] virdbus: Add virDBusGetSessionBus helper

2012-10-09 Thread Alexander Larsson
This splits out some common code from virDBusGetSystemBus and uses it to implement a new virDBusGetSessionBus helper. --- src/libvirt_private.syms | 1 + src/util/virdbus.c | 84 src/util/virdbus.h | 1 + 3 files changed, 66 insertions

[libvirt] [PATCH 0/2] Cleanly save session VMs on logout/shutdown

2012-10-09 Thread Alexander Larsson
VMs are running. This new version is basically the same as the previous, except it runs inside libvirtd, and it exits libvirtd too after saving the VMs. Alexander Larsson (2): virdbus: Add virDBusGetSessionBus helper Shut down session libvirtd cleanly daemon/libvirtd.c| 244

[libvirt] [PATCH 2/2] Shut down session libvirtd cleanly

2012-10-09 Thread Alexander Larsson
When the session dies or when the system is going to be shut down we save all active VMs and exit libvirtd. Additionally whenever there is an active domain we hold a shutdown inhibitor to avoid shutting down before all the VMs are saved. --- daemon/libvirtd.c | 244 +++

Re: [libvirt] [PATCH 3/3] Add new libvirt-babysitter tool

2012-10-09 Thread Alexander Larsson
On tis, 2012-10-09 at 12:14 +0100, Daniel P. Berrange wrote: > On Mon, Oct 08, 2012 at 04:57:49PM +0200, Alexander Larsson wrote: > > This helper registers with the session bus and libvirt and ensures > > that we properly save the state when the session exits. It does this

[libvirt] [PATCH 2/3] virdbus: Add virDBusGetSessionBus helper

2012-10-08 Thread Alexander Larsson
This splits out some common code from virDBusGetSystemBus and uses it to implement a new virDBusGetSessionBus helper. --- src/util/virdbus.c | 84 +- src/util/virdbus.h | 1 + 2 files changed, 65 insertions(+), 20 deletions(-) diff --git a/src/

[libvirt] [PATCH 3/3] Add new libvirt-babysitter tool

2012-10-08 Thread Alexander Larsson
This helper registers with the session bus and libvirt and ensures that we properly save the state when the session exits. It does this in two ways: 1) Whenever the session dbus connection is disconnected (typically due to a logout) we save all domains in the session libvirtd. 2) Whenever there i

[libvirt] [PATCH 1/3] Fix typo in HAVE_DBUS automake conditional

2012-10-08 Thread Alexander Larsson
The variable that is set in the script is with_dbus, not have_dbus. --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 6d50985..767e06c 100644 --- a/configure.ac +++ b/configure.ac @@ -1251,7 +1251,7 @@ if test "$with_dbus" = "yes

[libvirt] [PATCH 0/3] Cleanly save session VMs on logout/shutdown

2012-10-08 Thread Alexander Larsson
inside libvirtd itself. If not, who will launch the babysitter? Alexander Larsson (3): Fix typo in HAVE_DBUS automake conditional virdbus: Add virDBusGetSessionBus helper Add new libvirt-babysitter tool configure.ac | 2 +- src/util/virdbus.c | 84 ++ src

[libvirt] [libvirt-glib PATCH] Add wrappers for virDomainPMWakeup

2012-10-03 Thread Alexander Larsson
--- libvirt-gobject/libvirt-gobject-domain.c | 87 libvirt-gobject/libvirt-gobject-domain.h | 11 libvirt-gobject/libvirt-gobject.sym | 4 ++ 3 files changed, 102 insertions(+) diff --git a/libvirt-gobject/libvirt-gobject-domain.c b/libvirt-gobject/lib