Wondering how to redirect FreeBSD Console To A Serial Port? We can help you.
We use KVM to run multiple virtual machines under Redhat Enterprise Linux. FreeBSD is an operating system for a variety of platforms that focuses on features, speed, and stability.
Here at Bobcares, we often get requests from our customers who use KVM for assistance regarding the redirection of FreeBSD console to a serial port as a part of our Server Management Services.
Today we will see how our Support Engineers redirect FreeBSD version 6, 7, or 8 virtual machine console to a serial port using virsh console command for management purpose from the host itself.
Steps to Redirect FreeBSD Console To A Serial Port in KVM using virsh
The below steps are followed by our Support Engineers for this redirection using virsh.
First, we need to log in as root using ssh to guest operating systems.
We can use the following command:
$ ssh bob@freebsd.bobcares.com
su –
After that we need to edit /boot/loader.conf.
# vi /boot/loader.conf
Append the following entry:
console=”comconsole”
We can save and exit the file.
Then edit /etc/ttys as given below:
# vi /etc/ttys
We need to replace the below line:
ttyd0 “/usr/libexec/getty std.9600” dialup off secure
With the following line:
ttyd0 “/usr/libexec/getty std.9600” vt100 on secure
Now, we can save and exit the file.
For rebooting the guest we can use the following command:
# reboot
After reboot, we can connect to FreeBSD guest as follows from the host.
We will first list the running guest operating systems using the following command:
# virsh list
Id Name State
———————————-
3 ographics running
4 freebsd running
Once the list gets displayed we can choose FreeBSD from it.
Finally, we can connect to Freebsd guest using either of the following commands:
virsh console 4
OR
virsh console freebsd
[Still facing issue? We are available 24*7]
Conclusion
In short, we see the steps that our Support Engineers follow to redirect FreeBSD in KVM to the serial port.
0 Comments