virsh console and tty size

Posted by pehrs on Server Fault See other posts from Server Fault or by pehrs
Published on 2010-12-20T13:31:44Z Indexed on 2010/12/22 14:55 UTC
Read the original article Hit count: 225

Filed under:
|
|

I have a virtualization server to which I connect over ssh. If I now change the size of the window it will automatically propagate to the server. It's most easily seen using stty -a, checking the columns and row values.

I then use virsh console to connect to the serial interface on a KVM based virtual machine. When I now change the size of the window it does not propagate to the virtual server. This is most easily seen by checking stty -a, which is not updated on the virtual machine when I change window size. This means that line breaks does not work correctly in the terminal and any application that relies on window size for formatting (emacs, man, etc) gets messed up unless the window size on the client matches the default size on the server.

A workaround is to manually set the window size to match the client window using stty, but I wonder if there is any way to get this information to propagate and set the window size in the virtual machine automatically.

© Server Fault or respective owner

Related posts about linux

Related posts about terminal