[Spice-devel] How to check if the spice-streaming-agent works correctly
Uri Lublin
uril at redhat.com
Mon Apr 23 09:56:35 UTC 2018
On 04/23/2018 10:48 AM, 孙得霖 wrote:
> Hello, I have some difficulties with spice-streaming-agent, can you help me. >
> when I run spice-streaming-agent, it can not
> read_command(have_something_to_read always return 0).
> ./src/spice-streaming-agent.ccp:static int have_something_to_read(int
> timeout)
Hi,
I had a similar problem.
In my case it was due to changing the name of the char-device.
I had to change my command line.
See below for more.
> {
> struct pollfd pollfd = {streamfd, POLLIN, 0};
>
> if (poll(&pollfd, 1, timeout) < 0) {
> syslog(LOG_ERR, "poll FAILED\n");
> return -1;
> }
>
> if (pollfd.revents == POLLIN) {
> return 1;
> }
>
> return 0;
> }
>
> system(centOS-7.2):
> # uname -a
> Linux localhost.localdomain 3.10.0-514.el7.x86_64 #1 SMP Tue Nov 22
> 16:42:41 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
> cpuinfo:Intel(R) Xeon(R) CPU E3-1245 v6 @ 3.70GHz
>
>
> Steps as follows:
> 1.host command line:
> /usr/libexec/qemu-kvm -m 1024 -name f15 -drive
> file=/root/centos-base.img,if=virtio -vga qxl -spice
> port=5900,disable-ticketing -net nic,macaddr=00:A1:00:00:00:1A -net
> tap,script=/etc/qemu-ifup \
> -device virtio-serial-pci -device
Try adding an id to the virtio-serial-pci device, e.g.
-device virtio-serial-pci,id=virtio-serial0
Uri.
> virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel1,id=channel1,name=org.spice-space.stream.0
> -chardev spiceport,name=org.spice-space.stream.0,id=charchannel1
>
> Bus 'virtio-serial0.0' not found, So I *delete
> "bus=virtio-serial0.0"*(is it right?)
> /usr/libexec/qemu-kvm -m 1024 -name f15 -drive
> file=/root/centos-base.img,if=virtio -vga qxl -spice
> port=5900,disable-ticketing -net nic,macaddr=00:A1:00:00:00:1A -net
> tap,script=/etc/qemu-ifup \
> -device virtio-serial-pci -device
> virtserialport,nr=1,chardev=charchannel1,id=channel1,name=org.spice-space.stream.0
> -chardev spiceport,name=org.spice-space.stream.0,id=charchannel1
>
> 2.start VM and install spice-streaming-agent:
> ./autogen
> make -j 8
> make install
>
> # ls /dev/virtio-ports/
> org.spice-space.stream.0
>
> 3.run spice-streaming-agent
>
> Have some questions:
> 1.spice-streaming-agent can not read_command, I don't know the reason
> for the failure.
> 2.How to check if the spice-streaming-agent works correctly(encode
> stream and send it to client)
>
>
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/spice-devel
>
More information about the Spice-devel
mailing list