GNS3 - Both Graphical and Telnet Console for QEMU VM
In GNS3 you can configure a graphical console (VNC or Spice) or a telnet console for a QEMU VM, but you can’t have both simultaneously. In some situations it would be nice to have access to both consoles, so let’s try that.
From the technical point of view there is no reason for this restriction, these consoles connect to different virtual hardware, that are working independently. The graphical console uses the virtual video card and keyboard, while the telnet console uses the virtual serial (COM1) interface. On the QEMU command line you are able to configure both interfaces, it’s a GNS3 limitation for not supporting that. A workaround is to get one console configured by GNS3, the missing console type can be configured in the additional settings of QEMU.
The additional settings can be changed in the node configuration of a specific node. I don’t recommend using the VM templates in the QEMU preferences for that. Each device needs a unique device/port number, that’s not possible by using VM templates.
Adding Graphical Console to Devices with Telnet Console
The main console of a device uses telnet,
-vnc :<display number> into the additional settings
for having an extra graphical console.
For the VNC display number use any number from 0 - 99,
that is not in use by another device.
As GNS3 allocates numbers starting with 0 it’s a good idea
to use a high number,
for example 55 as in the screenshot above.
Then start the device. The telnet console can be opened within the GNS3 GUI, but the graphical console needs to be started manually. First we need to find out the IP address of the VNC console. It’s the same as the IP address of the telnet console, shown in GNS3 in the topology summary of the device.
Now start your VNC program and
open a connection to that IP address and the display number you configured.
Some VNC clients don’t use the display number, they need a port number.
For these use port
5900 + <display number>,
so for display 55 enter port 5955.
Adding Telnet Console to Devices with Graphical Console
Likewise for devices using graphical consoles as their main console,
telnet has to be configured in the additional settings,
By default GNS3 uses the ports 5000 - 10000 for telnet,
starting with port 5000.
So choose a port quite high in this range, for example 5555.
But be sure to use a port, that’s not allocated to another device.
After starting the device, you can open the graphical console by GNS3. Then start your telnet application (for example PuTTY). Like in the previous section use the IP address of the VNC/Spice console shown in the topology summary. The port is the same you configured in the additional settings.