Liberate your terminal from the boundaries of the 80x25 serial console
As a sysadmin, I use SSH a lot. More accurately, my world revolves around SSH.
ESTL’s apps run in virtual machines, but I have to manage the bare metal servers when the occasional need arises. KVM is the hypervisor we use, and sometimes (esp. when the VM goes bonkers and I cannot SSH in), I have to access the VM via a virtual TTY console (ie. virsh console theNameOfTheVM
).
This is the normal workflow when the VM behaves.
laptop$ ssh serverA
serverA$ ssh vm1
vm1$ ./do_my_stuff
This is the workflow when the VM misbehaves.
laptop$ ssh serverA
serverA$ virsh console vm1
vm1$ ./do_my_stuff
The shell provided by libvirt’s virsh console
is exactly like SSH’s in functionality except for one caveat — the shell is limited to a TTY serial console (think: RS-232 era) 80 columns by 25 rows.
If you use virsh console
and ended up stuck in a 80-by-25 screen, you’re not alone. No, do not close your terminal and reopen it. No, do not call the Ghostbusters.
The magic word to get yourself out of this terrible trap is…
reset
If you were expecting more, sorry to disappoint. Run the reset
command in the KVM host, and not in the VM. What reset
does is basically to reinitialise the terminal, and voilà! the limits set by virsh console
.
If this helped you, be nice and click on the heart icon on the page!