How to Access Linux CLI via Serial Console (GNS3 Telnet Console)
Here is how to access linux command line using a serial console. What I mean is the console that is used on GNS3 console (telnet). Yeah, if we create Linux VM on GNS3 with default configuration, you can only access it with VNC. Maybe if we install the GUI, VNC is the right choice. But when we install linux server (CLI), access it via VNC makes it difficult for me to copy-paste and manage the window. So, I found this way to access my Linux VM by using GNS3's telnet console.
I tested it for Linux on GNS3 and access it via GNS3's telnet console, and it works fine as seen in the animation bellow. I don't know it works for real serial console or not, maybe you must see the full docummentation here:
Ubuntu: Serial Console How to.
Alternatively, we can use a management interface that connects the guest VM to the host and then accesses the guest VM by telnet or SSH. But somehow, I'm not comfortable with that. I prefer to access it directly using the gns3 console by right-click > console, or double-clicking the icon.
Okay, here is how to configure linux guest on gns3 to be accessed via telnet console.
First, open file /etc/default/grub by using text editor (i.e. vi, nano). You must use root user or sudoers users to make changes. Then configure the values of following parameters (add if not exist).
GRUB_CMDLINE_LINUX="console=tty0 console=ttyS0,115200n8" GRUB_TERMINAL=serial GRUB_SERIAL_COMMAND="serial --speed=115200 --unit=0 --word=8 --parity=no --stop=1"
Save the changes. Then update grub cofiguration file by execute the following command as root:
After that, reboot your VM, and done. Now you can access the linux guest VM using GNS3's telnet console. Good luck!