From 0b6436d2cb898f16fae55a7cfa343d2dd9400ee0 Mon Sep 17 00:00:00 2001 From: Raizo62 Date: Sat, 3 Jun 2023 11:48:55 +0200 Subject: [PATCH] qemu : with network adapter_type equal to "virtio-net-pci", fix the speed to 10000 and duplex to full. The values are actually fake. (https://github.com/GNS3/gns3-gui/issues/3476) --- gns3server/compute/qemu/qemu_vm.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gns3server/compute/qemu/qemu_vm.py b/gns3server/compute/qemu/qemu_vm.py index 6a8ef00b..2a111021 100644 --- a/gns3server/compute/qemu/qemu_vm.py +++ b/gns3server/compute/qemu/qemu_vm.py @@ -2150,6 +2150,8 @@ class QemuVM(BaseNode): else: # newer QEMU networking syntax device_string = "{},mac={}".format(adapter_type, mac) + if adapter_type == "virtio-net-pci": + device_string = "{},speed=10000,duplex=full".format(device_string) bridge_id = math.floor(pci_device_id / 32) if bridge_id > 0: if pci_bridges_created < bridge_id: