Intigrate VM To GNS3
Intigrate VM To GNS3
VM
Which Virtualization Software? VirtualBox or
VMware?
In this document we will explain the import of the GNS3 VM for VMware but instructions
for VirtualBox are similar.
VMware is a better option because it’s faster and supports nested virtualization (the
VMs inside the VM are accelerated by your CPU). The speed difference is important
and some VM will be too slow on VirtualBox* (see note).
NOTE
VMware Player requires the installation of additional free software (VMware VIX). If you
forget to install this, GNS3 will prompt you to do so (and open a browser to the link on
VMware’s website). The option for “VIX version 1.17 and later” is sufficient for VMware
Workstation Player version 16.x. For older versions of Player, you’ll need to select a
previous version of VIX that matches your version of Player.
NOTE
You can get 20% off VMware Workstation Pro and VMware Fusion thanks to our deal
with VMware.
VMware ESXi
VMware ESXi is for advanced users only and is not covered by this document.
Video: https://www.youtube.com/watch?v=0T9YZssqDyE
Video: https://www.youtube.com/watch?v=s7CkW9DNS3E
This extracts the “GNS3 VM.ova” file stored within the compressed archive, in order to
import it into VMware Workstation.
Navigate to the directory where the extracted GNS3 VM.ova is located, and
NOTE
If you encounter a message in the GNS3-VM where it states that KVM support is not
available, even if you have a CPU capable of hardware virtualization (modern Intel and
AMD CPUs all support this), please confirm that it has been enabled in your system
BIOS/UEFI (consult the documentation supplied by your motherboard manufacturer or
PC vendor, to learn how to access this)
You can also manually start the Setup Wizard at any time by clicking Help->Setup
Wizard in the GNS3 software:
Disable Setup Wizard
Optional: You can disable the Setup Wizard from displaying by selecting the ‘Don't show
this again’ checkbox:
Using the GNS3 Setup Wizard
Select 'Run Modern IOS (IOSv or IOU), ASA, and appliances from non-Cisco
manufacturers' in the Wizard and click 'Next':
INFO
This guide explains the Local GNS3 VM server configuration. For a Local Server
(Dynamips) configuration click here.
Even though you’ll be using the GNS3-VM to perform the “heavy lifting” of running your
VMs/images/containers, it’s still necessary to configure the local server settings in
GNS3 before proceeding with the remaining process of configuring the GNS3-VM.
Ensure that the path to the gns3server executable is correct (typically C:\Program
Files\GNS3 in a default installation), and select a Host binding and Port. Selecting the
127.0.0.1 local loopback address tends to be the most trouble-free option to use as a
host binding, but the dropdown menu does contain additional options. Click 'Next'.
1. Confirm the path to the gns3server.exe file is correct, and try a different
address/port for the host binding
2. Create exception/whitelist entries in your antivirus suite for the gns3server,
ubridge, and dynamips executables (or just the entire GNS3 installation directory,
if possible). You’ll need to refer to the relevant documentation of the antivirus
suite you run, in order to perform this step.
NOTE
An additional step that may be necessary is to allow the gns3server, ubridge, and
dynamips executables through the Windows Firewall. The default behavior is for these
to already be allowed through, but it’s well worth double-checking.
The Virtualization software you are going to use needs to be selected. In this
example, VMware (recommended) is selected:
The Setup Wizard will detect the presence of the GNS3 VM in VMware Workstation. If
the GNS3 VM is not displayed, click the 'Refresh' button and ensure that the VM was
imported correctly into VMware Workstation:
Change the vCPU cores and RAM values to the amount that your computer supports
and then click 'Next':
INFO
GNS3 recommends a minimum of 1 vCPU core and 2GB RAM. However, if you want to
run large topologies with many devices, more CPU cores and RAM are recommended.
You can adjust the settings later using the GNS3 GUI. A good rule of thumb is to assign
it half the total amount of available vCPU cores and physical RAM available in your PC.
The below example uses a minimal resource allocation, as it’s being run on a laptop. On
a desktop with an i7 quad-core CPU with hyperthreading and 32GB RAM, allocating the
GNS3 VM 4-6 vCPUs and 16GB RAM will allow for respectable GNS3 topologies to be
running, while still reserving enough resources to task switch between GNS3 and
Windows (or Linux).
After making your allocation choices, click 'Next':
The next page will show a summary of the settings you chose for the GNS3 VM. You
may see a pop up saying “Please Wait”. That’s perfectly normal, as it’s due to GNS3
starting the GNS3 VM up:
Once booted successfully, the IP address of the GNS3 VM will be displayed:
While devices are normally installed using appliance templates found in the GNS3
Marketplace (via the Import Appliance wizard), we’ll manually add a router using
a compatible IOS image, just for a quick example. GNS3 is not limited to just those IOS
images. Other articles (here and here cover importing devices via those appliance
templates via the aforementioned Import Appliance wizard, even compatible IOS
images.
In the GNS3 GUI, click Edit->Preferences->IOS Routers, to reach the correct section
we need to be in:
Click 'New' to begin manually importing and configuring the image.
In the New IOS router template window, select Run the IOS router on the GNS3
VM and click 'Next':
The New IOS router template window displays. Click 'Browse…' to find a local IOS
image on your computer:
Browse to the folder where you have stored your Cisco IOS images (you must supply
your own), select the image and click 'Open':
GNS3 can decompress IOS images to allow for quicker booting of routers in your GNS3
topologies. This is recommended for a better user experience, as IOS image
decompression can take several minutes, even on physical hardware. Click 'Yes' to
uncompress the image:
The image is automatically uploaded to the GNS3 VM (this may take a few moments,
depending on the speed of your PC, and the size of the image/VM).
The Preferences window displays showing the settings you have configured through
the Setup Wizard. Click 'OK' to complete the process:
The New Project Window displays. Give your new Project a Name and click 'OK':
The GNS3 workspace displays:
Congratulations! You are now ready to create your first GNS3 topologies.
NOTE
The Virtualbox developers announced that nested hardware virtualization support was
added to Virtualbox 6.0 for desktops/laptops that have AMD CPUs and since 6.1
supports also Intel CPUs. Questions regarding Virtualbox should be directed Virtualbox
user forums, and not the GNS3 community forums!
NOTE
As of GNS3 2.2.3, the issue where users with AMD CPUs wanting to run the GNS3 VM
in VMware Workstation needed to install a newer kernel has been resolved! It now
works, like it did in past versions, so this workaround is no longer necessary.
Legacy
In case anyone intends on using the older, affected version, We've left the
instructions below. But it is highly recommended to update to the latest version.
(There’s potential risk of data loss, if this process goes awry! Proceed at your own risk!)
Start the GNS3 VM in VMware, while GNS3 itself is shut down. Access the GNS3 VM’s
shell using its text menu. Click OK on the Information screen:
Press the down arrow to highlight “Shell”, and press the Enter key again:
You’ll now be in Bash (the default shell for Ubuntu): We need to upgrade the GNS3
VM’s kernel by entering the following in the CLI:
(note: If you happen to receive this prompt while apt is performing the
upgrade step, select Y (yes):
Once apt has completed the upgrade process, enter the following commands:
cd /tmp/
wget -c https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.2.2/linux-headers-
5.2.2-050202_5.2.2-050202.201907231250_all.deb
wget -c https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.2.2/linux-headers-
5.2.2-050202-generic_5.2.2-050202.201907231250_amd64.deb
wget -c https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.2.2/linux-image-
unsigned-5.2.2-050202-generic_5.2.2-050202.201907231250_amd64.deb
wget -c https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.2.2/linux-modules-
5.2.2-050202-generic_5.2.2-050202.201907231250_amd64.deb
In the above commands, the WGET utility is downloading the packages for the newer
kernel from kernel.ubuntu.com. The next step will install them:
Once those are installed, using the next command will reboot the GNS3 VM:
sudo reboot
After the GNS3 VM has finished rebooting, and you’re back at the information page of
its text menu,, run the following command in the GNS3 VM’s shell, to ensure that it is
using the newer kernel. This is what you want to see:
gns3@gns3vm:~$ uname -r
5.2.2-050202-generic
Power down the GNS3 VM, and then launch the GNS3 GUI. Now, you should be able to
run QEMU/KVM VMs without issue!