Virtualization: SPICE doesn't support display resize due to missing agent support
Description
Problem/Justification
Impact
Activity
@Simon its clear now, thank you
@William Gryzbowski: Yes, the agent needs to be installed on the guest, which is out of scope for this ticket and TrueNAS in general.
What I'd like to request is what makes the agent work in the first place, the virtio-serial
device. The config snippet shown below configures a virtio-serial
device in the vm and addes support for spicemvc
. This will allow the VM (when the agent is installed) to resize the resolution based on the client windows size.
This is what needs to be added to the libvirt xml file of a vm (source: https://www.spice-space.org/spice-user-manual.html):
<devices>
<controller type='virtio-serial' index='0'/>
<channel type='spicevmc'>
<target type='virtio' name='com.redhat.spice.0'/>
</channel>
</devices>
I'd like to have the above configuration snippet configurable in the TrueNAS UI to support my usecase from the ticket description. Let me know if this makes now more sense, sometimes things are hard to describe 🙂
@Simon I am not sure I follow. You mention agent, so that means it has to be installed in the Guest, which is out of scope of TrueNAS.
What did I miss?
Thank you
Thanks for your submission! This is in our queue to review now. An engineering representative will update with any further questions or details in the near future.
I've setup a Ubuntu VM and selected the SPICE protocol for remote access. While it works, the display doesn't scale automatically with the client windows size, something I'd really like to have as it allows me to use my VMs from multiple clients with different display resolutions and/or rezise my client windows dynamically as needed.
This seems to be due to missing Agent support (it also has instructions what's required in the libvirt configuration): https://www.spice-space.org/spice-user-manual.html#Agent
Agent support allows better integration with the guest. For example, it allows copy and paste between the guest and the host OSes, dynamic resolution changes when the client window is resized/full-screened, file transfers through drag and drop, ...
The agent is a daemon/service running in the guest OS so it must be installed if it was not installed by default during the guest OS installation. It also relies on a virtio-serial PCI device and a dedicated spicevmc char device to achieve communication between the guest and the host. These devices must be added to the virtual machine for the agent to work in the guest.
I'm not sure what the best way would be to support this in the UI, but it needs to be configurable as people might now want to use it.
Having this available would make (GUI) VMs much more usable on Scale.