GNS3 / gns3-gui

GNS3 Graphical Network Simulator
http://www.gns3.com
GNU General Public License v3.0
2.13k stars 434 forks source link

Multiple QEMU versions #2720

Closed Belabacsi closed 5 years ago

Belabacsi commented 5 years ago

Dear Jeremy! Dear GNS3 Dev Team!

I'm contacting You because I would like to submit a new feature request for GNS3. I have done a quick check and did not find any similar request already submitted.

My question is that, would it be possible to select which QEMU version to be used for a template or a specific host? The GNS3 default install contains only QEMU version v2.5.0, which is relatively an old version. For example, in case of Cisco Nexus 9000v, the documentation says the following:

"Extra 3+ minutes are required to boot up the system due to significant PCI scan time on kernel boot-up. The Qemu 2.9.93 (the tested version) is recommended to reduce the VM boot up time. Typical VM boot up time is proximately 5-6 minutes for all 128 data port interfaces to be able to pass the traffic in a large topology system. Any previous released Qemu version could take longer time to boot up the VM." Source: https://www.cisco.com/c/en/us/td/docs/switches/datacenter/nexus9000/sw/7-x/nx-osv/configuration/guide/b_Cisco_Nexus_9000v/b_Cisco_Nexus_9000v_chapter_011.html#concept_1C4584D8C8844076BF07A147D3F080AB

As I have been using several Nexus 9Kv images in my lab, and in order to be able to use the recommended setup, I have compiled a newer QEMU version in /opt/qemu-2.11.1/bin/ folder. In order to be able to select and use it in GNS3, I needed to do the following: ln -s /opt/qemu-2.11.1/bin/qemu-system-x86_64 /bin/qemu-system-x86_64

Do You think if it is possible to place more QEMU versions into the /opt/ folder to be able to select different versions for different templates/objects?

[OS: Ubuntu Server 16.04.5 LTS] [GNS3: v2.1.11]

Thank You very much in advance for the support! Best Regards, Belabacsi

Belabacsi commented 5 years ago

gns3-qemu

grossmj commented 5 years ago

Hi,

For info our next major release will come with Qemu version 2.11 by default.

In order to be able to select and use it in GNS3, I needed to do the following: ln -s /opt/qemu-2.11.1/bin/qemu-system-x86_64 /bin/qemu-system-x86_64

The GNS3 server uses $PATH to find Qemu. You could also have added /opt/qemu-2.11.1/bin/ to $PATH.

Do You think if it is possible to place more QEMU versions into the /opt/ folder to be able to select different versions for different templates/objects?

I think we may do something like this for the GNS3 VM. Can you provide us with the instructions you used in order to compile Qemu? (I know they can be found by Googling however I want to know if you did something differently).

Thanks!

Belabacsi commented 5 years ago

Dear Jeremy!

Thank You for the feedback and info, I'll try to add more QEMU versions to /opt/ folder and add it to PATH. Please see below the steps what I did to compile QEMU.

Best Regards, Belabacsi

mkdir /opt/qemu-2.11.1
mkdir /opt/qemu-2.11.1-src

apt-get install build-essential gcc pkg-config libglib2.0-dev libpixman-1-dev libsdl1.2-dev libaio-dev libcap-dev libattr1-dev

cd /opt/qemu-2.11.1-src
wget https://download.qemu.org/qemu-2.11.1.tar.xz
tar xvJf qemu-2.11.1.tar.xz

cd /opt/qemu-2.11.1-src/qemu-2.11.1

./configure --target-list=x86_64-softmmu,i386-softmmu --enable-kvm --prefix=/opt/qemu-2.11.1
make
make install 

ln -s /opt/qemu-2.11.1/bin/qemu-img /bin/qemu-img
ln -s /opt/qemu-2.11.1/bin/qemu-io /bin/qemu-io
ln -s /opt/qemu-2.11.1/bin/qemu-nbd /bin/qemu-nbd
ln -s /opt/qemu-2.11.1/bin/qemu-system-i386 /bin/qemu-system-i386
ln -s /opt/qemu-2.11.1/bin/qemu-system-x86_64 /bin/qemu-system-x86_64
grossmj commented 5 years ago

Thanks a lot for the instructions. We will include more versions of Qemu with our next GNS3 VM (based on Ubuntu 18.04).

Belabacsi commented 5 years ago

Dear Jeremy!

Great, thank You for the update :-)

As You mentioned, theoretically making symbolic links is not needed, just we will need to add each QEMU folder to the PATH variable. So I think You can ignore my last "ln -s" lines.

Best Regards, Belabacsi