GNS3 / gns3-server

GNS3 server
GNU General Public License v3.0
811 stars 263 forks source link

GNS3 qemu issues with ubuntu 18.04 #2243

Closed vlgermanov closed 1 year ago

vlgermanov commented 1 year ago

GNS3 Version: GNS3 v2.2.40.1 Operating System: Linux - Ubuntu 18.04

I have a problem after the upgrade to 2.2.40.1 on ubuntu 18.04 with qemu (with 2.2.39 everything was working okay):

user@laptop:~$ lsb_release -a
No LSB modules are available.
Distributor ID:    Ubuntu
Description:    Ubuntu 18.04.6 LTS
Release:    18.04
Codename:    bionic

user@laptop:~$ dpkg -l | grep gns3
ii  gns3-gui                                    2.2.40.1~bionic1                                amd64        GNS3 GUI
ii  gns3-iou                                    0.0.3~bionic1                                   amd64        GNS3 support for IOU
ii  gns3-server                                 2.2.40.1~bionic1                                amd64        GNS3 server

user@laptop:~$ dpkg -l | grep qemu
ii  ipxe-qemu                                   1.0.0+git-20180124.fbe8c52d-0ubuntu2.2          all          PXE boot firmware - ROM images for qemu
ii  ipxe-qemu-256k-compat-efi-roms              1.0.0+git-20150424.a25a16d-0ubuntu2             all          PXE boot firmware - Compat EFI ROM images for qemu
ii  qemu-block-extra:amd64                      1:2.11+dfsg-1ubuntu7.42                         amd64        extra block backend modules for qemu-system and qemu-utils
ii  qemu-kvm                                    1:2.11+dfsg-1ubuntu7.42                         amd64        QEMU Full virtualization on x86 hardware
ii  qemu-system-common                          1:2.11+dfsg-1ubuntu7.42                         amd64        QEMU full system emulation binaries (common files)
ii  qemu-system-x86                             1:2.11+dfsg-1ubuntu7.42                         amd64        QEMU full system emulation binaries (x86)
ii  qemu-utils                                  1:2.11+dfsg-1ubuntu7.42                         amd64        QEMU utilities

Example of trying to start Mikrotik CHR:

QEMU process has stopped, return code: 1

Start QEMU with /usr/bin/qemu-system-x86_64 -name MikroTik-hap-ax3 -m 384M -smp cpus=1,sockets=1 -enable-kvm -machine smm=off -boot order=c -drive file=/home/user/GNS3/projects/mikrotik/project-files/qemu/eda9ef54-93e8-48ae-9dcb-cb52b7a3e83e/hda_disk.qcow2,if=virtio,index=0,media=disk,id=drive0 -uuid eda9ef54-93e8-48ae-9dcb-cb52b7a3e83e -serial telnet:127.0.0.1:5005,server,nowait -monitor tcp:127.0.0.1:40115,server,nowait -net none -device virtio-net-pci,mac=0c:a9:ef:54:00:00,speed=10000,duplex=full,netdev=gns3-0 -netdev socket,id=gns3-0,udp=127.0.0.1:10005,localaddr=127.0.0.1:10004 -device virtio-net-pci,mac=0c:a9:ef:54:00:01,speed=10000,duplex=full,netdev=gns3-1 -netdev socket,id=gns3-1,udp=127.0.0.1:10007,localaddr=127.0.0.1:10006 -device virtio-net-pci,mac=0c:a9:ef:54:00:02,speed=10000,duplex=full,netdev=gns3-2 -netdev socket,id=gns3-2,udp=127.0.0.1:10009,localaddr=127.0.0.1:10008 -device virtio-net-pci,mac=0c:a9:ef:54:00:03,speed=10000,duplex=full,netdev=gns3-3 -netdev socket,id=gns3-3,udp=127.0.0.1:10011,localaddr=127.0.0.1:10010 -device virtio-net-pci,mac=0c:a9:ef:54:00:04,speed=10000,duplex=full,netdev=gns3-4 -netdev socket,id=gns3-4,udp=127.0.0.1:10013,localaddr=127.0.0.1:10012 -nographic

Execution log:
qemu-system-x86_64: warning: host doesn't support requested feature: cpuid.80000001h:ECX.svm [bit 2]
qemu-system-x86_64: -device virtio-net-pci,mac=0c:a9:ef:54:00:00,speed=10000,duplex=full,netdev=gns3-0: Property '.speed' not found

Example of trying to start F5:

QEMU process has stopped, return code: 1

Start QEMU with /usr/bin/qemu-system-x86_64 -name F5BIG-IPLTMVE16.0.0.1-1 -m 4096M -smp cpus=1,sockets=1 -enable-kvm -machine smm=off -boot order=c -drive file=/home/user/GNS3/projects/f5-test/project-files/qemu/34da2dac-6bc4-4016-992c-fdddebdc2399/hda_disk.qcow2,if=virtio,index=0,media=disk,id=drive0 -drive file=/home/user/GNS3/projects/f5-test/project-files/qemu/34da2dac-6bc4-4016-992c-fdddebdc2399/hdb_disk.qcow2,if=virtio,index=1,media=disk,id=drive1 -uuid 34da2dac-6bc4-4016-992c-fdddebdc2399 -serial telnet:127.0.0.1:5001,server,nowait -monitor tcp:127.0.0.1:34727,server,nowait -net none -device virtio-net-pci,mac=0c:da:2d:ac:00:00,speed=10000,duplex=full,netdev=gns3-0 -netdev socket,id=gns3-0,udp=127.0.0.1:10003,localaddr=127.0.0.1:10002 -device virtio-net-pci,mac=0c:da:2d:ac:00:01,speed=10000,duplex=full,netdev=gns3-1 -netdev socket,id=gns3-1,udp=127.0.0.1:10005,localaddr=127.0.0.1:10004 -device virtio-net-pci,mac=0c:da:2d:ac:00:02,speed=10000,duplex=full,netdev=gns3-2 -netdev socket,id=gns3-2,udp=127.0.0.1:10007,localaddr=127.0.0.1:10006 -device virtio-net-pci,mac=0c:da:2d:ac:00:03,speed=10000,duplex=full,netdev=gns3-3 -netdev socket,id=gns3-3,udp=127.0.0.1:10009,localaddr=127.0.0.1:10008 -device virtio-net-pci,mac=0c:da:2d:ac:00:04,speed=10000,duplex=full,netdev=gns3-4 -netdev socket,id=gns3-4,udp=127.0.0.1:10011,localaddr=127.0.0.1:10010 -device virtio-net-pci,mac=0c:da:2d:ac:00:05,speed=10000,duplex=full,netdev=gns3-5 -netdev socket,id=gns3-5,udp=127.0.0.1:10013,localaddr=127.0.0.1:10012 -device virtio-net-pci,mac=0c:da:2d:ac:00:06,speed=10000,duplex=full,netdev=gns3-6 -netdev socket,id=gns3-6,udp=127.0.0.1:10015,localaddr=127.0.0.1:10014 -device virtio-net-pci,mac=0c:da:2d:ac:00:07,speed=10000,duplex=full,netdev=gns3-7 -netdev socket,id=gns3-7,udp=127.0.0.1:10017,localaddr=127.0.0.1:10016 -nographic -smp 2 -cpu host

Execution log:
qemu-system-x86_64: -device virtio-net-pci,mac=0c:da:2d:ac:00:00,speed=10000,duplex=full,netdev=gns3-0: Property '.speed' not found

Also I can not downgrade to 2.2.39 as the packages are missing in the repo :(

spikefishjohn commented 1 year ago

Dang, so the problem is your qemu needs to be upgraded an GNS3 doesn't have a check for which version is installed.

Quick fix, edit your server

Speed/duplex change for virt-io driver

If you comment out this it should work.

from: gns3server/compute/qemu/qemu_vm.py

                if adapter_type == "virtio-net-pci":
                    device_string = "{},speed=10000,duplex=full".format(device_string)

The other option would be upgrade ubuntu (or qemu). I'm not sure which version of qemu brought in that feature.

spikefishjohn commented 1 year ago

Looks like the missing feature for speed and duplex was added in qemu 2.12 and ubuntu 18.04 has 2.11.

FYI 18.04 ended LTS this month I believe.

grossmj commented 1 year ago

Speed and duplex will only be added with Qemu version >= 2.12 in the next release. Thanks for catching this 👍