[gnome-boxes/keep-on-importing-non-qcow2] vm-importer: Keep on importing non-qcow2 InstalledMedias
- From: Felipe Borges <felipeborges src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes/keep-on-importing-non-qcow2] vm-importer: Keep on importing non-qcow2 InstalledMedias
- Date: Tue, 7 Apr 2020 09:00:32 +0000 (UTC)
commit 97f2b52ca5e43eda060169a9d581c9e72909945a
Author: Felipe Borges <felipeborges gnome org>
Date: Tue Apr 7 10:58:12 2020 +0200
vm-importer: Keep on importing non-qcow2 InstalledMedias
Compressed qcow2 images need to be extracted, vmdk disks don't
support snapshots, etc, etc...
We let users be free about the location of their qcow2 files, but
we can't offer the same treatment for files in other formats.
That's a bit of https://ometer.com/preferences.html
Fixes #508
src/vm-configurator.vala | 2 +-
src/vm-importer.vala | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/vm-configurator.vala b/src/vm-configurator.vala
index 361b5882..13b61f5e 100644
--- a/src/vm-configurator.vala
+++ b/src/vm-configurator.vala
@@ -79,7 +79,7 @@ public static Domain create_domain_config (InstallerMedia install_media, string
clock.add_timer (timer);
domain.set_clock (clock);
- if (install_media is InstalledMedia)
+ if (install_media is InstalledMedia && install_media.device_file.has_suffix ("qcow2"))
target_path = install_media.device_file;
set_target_media_config (domain, target_path, install_media);
diff --git a/src/vm-importer.vala b/src/vm-importer.vala
index 5a25f9d0..71002317 100644
--- a/src/vm-importer.vala
+++ b/src/vm-importer.vala
@@ -20,8 +20,8 @@ public override void launch_vm (LibvirtMachine machine, int64 access_last_time =
machine.vm_creator = this;
machine.config.access_last_time = (access_last_time > 0)? access_last_time : get_real_time ();
- if (clone) {
- import_vm (machine);
+ if (clone || !source_media.device_file.has_suffix ("qcow2")) {
+ import_vm.begin (machine);
} else {
post_import_setup.begin (machine);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]