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).
VMware Workstation vs. Player
GNS3 supports both VMware Workstation Pro and VMware Fusion (Paid software), as well as VMware Player (Free software).
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.
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
Import GNS3 VM into VMware Workstation
In this section, you will learn how to import the GNS3 VM into VMware Workstation on your local Windows PC.
This document assumes that you already have VMware Workstation installed on your local Windows PC. Please refer to VMware documentation for the process to download and install VMware Workstation.
Extract the downloaded .zip archive:
This extracts the “GNS3 VM.ova” file stored within the compressed archive, in order to import it into VMware Workstation.
In VMware Workstation, click 'Open a Virtual Machine':
Navigate to the directory where the extracted GNS3 VM.ova is located, and click 'Open' to open the OVA:
Leave the virtual machine name as 'GNS3 VM', and click 'Import':
With VMware Player it’s recommended to keep the default location. GNS3 will try to detect VMs outside, but unlike Workstation VMware Player doesn’t offer a central database with all VMs location.
VMware Workstation will import the GNS3 VM:
The GNS3 VM will show as available in VMware Workstation. Leave all settings at their defaults:
Congratulations! You have successfully imported the GNS3 VM. In the next section you will integrate GNS3 with the GNS3 VM.
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)
Local GNS3 VM Setup Wizard
The GNS3 Setup Wizard is displayed when GNS3 starts up for the first time. This provides an easy way to initially configure GNS3 options:
Manually Starting the Setup Wizard
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':
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'.
A connection validation screen will appear:
If successful, click 'Next'. If this connection attempt was unsuccessful for any reason, there possible remedies are to:
- Confirm the path to the gns3server.exe file is correct, and try a different address/port for the host binding
- 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.
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':
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 uploaded image is shown. Click 'Next' to continue the setup:
The Name and platform window displays. Confirm the Platform selection, and configure the router Name as desired and click 'Next':
A Default RAM setting is displayed. It is important that you check your Router's minimum memory requirements using the Cisco website. Click the Check for minimum and maximum RAM requirement option:
The Cisco Feature Navigator is opened in your default web browser. Select Image Name and enter the name of the image you are using:
Click Search for Image(s):
The minimum DRAM requirements for the IOS are displayed. Note the value for your IOS image:
Set the Default RAM value to the value recommended by the Cisco Feature Navigator (yours may be different to the screenshot) and click 'Next':
Select your preferred Network adapters. This is device dependant. With this c3725 image, we can only add adapters to slots 0, 1, and 2, with slot 0 prepopulated with GT96100-FE dual Fast Ethernet adapter. Which adapters you can add, and how many slots you are allowed to install adapters to is device dependent. Click 'Next':
WIC modules can now be added. Again, it’s device dependent on whether WIC slots are available, but WIC-1T and WIC-2T serial modules will be available on devices that support WICs. Once completed, click Click 'Next':
It is important for optimum GNS3 performance that an Idle-PC value be selected. If a green Idle-PC value is NOT shown then click the 'Idle-PC finder' button to find an Idle-PC value. This c3725 happens to already have an optimum idle-pc value predefined, so it’s OK to click 'Finish':
If your device does NOT have an idle-pc value predefined, click the Idle-PC finder button in the upper-right to initiate that process.
It is important for optimum GNS3 performance that an Idle-PC value be selected. If a green Idle-PC value is NOT shown then click the 'Idle-PC finder' button to find an Idle-PC value.
If you selected the Idle-PC finder button (only necessary if no value was detected automatically), GNS3 will calculate a value:
An Idle-PC value is displayed. Click 'OK' to complete:
If no Idle-PC value is displayed, try clicking the ‘Idle-PC finder’ button again. You may also need to reboot your computer and try again is no value is found.
Click 'Finish' to complete the GNS3 Setup Wizard.
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.
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!
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.
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:
Once apt has completed the upgrade process, enter the following commands:
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:
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:
Power down the GNS3 VM, and then launch the GNS3 GUI. Now, you should be able to run QEMU/KVM VMs without issue!