[Spice-devel] Spice agent and LXC

Charles Ricketts githlar at gmail.com
Sat Nov 22 04:30:46 PST 2014


I've been surfing and source diving and now I'm all wet! I just
discovered LXC a couple days ago after having been a Qemu fan for years.
I really like the idea behind it and it seems to be far better on
resources! However, I wanted to get the same kind of user experience out
of these LXC containers as I get with Qemu+Spice. Getting Spice running
in the first place was a pretty simple task (once I learned my way
around Fedora a bit). However, I've been pounding my head against the
wall for almost a whole day trying to get the agent to work correctly.
I'm working with Xspice for this setup as it's really my only option I
think.

I need a little information from you guys as I don't understand the
Spice protocol all too well and looking at source only gives me the gist
of what's going on rather than the specifics due to my lack of knowledge.

I've tried so many things to get this working, yet nothing I try seems
to work. All of my work has been based around the idea that Qemu in a
normal Spice setup just relays information between a network socket and
its virtualization of a serial port. The Spice client sends to the
network port, and Qemu writes that to the virtual serial buffer for the
guest agent to read. Likewise, the agent writes to the virtual serial
buffer and it gets relayed through the network port by Qemu. Is this
correct? Also, if I'm not mistaken, Xspice is made to replace that
functionality: it opens a network port for a client and talks to the
agent(s).

In Linux systems, a Spice VirtIO serial port gets mapped to
/dev/virtio-serial/com.redhat.spice.0 -> ../vport1p1. I attempted to
replicate this with my LXC container by using `mknod -m 600
/dev/vport1p1 c 181 1' (the same major/minor as the real thing).
However, if I'm not mistaken it doesn't *have* to be a de-facto VirtIO
serial port, correct? Shouldn't it work with any serial character device
such as /dev/ttyU0? I tried this as well and the results seemed no
different.

I suppose at this point I should explain the results I'm getting. I've
tried using spicy and remote-viewer -- both with similar results.
However, I find spicy interesting since it actually has the status bar
that tells me "agent: yes." I find this very strange sine while Spicy
detects an agent, that agent doesn't seem to be doing anything.
Copy/paste and automatic resolution don't work. There's obviously a
communication problem somewhere, I'm just having a hell of a time trying
to find it. Additionally, using Xspice standalone (which I don't plan
for my final version) results in no cursor (and spicy still says "agent:
yes") whereas running vdagent standalone works just fine in that regard,
but still no other functionality.

What I'd like is a simple run-down of the basic functionality of some of
the parts. For example, what is the purpose of having two separate
agents (system and X)? How does the flow of data look from the port all
the way to the X agent (which I assume is the final destination for at
least clipboard paste if not resolution sizing as well). Though, now
that I think about it, I'll be Xspice/QXL could do at least the
resolution sizing itself, couldn't it? Finally, what is the purpose of
this "udcs socket" in the daemon? I was hoping to at least find a clue
of the term's meaning in the source code, but no such luck.
Additionally, Googling only lead me to more Spice code!

I'm really hoping it's just a configuration problem rather than some LXC
peculiarity...

I appreciate any insight you awesome devs and users could give me!

Chuck



More information about the Spice-devel mailing list