[gnome-boxes/wip/fix-clones-regression-conflict-with-iface: 8/8] libvirt-machine: Don't recreate network interface while clonning




commit b48b424445ef45abda61253862283efc010c48bc
Author: Felipe Borges <felipeborges gnome org>
Date:   Thu Sep 16 16:07:32 2021 +0200

    libvirt-machine: Don't recreate network interface while clonning
    
    Now the VMConfigurator.update_existing_domain() method will recreate
    the network interface when necessary based on the system's and VM's
    current state.
    
    Fixes #694

 src/libvirt-machine.vala | 6 ------
 1 file changed, 6 deletions(-)
---
diff --git a/src/libvirt-machine.vala b/src/libvirt-machine.vala
index 144e8407..b11c2d45 100644
--- a/src/libvirt-machine.vala
+++ b/src/libvirt-machine.vala
@@ -759,12 +759,6 @@ public override async void clone () {
 
             var media = new LibvirtClonedMedia (storage_volume.get_path (), config);
 
-            // Recreate network interface so clones won't have the same mac address
-            var iface= VMConfigurator.create_network_interface (config,
-                                                                is_libvirt_bridge_net_available (),
-                                                                media.supports_virtio_net);
-            config.add_device (iface);
-
             var vm_cloner = media.get_vm_creator ();
             var clone_machine = yield vm_cloner.create_vm (null);
             vm_cloner.launch_vm (clone_machine, this.config.access_last_time, true);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]