Gns3 Virtualbox

Posted : admin On 1/25/2022

To run virtual nodes in a simulated network, the GNS3 open-source network simulator supports two virtualization technologies: Qemu and VirtualBox. The open-source routers we will use in a GNS3 simulated network must run on either a Qemu or a VirtualBox hypervisor. Depending on one’s requirements, one might choose either VirtualBox or Qemu.

Let me tell you why I prefer VirtualBox over Qemu when using GNS3 to simulate a network of Linux computers running open-source routing and switching software.

Qemu

Gns3 Virtualbox

Qemu is an open-source hardware-emulation and virtualization platform. The GNS3 project provides filesystem images of Qemu-compatible Linux systems that have open-source routing software installed.

Qemu is available for the most common operating systems, Linux, Windows, and Mac OS. It supports virtualization of x86-compatible systems on hosts with x86-based CPUs and can emulate other types of microprocessors on an x86-based host computer (which is not relevant in my specific case).

Qemu cannot access hardware virtualization support — Intel’s VT-x or AMD’s AMD-V hardware-virtualization features — in most operating systems, except Linux, which results in slower performance. Qemu can access hardware virtualization support by using KVM in the Linux operating system but this only works if the guest filesystem image is the same architecture as the host operating system (for example: both the host and guest systems must be 64-bit operating systems). The Qemu appliances provided by the GNS3 project are all 32-bit systems (i686 architecture) but, in my case, I am running a 64-bit operating system (x86_64 architecture). So, when I use the Qemu appliances provided by the GNS3 project, I do not benefit from access to hardware virtualization support and I experience slow start times and high CPU utilization.

You can obtain the GNS3-VM in several ways. You can download it via Select either the Virtualbox, VMware Workstation/Fusion, or VMware ESXi versions. These will be.zip archives, so make sure you choose “Save as” when downloading them, and then extract them for import into your hypervisor of choice. GNS3 is an open source Network Simulator that is used to emulate, configure, test and troubleshoot virtual and real networks. GNS3 can run on Windows, Linux and MacOS. It can also run on a virtualized environment such as VMware, Docker and Virtualbox. Below are some of the features of GNS3.

In GNS3, It is simple to set up Qemu and use the provided Qemu appliances. The user does not need to prepare all virtual nodes in advance. GNS3 Qemu virtual nodes can be created when they are needed – each will be based on a base filesystem image and Qemu sets up a separate copy-on-write filesystems for each virtual Qemu node that the user creates in a GNS3 project. One can use the same base Qemu appliance image in different projects and make changes to the virtual nodes in one project without impacting virtual nodes in another project.

When running GNS3 on a Linux host, I saw that Wireshark could not capture data passing between Qemu quest systems. But, capturing data with Wireshark and Qemu worked when I ran GNS3 in a the Microsoft Windows operating system. This appears to be a defect that affects the Linux version of GNS3. Since I am using Linux, this is a problem for me.

Gns3 virtualbox image

VirtualBox

VirtualBox is another open-source virtualization technology available in the Linux, Windows, and Mac OS operating systems. VirtualBox is an open-source project but some extensions, while free of charge, are not open-source. The GNS3 project provides VirtualBox-compatible Linux filesystem images that have open-source routing software installed.

VirtualBox can access the hardware virtualization features — Intel’s VT-x or AMD’s AMD-V hardware-virtualization — in most modern PC microprocessors and this works consistently well in all operating systems that can run VirtualBox (Linux, Windows, and MacOS). VirtualBox only works on computers that run x86-compatible CPUs such as Intel and AMD but that limitation is not an issue in most use-cases where we also need to use GNS3 on a laptop or PC because most computers that will run either Linux, Windows, or Mac OS will use a CPU that is also compatible with VirtualBox.

Also, when using Wireshark to capture data running between nodes in the GNS3 simulation running in Linux, I encountered no issues. Data capture also works well when using GNS3 with VirtualBox in Windows.

One minor issue is that we must create a unique virtual machine disk image for every node that will be used in a simulation and, if we wish to save changes made to the nodes, we would not want to re-use these virtual machine disk images in other GNS3 projects because changes made in one project might change the behavior of the simulated network in another GNS3 project. For larger simulated networks, we may need to create many virtual machines in VirtualBox. Then, each of these needs to be set up separately in GNS3 before they can be used. These extra steps are not complicated but they do make it a bit less convenient to use VirtualBox, compared to using Qemu.

Conclusion

VirtualBox works consistently well and has better performance in my specific case. Qemu performs slower and has some issues in Linus when working with GNS3. The requirement to set up many virtual machines, each with its own disk image (or a clone of a master disk image) in VirtualBox is only a minor problem and does not outweigh the other benefits of using VirtualBox in my situation.

If I missed anything, I welcome your comments.

Related posts:

This section describes how to install and set up Cumulus VX with VirtualBox and GNS3 to create the two leaf and one spine topology shown below.

In the topology, leaf01 and leaf02 are the access layer switches on the network. leaf01 and leaf02 connect to spine01, which is the aggregation layer switch on the network. To facilitate additional configuration after the initial setup descibed in this guide, leaf01 and leaf02 also have two connections to each other.

Follow the steps below to:

  • Create three VMs (leaf01, leaf02, and spine01) and the network connections between them
  • Log into the switches
  • Perform basic switch configuration
  • Verify configuration

These steps were tested with Cumulus VX 4.2, VirtualBox version 6.1.12, and GNS3 version 2.2.11 on macOS version 10.14.6.

Create and Configure the VMs

The following procedure creates leaf01, leaf02, and spine01 and the network connections between them. This section assumes you have VirtualBox and GNS3 experience.

Download and Install the Software

  1. Download and install VirtualBox.
  2. Download and install GNS3.
  3. Download the VirtualBox OVA image.

Create VMs in VirtualBox

The Cumulus VX OVA image defines the CPU, memory, and disk requirements. Cumulus VX requires at least 768MB of RAM and 6GB of disk space.

CumulusVX versions 4.3 and later requires 2 vCPUs.

Follow these steps for each VM (leaf01, leaf02, and spine01)

  1. Open the VirtualBox application and select Import Appliance from the File menu.
  2. Browse for the OVA disk image you downloaded, click the Open button, then click Continue.
  3. In the Appliance settings, change the name of the VM to leaf01, then click Import to begin the import process.
  4. In the VirtualBox Manager window, right click the leaf01 VM, then select Clone.
  5. Change the name of the VM to leaf02, then click Continue.
  6. Make sure Full Clone is selected, then click Clone.
  7. Repeat steps 4 through 6 to create spine01.

Configure GNS3

  1. Open the GNS3 application and create a new project.

  2. From the GNS3 menu, select Preferences.

  3. From the left pane of the Preferences dialog, select VirtualBox. Then, in the Path to VBoxManage field, enter the location where VBoxManage is installed. For example: /usr/bin/VBoxManage.

  4. From the left pane, select VirtualBox VMs, then click New. The VM list shows the VirtualBox VMs you set up earlier.

  5. From the VM list, select leaf01, then click Finish. The VM you selected appears in the center pane. Repeat this step for leaf02 and spine01.

  6. Enable GNS3 to work with the network interfaces of the VirtualBox VMs:

    1. In the center pane, select leaf01 then click Edit.

    2. In the VirtualBox VM template configuration dialog, click the Network tab.

    3. Increase the number of Adapters to 4.

    4. From the Type dropdown, select Paravirtualized Network.

    5. Select Allow GNS3 to use any configured VirtualBox adapter.

    6. Click OK to save your settings and close the dialog.

    7. Repeat these steps for leaf02 and spine01, then click OK to close the Preferences dialog.

Create Network Connections

Create the network connections between leaf01, leaf02, and spine01, as shown in the two leaf, one spine topology above.

  1. Click (Browse all Devices button), then from the End Devices panel, drag leaf01, leaf02, and spine01 to the console.
  2. Click the (cable icon), then connect the leafs and spine by selecting the network interfaces, as shown in the Topology Summary below:
    • e1 in GNS3 corresponds to swp1 in Cumulus VX
    • e2 in GNS3 corresponds to swp2 in Cumulus VX
    • e3 in GNS3 corresponds to swp3 in Cumulus VX
  1. Start the VMs.

Gns3 Vm Install

Log into the Switches

Log into each switch with the cumulus account and default password cumulus. When you log in for the first time, you are prompted to change the default password.

If you are using Cumulus VX 4.1.1 or earlier, the default password is CumulusLinux!. You are not prompted to change the default password.

For more information on the required password change, see the Cumulus Linux documentation.

Basic Switch Configuration

Run these commands on each switch to change the hostname and bring up theinterfaces. Exit the switch, then log back in to see the new hostname at theprompt.

Verify Configuration

Gns3 Virtualbox Setup Windows 10

Run the following commands on each switch to verify the configuration:

It might take a few minutes for the LLDP information to update. If your command output is different from the output shown below, wait a few minutes, then run the command again.

Run the following commands on each switch to show system information:

Gns3 Virtualbox Installation

Next Steps

  • Read the Cumulus Linux User Guide to learn about using Cumulus Linux and test out features on your switches.
  • Visit the NVIDIA Cumulus web site, which offers many resources to help you understand Cumulus Linux.
  • Try some of the advanced configuration. You can update your virtual environment to be able to use the Cumulus Linux on demand self-paced labs (a quick and easy way to learn the fundamentals). You can also run the topology converter to simulate a custom network topology with VirtualBox and Vagrant, or KVM-QEMU and Vagrant.
  • Try Cumulus in the Cloud, which is a free, personal, virtual data center network that provides a low-effort way to see Cumulus Networks technology in action. This is a good way to try out Cumulus Linux if you have platform or disk limitations.