[gnome-boxes] Delete associated volume after transient domain is destroyed
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes] Delete associated volume after transient domain is destroyed
- Date: Wed, 7 Dec 2011 13:09:55 +0000 (UTC)
commit 77ee7bffc900cfa3e70edd095bba6bece7597d27
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date: Sat Dec 3 01:11:31 2011 +0200
Delete associated volume after transient domain is destroyed
https://bugzilla.gnome.org/show_bug.cgi?id=665254
src/vm-creator.vala | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/src/vm-creator.vala b/src/vm-creator.vala
index ec0c56c..3492fb1 100644
--- a/src/vm-creator.vala
+++ b/src/vm-creator.vala
@@ -55,8 +55,15 @@ private class Boxes.VMCreator {
if (guest_installed_os (volume)) {
post_install_setup (domain, config, !install_media.live);
domain.disconnect (id);
- } else if (install_media.live)
+ } else if (install_media.live) {
domain.disconnect (id);
+ // Domain is gone then so we should delete associated storage volume.
+ try {
+ volume.delete (0);
+ } catch (GLib.Error error) {
+ warning ("Failed to delete volume '%s': %s", volume.get_path (), error.message);
+ }
+ }
});
return domain;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]