linux: never more get stuck using virsh console

When you are managing virtual machines using virsh you have the capability to connect to the VM’s virtual serial console using the following command:

virsh console domain [devname] [--safe] [--force]

–safe: the connection is only attempted if the driver supports safe console
–force requesting to disconnect any existing sessions, such as
in a case of a broken connection.

Once connected you can do anything you want and then, go back to the host. Here is the trick part. As soon as you disconnect from the VM you will go back back to its login prompt, for example:

Debian GNU/Linux 8 debian-openstack hvc0

debian-openstack login:

The question here is: how do I go back to my host console? The answer is simple:

Ctrl+5 or Ctrl+]


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s