[gnome-boxes/wip/fix-clones-regression-conflict-with-iface] libvirt-machine, vm-configurator: WIP
- From: Felipe Borges <felipeborges src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes/wip/fix-clones-regression-conflict-with-iface] libvirt-machine, vm-configurator: WIP
- Date: Thu, 16 Sep 2021 13:09:41 +0000 (UTC)
commit 09c9e6b7f22a58d973a1bacd81cea1cdcefef4f5
Author: Felipe Borges <felipeborges gnome org>
Date: Thu Sep 16 15:09:01 2021 +0200
libvirt-machine, vm-configurator: WIP
src/libvirt-machine.vala | 6 ------
src/vm-configurator.vala | 2 +-
2 files changed, 1 insertion(+), 7 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);
diff --git a/src/vm-configurator.vala b/src/vm-configurator.vala
index 02b01758..2270885e 100644
--- a/src/vm-configurator.vala
+++ b/src/vm-configurator.vala
@@ -313,7 +313,7 @@ else if (device is DomainDisk) {
// If user interface device was found and it needs to be bridged
if (iface != null) {
var bridge = is_libvirt_bridge_net_available ();
- if (bridge && (iface is DomainInterfaceUser)) {
+ if ((bridge && (iface is DomainInterfaceUser)) || VMConfigurator.is_libvirt_cloning_config
(domain)) {
var virtio = iface.get_model () == "virtio";
devices.prepend (create_network_interface (domain, bridge, virtio));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]