How to set up GNS3 server on Proxmox?

STORDIS-gns3-proxmox-banner-3200x1200.png

[stordis-toc]

Introduction

GNS3 lets you build and test SONiC networks without physical switches. The GNS3 VM is a ready virtual machine with the GNS3 server. You do not need to install GNS3 manually.

This guide shows how to import the GNS3 VM into Proxmox VE, start it and open the GNS3 web interface.

Prerequisites

  1. A Proxmox VE host and access to its web interface.
  2. A CPU with hardware virtualization (Intel VT-x with EPT or AMD-V with RVI). GNS3 runs SONiC as nested virtual machines.
  3. Internet access on the Proxmox host, or another way to copy the GNS3 VM file to the host (for example scp).
Resource Recommended for the GNS3 VM
CPU 8 or more cores (for example Intel Core i7/i9, AMD Ryzen 7/9 or a server CPU)
RAM 32 GB or more. Each SONiC VS node uses approximately 8 GB.
Disk 80 GB or more on SSD storage

 

What you need

  • The GNS3 VM for VMware ESXi. This version contains an OVA file that Proxmox can import (refer to Step 1).
  • A free VM ID in Proxmox. In this guide: 100.
  • The name of the Proxmox storage for the disks. In this guide: local-lvm.

Step 1: Download the GNS3 VM

Download the VMware ESXi version of the GNS3 VM. Use the same version as your GNS3 client.

GNS3 website (recommended) GitHub
  1. Go to https://gns3.com/software/download-vm.
  2. Select VMware ESXi.

GNS3 VM download page with the VMware ESXi option


Step 2: Create the virtual machine

  1. Open the Proxmox web interface and click Create VM.

    Create VM button in Proxmox

  2. Type a name for the VM, for example GNS3, and click Next.

    General tab with the VM name

  3. Select Do not use any media and click Next.

    OS tab with the Do not use any media option

  4. Set SCSI Controller to VirtIO SCSI.

    System tab with VirtIO SCSI controller

  5. Remove the default disk. You import the disks of the GNS3 VM in Step 3.

    Disks tab with the default disk removed

  6. Set the number of cores (refer to the table in Prerequisites). Set Type to host. The GNS3 VM needs the CPU virtualization functions of the host.

    CPU tab with cores and the host CPU type

  7. Set the memory and click Next.

    Memory tab

  8. Examine the network settings and click Next. The GNS3 VM gets its IP address from DHCP on this bridge.

    Network tab

  9. Click Finish to create the VM.

    Confirm tab with the summary


Step 3: Import the disks from the OVA file

The new VM has no disks. You cannot start it before you import the two disks of the GNS3 VM.

New GNS3 VM in the Proxmox resource tree

  1. Select the Proxmox node and open the Shell tab.

    Shell tab of the Proxmox node

  2. Copy the GNS3 VM file to the host, or download it directly. Replace the URL with the link from Step 1:

    wget <URL-of-the-GNS3-VM-file>

    Download of the GNS3 VM file in the Proxmox shell

    If the file is a ZIP archive, extract it first: unzip <file>.zip

  3. Extract the OVA file. You get two disk files (.vmdk):

    tar -xvf "GNS3 VM.ova"

    Extracted OVA file with two VMDK disks

  4. Import the two disks into the VM. Replace 100 with your VM ID and local-lvm with your storage:

    qm importdisk 100 GNS3_VM-disk1.vmdk local-lvm
    qm importdisk 100 GNS3_VM-disk2.vmdk local-lvm

    For a directory storage (for example local), add --format qcow2 to each command. LVM storage (local-lvm) always uses the raw format.

    Output of qm importdisk

  5. Select the VM and open the Hardware tab. Double-click Unused Disk 0 and click Add. Do the same for Unused Disk 1.

    Hardware tab with the two imported disks

CAUTION

Attach both disks. The GNS3 VM does not operate correctly with only one disk.


Step 4: Set the boot order and start the VM

  1. Open Options > Boot Order. Enable the first imported disk and move it to the top.

    Boot Order with the first imported disk at the top

  2. Open the Console tab and click Start Now.

    Console tab with the Start Now button

  3. When the VM is ready, the console shows the IP address of the GNS3 server. Write down this address.

    GNS3 VM console with the IP address of the server


Step 5: Open the GNS3 web interface

In a web browser, open the IP address from Step 4. The GNS3 web interface opens.

GNS3 web interface in a browser

To add SONiC to GNS3, create an appliance template (refer to the links at the end of this guide).


Troubleshooting

GNS3 shows that KVM is not available

The GNS3 VM needs nested virtualization. On the Proxmox host, make sure that it is on. The command shows Y or 1 when it is on:

cat /sys/module/kvm_intel/parameters/nested   # Intel CPU
cat /sys/module/kvm_amd/parameters/nested     # AMD CPU

Also make sure that the CPU type of the VM is host (Step 2).

The VM does not start from the disk

Make sure that both disks are attached (Step 3) and that the first imported disk is at the top of the boot order (Step 4).

The console shows no IP address

The GNS3 VM gets its address from DHCP. Make sure that the network bridge of the VM (Step 2) is connected to a network with a DHCP server.


Procedure completion

Congratulations!

You have successfully set up the GNS3 server on Proxmox. Now you can add SONiC and build virtual networks for tests and training.

Happy networking!

 

Useful links:

How to create a new GNS3 appliance template to work with SONiC using GNS3 Web UI?

How to create a new GNS3 appliance template to work with SONiC using GNS3 Desktop Client?

How to create a new GNS3 appliance template to work with SONiC using Linux shell?

How to set up GNS3 server on VirtualBox?

 

For more free resources, visit: https://stordis.com/free-resources/

Comments 0

Articles in this section