ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    KVM Console Access

    IT Discussion
    kvm linux virtualization how-to
    2
    2
    777
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • stacksofplatesS
      stacksofplates
      last edited by

      So you can always access the console for a VM via Virt-Manager. But if you want to access the console from the hypervisor itself, it's fairly easy.

      Using a CentOS 7 VM, you just need to append console=tty0 console=ttyS0,115200 to the kernel line in your grub config.

      grubby --update-kernel $(grubby --default-kernel) --args="console=tty0 console=ttyS0,115200"
      

      Reboot the VM, and type

      virsh console <Domain>
      

      You may run into an issue with libvirt telling you the console is already being accessed. Just restart libvirt with systemctl restart libvirtd and you will be able to pull up the console.

      [root@kvm jhooks]# virsh console Bind
      Connected to domain Bind
      Escape character is ^]
      jhooks
      Password: 
      Last login: Mon May  2 19:07:58 on ttyS0
      [jhooks@ns1 ~]$
      

      As the output says, to escape the console type ctrl+].

      1 Reply Last reply Reply Quote 2
      • mlnewsM
        mlnews
        last edited by

        thanks!

        1 Reply Last reply Reply Quote 1
        • 1 / 1
        • First post
          Last post