SPICE Features when connecting to CLI only Guest

ferociousmilkyway

Well-Known Member
Aug 2, 2018
42
2
48
113
Hello,

This is probably a strange use case, and there are many other ways to do the same thing (SSH, xterm.js), but I've been trying to get SPICE clipboard functionality working with a CLI only guest. I'm connecting to the guests (Debian 10 & 11) with Spice client for Windows 10, from here. I've tried installing spice-vdagent in the guest, but no dice.

General goals leading me to try SPICE
  • Survive a disconnect without losing current console activity (with xterm.js, I cant reconnect after any disruption of communications with PVE)
  • Allow cut and paste between CLI guest and viewer. NoVNC can't do this.
  • Leverage access to virtual output (serial, or monitor) from PVE to avoid having to set up a SSH server in guest, which to me seems more secure when feasible.
In a desktop environment, all these things are achievable with SPICE, but in a CLI environment I can't figure out how to paste from the viewer into the guest, or select text from the guest and copy it (like you could in SSH). I could imagine the second might not be possible do to a CLI not having a mouse.

I also could imagine none of this is possible with SPICE and it's just not made to do these things in a CLI guest, but I can't find verification. I'm guessing I just need to stick with xterm.js or setup SSH in the guest.

Any help appreciated, thanks!
 
with xterm.js, I cant reconnect after any disruption of communications with PVE)
thats weird, it should work to reconnect to the vm / container with xterm.js after a disconnect, what exactly does not work here?

aside from that, no the spice guest agent (spice-vdagent on linux) only works with a desktop environment (specifically it needs some x display)

there would have to be an agent that does not need a desktop for it to work, but afaik that does not exist
 
  • Like
Reactions: wbedard
thats weird, it should work to reconnect to the vm / container with xterm.js after a disconnect, what exactly does not work here?

Thanks for info :)

As far as xterm.js, the issue arose during the middle of a very long batch job where things were still running in the cli and I got disconnected, when I reconnected it was just black. That being said, I haven't seen that much and have no problem reconnecting in other scenario. Maybe it was guest related, though I was able to get in via NoVNC and it wasn't locked up.
 
As far as xterm.js, the issue arose during the middle of a very long batch job where things were still running in the cli and I got disconnected, when I reconnected it was just black.
if the program that runs does not print any text to the terminal, there is nothing to see, since there is no framebuffer or something like that, but the program still runs and if it stops or prints something you'd be able to see it

you can also use screen or tmux, which saves the session and you can reattach later if you get disconnected
 

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!