[gnome-boxes/WIP/reinstate-gnome-nightly: 1/3] vm-importer, vm-configurator: Import everything but qcow2 disks




commit 4726cfc911906405708d638631ebcf86aa1c0763
Author: Felipe Borges <felipeborges gnome org>
Date:   Thu Jul 23 16:46:05 2020 +0200

    vm-importer, vm-configurator: Import everything but qcow2 disks

 src/vm-configurator.vala | 3 ++-
 src/vm-importer.vala     | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/vm-configurator.vala b/src/vm-configurator.vala
index 4a2fbd49..be3d173a 100644
--- a/src/vm-configurator.vala
+++ b/src/vm-configurator.vala
@@ -79,8 +79,9 @@ 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);
         install_media.setup_domain_config (domain);
diff --git a/src/vm-importer.vala b/src/vm-importer.vala
index b5c8c906..c6de3200 100644
--- a/src/vm-importer.vala
+++ b/src/vm-importer.vala
@@ -20,7 +20,7 @@ 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) {
+        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]