How to exit console in L2 vm?

Pavel Hrdina phrdina at redhat.com
Mon Nov 30 07:28:14 UTC 2020


On Mon, Nov 30, 2020 at 02:50:33PM +0800, Yalan Zhang wrote:
> Hi,
> 
> I have a question about nested virtualization. The scenario is as below:
> 1. Prepare the nested environment, start L2 guest.
> 2. On the host, connect the L1 vm console, then on L1 guest, connect the L2
> guest console:
> (host)# virsh console L1_vm
> Connected to domain L1_vm
> Escape character is ^] (Ctrl + ])
> ...
> (L1 vm)# virsh console L2_vm
> Connected to domain L2_vm
> Escape character is ^] (Ctrl + ])
> ...
> (L2 vm)# <=== press " ^] " to exit the console, it return to the **host**
> (host)#
> 
> Is it expected that "^]" in L2 guest will exit thoroughly to the host, not
> the L1 guest?
> Thank you!

Hi,

With virsh you can configure different escape character.

It could look like this for example:

On host you would run:

    virsh console L1_vm


and in the L1 VM you would run this:

    virsh -e ^[ console L2_vm


For more info check the virsh man page.

Pavel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20201130/59279e25/attachment.sig>


More information about the libvirt-users mailing list