[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
- A Proxmox VE host and access to its web interface.
- A CPU with hardware virtualization (Intel VT-x with EPT or AMD-V with RVI). GNS3 runs SONiC as nested virtual machines.
- 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.
- Go to https://gns3.com/software/download-vm.
- Select VMware ESXi.
- Go to https://github.com/GNS3/gns3-gui/releases.
- In the Assets of the release, download the GNS3 VM file for VMware ESXi.
Step 2: Create the virtual machine
-
Open the Proxmox web interface and click Create VM.
-
Type a name for the VM, for example
GNS3, and click Next. -
Select Do not use any media and click Next.
-
Set SCSI Controller to VirtIO SCSI.
-
Remove the default disk. You import the disks of the GNS3 VM in Step 3.
-
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.
-
Set the memory and click Next.
-
Examine the network settings and click Next. The GNS3 VM gets its IP address from DHCP on this bridge.
-
Click Finish to create the VM.
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.
-
Select the Proxmox node and open the Shell tab.
-
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>
If the file is a ZIP archive, extract it first:
unzip <file>.zip -
Extract the OVA file. You get two disk files (
.vmdk):tar -xvf "GNS3 VM.ova"
-
Import the two disks into the VM. Replace
100with your VM ID andlocal-lvmwith 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 qcow2to each command. LVM storage (local-lvm) always uses the raw format. -
Select the VM and open the Hardware tab. Double-click Unused Disk 0 and click Add. Do the same for Unused Disk 1.
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
-
Open Options > Boot Order. Enable the first imported disk and move it to the top.
-
Open the Console tab and click Start Now.
-
When the VM is ready, the console shows the IP address of the GNS3 server. Write down this address.
Step 5: Open the GNS3 web interface
In a web browser, open the IP address from Step 4. The GNS3 web interface opens.
To add SONiC to GNS3, create an appliance template (refer to the links at the end of this guide).
Troubleshooting
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).
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 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
Comments
Please sign in to leave a comment.