OSETC TECH

How to Exit a “Virsh Console” Connection in Linux

This post will guide you how to exit from a vm console in your KVM hypervior system. when you enter into a vm guest using “virsh console vmName” command, and you may be want to know how to get out from this “virsh console”.

Exit a “virsh console” Connection


If you want to get out from a virsh console connection in your KVM guest, and you can use an keyboard shortcuts as followss:

CTRL + SHIFt + 5

or

CTRL + SHIFT + ]

Note: the above shortcuts are only valid in the English Keyboard. If you are using other language keybaord, and you can refer to the following shortcuts to exit “virsh console” connection from your kvm guest.

Danish keyboard: Ctrl+Shift+^¨~
English keyboard: Ctrl+Shift+5 Ctrl+Shift+]
French keyboard: Ctrl+Shift+5 Ctrl+Shift+$€* (OS X)
German keyboard: Ctrl+Shift+5 Strg+Shift+5 ctrl+alt+6 (Mac)
Norwegian keyboard: Ctrl+Shift+^¨~ 
Swedish keyboard: Ctrl+Shift+å (OS X)

If you want to see more info about virsh console command, you can type the following command:

$ virsh help console

outputs:

devops@devops:~$ virsh help console
NAME
console - connect to the guest console

SYNOPSIS
console <domain> [--devname <string>] [--force] [--safe]

DESCRIPTION
Connect the virtual serial console for the guest

OPTIONS
[--domain] <string> domain name, id or uuid
--devname <string> character device name
--force force console connection (disconnect already connected sessions)
--safe only connect if safe console handling is supported