[CentOS] CentOS 7 kernel console under KVM?
Paul Heinlein
heinlein at madboa.com
Wed Oct 8 17:01:55 UTC 2014
On Wed, 8 Oct 2014, Nux! wrote:
> For my templates I use:
> grubby --update-kernel=ALL --args="crashkernel=0 at 0 video=1024x768 console=ttyS0,115200n8 console=tty0 consoleblank=0"
In kickstart files for CentOS 7 VMs that run in what I still think of
as runlevel 3, I use a somewhat simpler recipe:
bootloader --location=mbr --append="console=ttyS0"
On the VM, that translates into /etc/default/grub looking something
like this:
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL="serial console"
GRUB_SERIAL_COMMAND="serial"
GRUB_CMDLINE_LINUX="rd.lvm.lv=vg0/vmroot console=ttyS0 crashkernel=auto vconsole.font=latarcyrheb-sun16 vconsole.keymap=us"
GRUB_DISABLE_RECOVERY="true"
When the VM boots, it's then easy to run "virsh console YOURVM" to
attach to the serial console.
--
Paul Heinlein
heinlein at madboa.com
45°38' N, 122°6' W
More information about the CentOS
mailing list