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
> @@ -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)
>
> +/* 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,
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
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
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 +++
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
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/
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
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
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-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
12 matches
Mail list logo