[gnome-boxes] Allocate storage to pure live media
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes] Allocate storage to pure live media
- Date: Wed, 7 Dec 2011 13:09:30 +0000 (UTC)
commit 94f45c8bdbce1f89c1dee8f3d5cab6962371c135
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date: Wed Nov 30 02:18:40 2011 +0200
Allocate storage to pure live media
We use qcow2 so it doesn't really matter if storage goes unused but we
should do this just in case our knowledge/assumption about inavailability
of installer is wrong.
https://bugzilla.gnome.org/show_bug.cgi?id=665254
src/vm-creator.vala | 11 +++--------
1 files changed, 3 insertions(+), 8 deletions(-)
---
diff --git a/src/vm-creator.vala b/src/vm-creator.vala
index ae1826a..39fbd2b 100644
--- a/src/vm-creator.vala
+++ b/src/vm-creator.vala
@@ -33,9 +33,7 @@ private class Boxes.VMCreator {
else
name = install_media.label;
- string target_path = null;
- if (install_media.os_media.installer)
- target_path = yield create_target_volume (name, resources.storage);
+ var target_path = yield create_target_volume (name, resources.storage);
var xml = get_virt_xml (install_media, name, target_path, resources);
var config = new GVirConfig.Domain.from_xml (xml);
@@ -65,7 +63,7 @@ private class Boxes.VMCreator {
yield connection.fetch_storage_pools_async (cancellable);
}
- private string get_virt_xml (InstallerMedia install_media, string name, string? target_path, Resources resources) {
+ private string get_virt_xml (InstallerMedia install_media, string name, string target_path, Resources resources) {
// FIXME: This information should come from libosinfo
var clock_offset = "utc";
if (install_media.os != null && install_media.os.short_id.contains ("win"))
@@ -135,10 +133,7 @@ private class Boxes.VMCreator {
return volume.get_path ();
}
- private string get_target_media_xml (string? target_path) {
- if (target_path == null)
- return "";
-
+ private string get_target_media_xml (string target_path) {
return " <disk type='file' device='disk'>\n" +
" <driver name='qemu' type='qcow2'/>\n" +
" <source file='" + target_path + "'/>\n" +
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]