How to access vm console in KVM QEMU

It is very easy to access vm console in KVM QEMU but, as all the things, if you don’t know how to do it, it is difficult to do. 

First of all, my environment is Centos 7. We assume we have a physical server with 1, 2 or more vm created using KVM QEMU.

Now, using virsh list command we can see the list of running VM in my server:

[root@mykvm ~]# virsh list
Id   Name                                    State
1    virtual-server1                         running
2    virtual-server2                         running
3    virtual-server3                         running

[root@mykvm ~]#

The first column is ID, you need to take this ID value to access vm console in kvm qemu

The comand to use is

virsh console ID

If we need to access console in virtual-server3 we have to do:

[root@mykvm ~]# virsh console 3
Connected to domain virtual-server3
Escape character is ^]

CentOS Linux 7 (Core)
Kernel 3.10.0-1062.7.1.el7.x86_64 on an x86_64

afl-cpe03 login: ostrich
Last login: Mon Feb 30 10:07:23 from
[ostrich@virtual-server3 ~]#
[ostrich@virtual-server3 ~]#

Perfect! Now you are connected in console into your Virtual Server.

But… How can I exit from console? What does it mean Escape character is ^] ?

It is easy, it mean only to type CTRL + ] on your keyboard and you will be back on your kvm server.

If you want to find out more you can have a look at offical documentation or other article in my blog.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.