This article covers how to redirect FreeBSD in KVM to the serial port.
FreeBSD does support a dumb terminal on a serial port as a console.
This is useful for quick login or debug guest system problem without using ssh.
1. First, login as root using ssh to your guest operating systems:
$ ssh firstname.lastname@example.org
2. Edit /boot/loader.conf, enter:
# vi /boot/loader.conf
3. Append the following entry:
4. Save and close the file. Edit /etc/ttys, enter:
# vi /etc/ttys
5. Find the line that read as follows:
ttyd0 "/usr/libexec/getty std.9600" dialup off secure
6. Update it as follows:
ttyd0 "/usr/libexec/getty std.9600" vt100 on secure
7. Save and close the file. Reboot the guest, enter:
8. After reboot, you can connect to FreeBSD guest as follows from host (first guest the list of running guest operating systems):
# virsh list
Id Name State
3 ographics running
4 freebsd running
9. Now, connect to Freebsd guest, enter:
virsh console 4
virsh console freebsd