0

I've Installed Centos AtomicHost Os on KVM , I just want to enable virsh console on it ! Tried below method but its is not working. 1. Added console=tty0 on /etc/grub/defailt

GRUB_CMDLINE_LINUX="crashkernel=auto rd.lvm.lv=centos/root rd.lvm.lv=centos/swap rhgb quiet console=ttyS0"
  1. Added below lines on virsh edit As per this: https://linuxadmin.io/enable-virsh-console-kvm/
4
  • Could you describe what is not working? Mar 21, 2020 at 12:43
  • I'm unable to login via virsh console , its hang & not showing any login.
    – midhun k
    Mar 22, 2020 at 2:20
  • That is the normal behavior for that image. Why do you need console access? Mar 22, 2020 at 5:13
  • There is no getty running in that image, so no loggin prompt. Mar 22, 2020 at 5:17

1 Answer 1

0

CentOS Atomic images have the serial console redirected to kvm/qemu serial port.

To connect to the serial port and see the boot messages:

virsh list --all   # To list all VMs
virsh shutdown <centos-atomic-VM-name>  # Stop the VM
virsh start --console <centos-atomic-VM-name>   # Connect on the VM's console and start it
2
  • Thanks for your time - but i need to have this serial connection permanent , suppose in some situation if i cant reach the server using ssh then i can use virsh console <vm_name> to access its console
    – midhun k
    Mar 22, 2020 at 2:17
  • You can use virsh console <VM-name> to connect to console when VM is running Mar 22, 2020 at 5:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .