[gnome-boxes] vm-creator: Start under-installation domain
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes] vm-creator: Start under-installation domain
- Date: Tue, 21 Aug 2012 13:20:51 +0000 (UTC)
commit 9394ac0da37df20127bbc3cac283ed52a8cbc993
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date: Mon Aug 20 22:24:52 2012 +0300
vm-creator: Start under-installation domain
When domain is still under installation at shutdown, its most probably
because we ask libvirt to shutdown on guest reboot (to activate the new
configuration).
https://bugzilla.gnome.org/show_bug.cgi?id=682300
src/vm-creator.vala | 16 ++++++++++------
1 files changed, 10 insertions(+), 6 deletions(-)
---
diff --git a/src/vm-creator.vala b/src/vm-creator.vala
index 07791e5..f864b69 100644
--- a/src/vm-creator.vala
+++ b/src/vm-creator.vala
@@ -107,12 +107,16 @@ private class Boxes.VMCreator {
machine.disconnect (state_changed_id);
machine.vm_creator = null;
} else {
- if (!VMConfigurator.is_live_config (machine.domain_config))
- return;
-
- // No installation during live session, so lets delete the VM
- machine.disconnect (state_changed_id);
- App.app.delete_machine (machine);
+ if (VMConfigurator.is_live_config (machine.domain_config)) {
+ // No installation during live session, so lets delete the VM
+ machine.disconnect (state_changed_id);
+ App.app.delete_machine (machine);
+ } else
+ try {
+ domain.start (0);
+ } catch (GLib.Error error) {
+ warning ("Failed to start domain '%s': %s", domain.get_name (), error.message);
+ }
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]