cmdref.net - Cheat Sheet and Example

cmdref.net is command references/cheat sheets/examples for system engineers.

User Tools

Site Tools


Sidebar








Etc


Reference














.

middleware:virtualization:kvm:console_login.html



Configuration of console login to the KVM Guest

Overview

You muset setting up for 'virsh console DOMAIN'


Method1 : Configuration (You need reboot)

Guest OS : /etc/grub.conf

add 'console=tty0 console=ttyS0,115200n8'

#kernel /vmlinuz-2.6.18-238.el6 ro root=/dev/***
kernel /vmlinuz-2.6.18-238.el6 ro root=/dev/***   console=tty0 console=ttyS0,115200n8

Guest OS : /etc/inittab

#add
S0:12345:respawn:/sbin/agetty ttyS0 115200


Method2 : CentOS7

Guest OS : /etc/default/grub

#Before
GRUB_CMDLINE_LINUX="crashkernel=auto rhgb quiet"

#After
GRUB_CMDLINE_LINUX="crashkernel=auto console=ttyS0,115200n8r"
# grub2-mkconfig -o /boot/grub2/grub.cfg

Guest OS : /etc/securetty

# vi /etc/securetty
ttyS0       <- add


Method3 : CentOS6 (You don't need reboot)

Guest OS : /etc/grub.con

# vi /etc/grub.conf
kernel /vmlinuz-2.6.18-238.el6 ro root=/dev/***   console=tty0 console=ttyS0,115200n8

Guest OS : /etc/securetty

# vi /etc/securetty
ttyS0       <- add
# initctl list
serial stop/waiting

# initctl start serial DEV=ttyS0 SPEED=115200
serial (ttyS0) start/running, process 1644 


Method4 : CentOS5 (You don't need reboot)

Guest OS : /etc/securetty

# vi /etc/securetty
ttyS0

Guest OS : /etc/inittab

# vi /etc/inittab
S0:12345:respawn:/sbin/agetty ttyS0 115200
# telinit q



middleware/virtualization/kvm/console_login.html.txt ยท Last modified: 2019/06/06 by admin

Page Tools