How to Enable the Serial Console for virsh, centos

Questions and answers about how to do stuff
Post Reply
User avatar
pdwalker
Posts: 1553
Joined: 18 Mar 2015 09:16

How to Enable the Serial Console for virsh, centos

Post by pdwalker »

These are the steps I took to allow the serial console in efa build from scratch on Centos to work under kvm/qemu so I can access the server console at all times

Configure the Serial Terminal
vi /etc/init/ttyS0.conf

Code: Select all

stop on runlevel[016]
start on runlevel[345]
respawn
instance /dev/ttyS0
exec /sbin/mingetty /dev/ttyS0
Allow root login via ttyS0
vi /etc/securetty

Code: Select all

# append this to the end of the file:
ttyS0
Start the serial console
initctl start ttyS0

Test the serial console via the host machine
virsh console <efa machine> <enter><enter>

Configure Boot Output to use the serial console as well
vi /etc/grub.conf

Code: Select all

# append to all kernel= lines 
console=ttyS0
# remove from all kernel= lines if they exist
rhgb
quiet
reboot and test

copied entirely from here: https://mcdee.com.au/kvm-virsh-console-access-centos/
User avatar
shawniverson
Posts: 3644
Joined: 13 Jan 2014 23:30
Location: Indianapolis, Indiana USA
Contact:

Re: How to Enable the Serial Console for virsh, centos

Post by shawniverson »

:dance:
Post Reply