How to exit a "virsh console" connection?

Is there any special characters involved? I want to be able to open a console connection in my application and exit upon completion of a task


To get out from a "virsh console": With an english keyboard try:

 # Ctrl+]
 # Ctrl+5

All those special keys are a great problem when using another keyboards than UK. Please provide with more examples below for different languages and OS.

  • OSX Swedish map:
Ctrl+'å'

  • 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)

  • Brettetete
    • Ctrl++