novnc / xtermjs strangeness

Alessandro 123

Well-Known Member
May 22, 2016
653
24
58
40
I have same strange issues with both terminals.

novns is supposed to support window resizing, but when I resize the novnc windows, automatically is restored to the original size, thus, no resize is possible.

additionally, novnc is still triggering a "noVNC encountered an error. Script error." but I don't have anything in browser console.

with xtermjs i'm unable to see VM booting from scratch, only from grub. Is possible to use xtermjs from the start, POST phase included ? Ie, what If I need to access to seabios bios or boot menu ?
 
There is another "issue": if I close an existing terminal (xtermjs or novnc) and then I open it again, all previously running commands are lost.

This is much different than a real VNC, where commands are preserved and is causing many troubles: let's assume a long-running process called from a novnc/xtermjs window over a bad network connection. if connection is lost, the command execution is aborted, exacly like running a long task through SSH.

Any workaround ? I thought that novnc acted as a real VNC (in fact, it's a VNC client) and not like any terminal.
 
novns is supposed to support window resizing, but when I resize the novnc windows, automatically is restored to the original size, thus, no resize is possible.
This is the normal behavior. Resizing is supportet, but this is meant with change some resolution. If you would like real onthefly resizing change to spice and install qxl/spice-agent ... and some desktop with, like xfce. Here tested with KDE-Neon, Desktop resizes there onthefly too.

with xtermjs i'm unable to see VM booting from scratch, only from grub. Is possible to use xtermjs from the start, POST phase included ? Ie, what If I need to access to seabios bios or boot menu ?
Xtermjs is really nice, it was desinged to use with host, lxc and serial terminals. So here the same no bios. Think this is the normal behavior. If you would like to change someting in seabios (I never had to do that) so for configuration change back to vga and novnc.
 
Xtermjs is really nice, it was desinged to use with host, lxc and serial terminals. So here the same no bios. Think this is the normal behavior. If you would like to change someting in seabios (I never had to do that) so for configuration change back to vga and novnc.

Ok for seabios but access to boot menu is sometime useful, you don't have to change the VM boot order from the web interface.

Anyway, why a command run from novnc gets interrupted when novnc is closed?
 
novns is supposed to support window resizing, but when I resize the novnc windows, automatically is restored to the original size, thus, no resize is possible.
'our' novnc has two modes, depending on how you open it:

the console button opens a new window, which tries to resize the window to the resolution inside the vm. the reverse would not work, since the qemu vnc server cannot send a 'resize' command to the vm
if you set it to fullscreen or open the builtin console, the content of the vm display gets scaled

as of now, this is not configurable

with xtermjs i'm unable to see VM booting from scratch, only from grub. Is possible to use xtermjs from the start, POST phase included ? Ie, what If I need to access to seabios bios or boot menu ?
i guess this would work, but you have to set the display of the vm to e.g. 'serial0'
so that the default display is a serial terminal
 
'our' novnc has two modes, depending on how you open it:

the console button opens a new window, which tries to resize the window to the resolution inside the vm. the reverse would not work, since the qemu vnc server cannot send a 'resize' command to the vm
if you set it to fullscreen or open the builtin console, the content of the vm display gets scaled

Yes, I've seen this yesterday.

i guess this would work, but you have to set the display of the vm to e.g. 'serial0'
so that the default display is a serial terminal

Ok, but I have another issue with xtermjs. I've set serial0 to a VM, power cycled the VM but i'm still unable to connect to it via xtermjs.
The same procedure applied to any other VM worked properly.
 
Ok, but I have another issue with xtermjs. I've set serial0 to a VM, power cycled the VM but i'm still unable to connect to it via xtermjs.
powercycle as in "stopped the vm, waited until it stopped, and started again" ? or rebooted (reboot is not enough)

and what problems exactly? a serial terminal output has to be configured inside the vm
 
powercycle as in "stopped the vm, waited until it stopped, and started again" ? or rebooted (reboot is not enough)

Stopped, waited for it and started again.

and what problems exactly? a serial terminal output has to be configured inside the vm
Yes, it's configured, in both, /etc/default/grub and /etc/inittab

I have /dev/ttyS0 set as 115200 but i'm still unable to use xtermjs
 
Anyway, by biggest issue is this:
why a command run from novnc gets interrupted when novnc is closed?

I have to find a way to run commands not bound to the terminal interface, exactly like with any VNC (with VNC you can close the VNC session and command is still running, like it was run with a standard KVM interface [the keyboard-video-mouse interface, not the hypervisor] )
 
I have to find a way to run commands not bound to the terminal interface, exactly like with any VNC (with VNC you can close the VNC session and command is still running, like it was run with a standard KVM interface [the keyboard-video-mouse interface, not the hypervisor] )
for qemu vms and containers, it is like this (novnc just connects to the display of the vm) for the host, the session only runs as long as the browser is open

in any case you could use a progam like 'screen' or 'tmux' to detach a terminal session to the background before closing the window and reattach when you want to continue
 
for qemu vms and containers, it is like this (novnc just connects to the display of the vm) for the host, the session only runs as long as the browser is open

in any case you could use a progam like 'screen' or 'tmux' to detach a terminal session to the background before closing the window and reattach when you want to continue

No other solutions available or planned ? Yes, screen or tmux could be a workaround, but if you start something that should complete shortly and then you have a sudden network loss, you loose everything.
 
i guess this would work, but you have to set the display of the vm to e.g. 'serial0'
so that the default display is a serial terminal

Setting 'serial0' doesn't allow xtermjs to see the whole POST phase, but only from grub (because in grub i've set "console=ttyS0,115200") and it breaks novnc. I've reverted to "default"
 

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!