Cluster Management
Thegns3util cluster command group makes it easy to coordinate multiple GNS3 servers and keep their configuration in sync. This page walks through the common workflows for building and maintaining a cluster.
Prerequisites
- Access to each GNS3 server you plan to add to the cluster
- Valid credentials for the servers (set via flags or environment variables)
- A configured
gns3utilbinary (seegetting-started/installation.md)
Create a Cluster
Give your cluster a name and optional description. Creation only needs to run once.--name, the command prompts interactively. Re-run the command with the same name to update the description.
Add Cluster Nodes
Usecluster add-node for one server or cluster add-nodes for multiple servers at once. Supply the server URLs and (optionally) scheduling weights.
GNS3_USER and GNS3_PASSWORD environment variables so you do not have to pass --user and --password every time.
Control Group Capacity
Each node limits how many user groups it can host. Adjust the limit when adding nodes:Manage Cluster Configuration Files
gns3util keeps a local cluster configuration file that you can edit and apply. The config workflow uses three subcommands:
Inspect Clusters
List all clusters or scope the listing to a single name:--raw outputs JSON so you can pipe to jq or other tooling.
Recommended Workflow
- Create the cluster with
cluster create. - Add servers using
cluster add-nodeorcluster add-nodes, assigning weights and group limits. - Run
cluster config syncto capture the state in a file. - Commit the configuration file to version control.
- When changes are needed, edit the file, apply it with
cluster config apply, and re-sync to confirm the database state.
Important limitation: GNS3 clusters do not provide a single shared UI session. Administrators and students must log directly into each server URL they use. As a result,gns3util class lsorexercise lsonly report items on the active server. Treat the cluster feature as a scheduling workaround: targeting--cluster <name>or-s/--serverhits a single node at a time, and a one-node cluster created via--serveris still stored in the local cluster config. Plan class scheduling so each group knows which server (or cluster node) they must connect to.