How to set up GNS3 server on VMware ESXi?

STORDIS-gns3-esxi-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 deploy the GNS3 VM on VMware ESXi, configure it, start it and open the GNS3 web interface.

Prerequisites

  1. VMware ESXi 8.0 and access to its web interface (ESXi Host Client). The GNS3 VM also operates on ESXi 5.5–7.0, but the screens are different. This guide does not show vSphere.
  2. A CPU with hardware virtualization (Intel VT-x with EPT or AMD-V with RVI). GNS3 runs SONiC as nested virtual machines.
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
Disk 80 GB or more on an SSD datastore

What you need

  • The GNS3 VM for VMware ESXi (refer to Step 1). Use the same version as your GNS3 client.
  • A datastore with enough free space.
  • A network with a DHCP server for the GNS3 VM.

Step 1: Download the GNS3 VM

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

The file is a ZIP archive. Extract it. It contains the file GNS3 VM.ova.


Step 2: Deploy the VM from the OVA file

  1. Open the ESXi web interface and click Create/Register VM.

    Create/Register VM in the ESXi Host Client

  2. Select Deploy a virtual machine from an OVF or OVA file and click Next.

    Deploy a virtual machine from an OVF or OVA file

  3. Type a name for the VM. Drag the file GNS3 VM.ova into the blue box, or click it to select the file.

    Name of the VM and the selection of the OVA file

    OVA file selected

  4. Select the datastore and click Next.

    Selection of the datastore

  5. Set the deployment options (network mapping, disk provisioning) and click Next.

    Deployment options

  6. Click Finish. Wait until the upload of the disks is complete. Do not close the browser tab during the upload.

    Progress of the disk upload


Step 3: Create a port group for GNS3

GNS3 connects lab devices to the network. The port group must accept traffic of other MAC addresses.

  1. Select Networking > Port groups > Add port group.

    Add port group in ESXi Networking

  2. Type the name GNS3 and select the virtual switch. Open Security and set Promiscuous mode, MAC address changes and Forged transmits to Accept. Click Add.

    Port group GNS3 with all security options set to Accept


Step 4: Configure the VM

  1. Select the GNS3 VM and click Edit settings.

    Edit settings of the GNS3 VM

  2. Set CPU and Memory (refer to the table in Prerequisites). Set Network Adapter 1 to the port group GNS3.

    CPU, memory and network adapter settings

  3. Open CPU and select Expose hardware assisted virtualization to the guest OS. Click Save.

    CPU option Expose hardware assisted virtualization to the guest OS selected

CAUTION

Without hardware assisted virtualization, GNS3 cannot start SONiC with KVM.


Step 5: Start the VM and open the GNS3 web interface

  1. Select the GNS3 VM and click Power on.

    Power on button in ESXi

  2. The console shows the start of the VM.

    Console during the start of the GNS3 VM

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

    GNS3 VM console with the IP address of the server

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

    GNS3 web interface with a new project

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

Power off the VM. In Edit settings > CPU, select Expose hardware assisted virtualization to the guest OS (Step 4). Make sure that virtualization is enabled in the BIOS of the ESXi host.

The deployment of the OVA file fails

The web interface can have problems with large OVA files. Extract the OVA file (for example with 7-Zip or tar -xvf "GNS3 VM.ova"). Then in Step 2, select the .ovf file and the .vmdk files together.

The console shows no IP address

The GNS3 VM gets its address from DHCP. Make sure that the port group GNS3 is on a virtual switch with an uplink to a network with a DHCP server.


Procedure completion

Congratulations!

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

Happy networking!

 

Useful links:

How to install and configure GNS3 Desktop Client (Windows / Linux / Mac)?

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 GNS3 Web UI?

How do I set the full connection speed for the cloud in GNS3 running on VMware ESXi?

 

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

Comments 0

Articles in this section