Control Linux VMware virtual machine over serial port
02 Jun 2016
It can be useful when you test network communications and you don't want to see SSH traffic in wireshark.
Add serial port to VM
How to add a serial port to your VM is described in detail in this article.
Configure Linux on VM
First, you need to check that you do actually have a serial port:
user@debian:~$ dmesg | grep tty
[0.000000] console [tty0] enabled
[2.720937] 00:05: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A
So here we have one serial port ttyS0
with baud rate 115200.
Next, we need to enable getty
on this port:
systemctl enable serial-getty@ttyS0.service
systemctl start serial-getty@ttyS0.service
That's all. Now we can try to connect.
Connect over serial port with PuTTY
Just choose 'Serial', enter port name to 'Serial line' and baud rate to 'Speed':