[Spice-devel] Implementing channel between module at spice client and guest OS

Alon Bar-Lev alonbl at redhat.com
Mon Nov 18 10:22:41 PST 2013


Hello,

I am trying to figure out how to implement a channel between guest OS process and component at client machine. Reading the documentation I found and the vd_agent code which is somewhat similar but I could not find complete solution.

Here is what I imagined....

I define a new serial interface on qemu:

-device virtio-serial-pci
-device virtserialport,chardev=myappl,name=my.application.0
-chardev spicevmc,id=myappl,name=myappl

This will enable a process within guest os to access /dev/virtio-ports/my.application.0

At client side I would like to implement a component that interact with this myappl port, I could not find a way to load shared library or similar dynamic module into client in spicy usage.

If dynamic loading of modules is possible, is there any example of how to do so?

If dynamic loading of modules is impossible, is there a plan to allow it?

Assuming there is the option to load a module.

I could not find in vdi spec[1] description of the vdi_port interface and what should I do in order to communicate with the guest.

Provided this is possible somehow, as it is working for vd_agent... and provided external modules can be loaded.

I can guess that each 'name' in the above example myapp can be connected by different implementation, is that right?

Assuming we have channel between module running on client machine and the agent running on guest machine using virtual serial, is there support for transferring RS232 controls? Such as DTR/DSR to detect if the device is opened at guest side and if device is opened at client side? And detect disconnection?

Another nice option I thought is to allow forking process at client side with usock as stdin/stdout that redirected into specific spicevmc device, this will ease the work of implementing such solutions, as the author of the forked process may not have any spice knowledge at all, while be able to participate within the solution.

Regards,
Alon Bar-Lev.

[1] http://www.spice-space.org/docs/vd_interfaces.pdf


More information about the Spice-devel mailing list