change or set novnc window size

rcd

Active Member
Jul 12, 2019
245
23
38
62
How can i set VM console sizes to match the available novmc window size? When I connect to a VM from my laptop thorugh novnc there are more lines than novnc can display without using scroll bars. I can change novnc settings in proxmox from local to scale, but then the font gets tiny and I can't read it. Is there a way to tell the VM OS make the window smaller (fewer lines) ?
 
If you set your scaling mode in the NoVNC settings to local scaling you can force NoVNC to have a scroll bar. Then, after logging into your VM OS, you can change the screen resolution to something smaller in the OS's settings menu (e.g. if you are using Ubuntu, you can open the Settings->Displays and set the resolution there)
 
If you set your scaling mode in the NoVNC settings to local scaling you can force NoVNC to have a scroll bar. Then, after logging into your VM OS, you can change the screen resolution to something smaller in the OS's settings menu (e.g. if you are using Ubuntu, you can open the Settings->Displays and set the resolution there)
Sorry but I don't understand what you are saying here. The novnc window is a browser window, i don't understand how that links to an OS setting menu. Do you mean the target OS? It is headless, it is a console, no GUI. I use both Debian and Centos.

Also, with local scaling set to off I see scrollbars, otherwise the window scales and the font becomes unreadably small on my screen.
 
Last edited:
Do you mean the target OS?
Yes. You can increase the fontsize of the debian TTY by following the chosen answer from this askubuntu thread: [1]. Alternatively, you could change your screen resolution and turn "local scaling" off in the NoVNC menu [2].

But if you are running your VMs headless, wouldn't it be easier to ssh into your vms instead of using NoVNC? That is, if they are on your network. That way the terminal you ssh in from manages the font size.


[1]: https://askubuntu.com/questions/173220/how-do-i-change-the-font-or-the-font-size-in-the-tty-console
[2]: https://askubuntu.com/questions/54067/how-to-safely-change-grub2-screen-resolution
 
They are not on my network, they are remote servers and until network has been configured, which often has to be done manually, the only way is through console.

The default fontsize is fine, the problem is the window has more lines than can fit on my laptop screen. If I use my desktop with a massive screen there is no problem, but I don't always have that option (if for example I'm somewhere else). It is inconvenient having to scroll up and down and left and right to see the whole window. I can choose to scale the window but then the font becomes tiny.
 
Not sure if it will help, but for VMs without network I use a virtual serial console (requires some setup inside the VM) and the xterm.js console.
 
  • Like
Reactions: noel.
I am a little confused. What are you trying to achieve?
The VM is set at certain resolution and the TTY in this VM is running at a certain font size. When you get your VMs display through NoVNC, you have the option to either:
  • turn "local scaling" off in NoVNC. This way the resolution of the VM is kept 1:1. But since your NoVNC window is smaller than the actual resolution of the VMs display, you get scroll bars.
  • turn "local scaling on" in NoVNC. This way the NoVNC window is scaled to contain the entire display of the VM. Since it has to scale the display down, the font gets smaller.
So you can either decrease the resolution of your VM or increase the font size.
 
Not sure if it will help, but for VMs without network I use a virtual serial console (requires some setup inside the VM) and the xterm.js console.

I've been trying to get that to work, but I think it means having to hack grub right?

I am a little confused. What are you trying to achieve?
The VM is set at certain resolution and the TTY in this VM is running at a certain font size. When you get your VMs display through NoVNC, you have the option to either:
  • turn "local scaling" off in NoVNC. This way the resolution of the VM is kept 1:1. But since your NoVNC window is smaller than the actual resolution of the VMs display, you get scroll bars.
  • turn "local scaling on" in NoVNC. This way the NoVNC window is scaled to contain the entire display of the VM. Since it has to scale the display down, the font gets smaller.
So you can either decrease the resolution of your VM or increase the font size.

What I am trying to archive? I thought that was obvious. When I create a new VM under Proxmox in Hetzner, manual correction of the network configuration is required in order to get any network access, so I need to login through VNC to edit one or two network files, depending on the distro. In the past I would get a standard 24 x 80 console window which easily fits into my 2k laptop screen with a readable font size. Now it seems for some reason I get a window with around 50-60 lines that no longer fit on my screen, so I have to use scroll bars to get around. That is inconvenient. I just need to limit the number of characters/lines to standard 24 x 80, then it would be fine. Having to hack grub or anything else is not a usable solution, that just moves the inconvenience of navigating the screen from the network configuration to the grub configuration, or whatever needs to be edited.

What do you mean about resolution of my VM, it is a CONSOLE WINDOW, NOT A GUI. It has no resolution, it has lines and charcters.
 
I've been trying to get that to work, but I think it means having to hack grub right?
I would not call it hacking but yes? All I do is add console=ttyS0 to GRUB_CMDLINE_LINUX (and console=tty0 if you also want display output) and change #GRUB_TERMINAL=comsole to GRUB_TERMINAL=serial. Add a virtual Serial Port (serial0) (of type socket) to the VM and set Display to Serial terminal 0 (serial0).
 
I would not call it hacking but yes? All I do is add console=ttyS0 to GRUB_CMDLINE_LINUX (and console=tty0 if you also want display output) and change #GRUB_TERMINAL=comsole to GRUB_TERMINAL=serial. Add a virtual Serial Port (serial0) (of type socket) to the VM and set Display to Serial terminal 0 (serial0).

What do you mean by "if I also want display output"? Like in xwindows? I'm a non-gui operation, everything happens on CLI, no windows. In any case, the objective is to avoid having to do anything in the guest OS. I used to get a 80x24 window, now it's more like a 160x60 or something window (haven't actually counted, but the window far exceeds what a standard console screen can display). Something must have changed in Proxmox since version 6.x.
 
What do you mean by "if I also want display output"? Like in xwindows? I'm a non-gui operation, everything happens on CLI, no windows.
Sill you have some output on your virtual display with noVNC, right? That is what I meant but feel free to leave that out and go serial console only.
In any case, the objective is to avoid having to do anything in the guest OS. I used to get a 80x24 window, now it's more like a 160x60 or something window (haven't actually counted, but the window far exceeds what a standard console screen can display). Something must have changed in Proxmox since version 6.x.
I did not realize that you don't want changes inside the VM. Sorry for the irrelevant replies about serial consoles.
Maybe something changed in the guest OS too? Things most likely changed in QEMU/KVM and SeaBIOS or OVMF. Maybe the guest OS now finds a bigger framebuffer for the text console? You have set Display to none? Otherwise, changing it might influence the virtual display resolution or you can change it in the virtual BIOS/UEFI sometimes (press ESC when the VM boots).
 
Sill you have some output on your virtual display with noVNC, right? That is what I meant but feel free to leave that out and go serial console only.

I did not realize that you don't want changes inside the VM. Sorry for the irrelevant replies about serial consoles.
Maybe something changed in the guest OS too? Things most likely changed in QEMU/KVM and SeaBIOS or OVMF. Maybe the guest OS now finds a bigger framebuffer for the text console? You have set Display to none? Otherwise, changing it might influence the virtual display resolution or you can change it in the virtual BIOS/UEFI sometimes (press ESC when the VM boots).

What output might that be? I just want a standard text console. This is the tty01, that you can login directly with root, that you can use without network and gui. It typically shows some log output too, whether anyone logged into it or not. Sorry if this comes across as a little grumpy, but I just don't understand why it is so hard for me to explain what a console is and why it is needed to manage servers, virtual or not.

Normally a physical console is limited to 80 characters x 25 lines, and normally the OS respect that automatically on boot up. Somehow the Proxmox console must tell the client OS that is has 50 lines for some reason. There must be a way to change that to something else, like 25. It used to be standard, I haven't noticed it with Proxmox 6.

It is not related to which bios or which console type is used. If I set display to none novnc can't connect. I've always used default, which I think has always been standard VGA.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!