Re: How to check if the spice-streaming-agent workscorrectly

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



hi,
@lhrazky 
host:
qemu-kvm:       1.5.3
spice-server:   0.13.3
spcie-protocol: 0.12.12

client:
remote-view: Virtual Machine Viewer 5.0-256(run in win7)

./src/spice-streaming-agent.ccp:static int have_something_to_read(int timeout)
{
    struct pollfd pollfd = {streamfd, POLLIN, 0};

    if (poll(&pollfd, 1, timeout) < 0) {
        printf("have_something_to_read return -1\n");
        return -1;
    }
    if (pollfd.revents == POLLIN) {
printf("have_something_to_read return 1\n");
        return 1;
    }
    printf("have_something_to_read return 0\n");
    return 0;
}

debug info:
spice-server(0.13.3) , have_something_to_read alway return 0, "printf("have_something_to_read return 0\n");"
Lastest git master, have_something_to_read does not return anything,  It seems that cannot continue to execute。

@uril 
> Try adding an id to the virtio-serial-pci device, e.g.
> -device virtio-serial-pci,id=virtio-serial0
I add an id to the virtio-serial-pci device, it can fix "Bus 'virtio-serial0.0' not found"

BR.

------------------ Original ------------------
Date:  Mon, Apr 23, 2018 05:15 PM
To:  "孙得霖"<kong.delin@xxxxxxxxxxxx>; "spice-devel"<spice-devel@xxxxxxxxxxxxxxxxxxxxx>;
Subject:  Re: [Spice-devel] How to check if the spice-streaming-agent workscorrectly
 
On Mon, 2018-04-23 at 15:48 +0800, 孙得霖 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)
> {
>     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 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)

Seems like nothing is writing to the port on the other side. Are you
sure you are using a version of spice-server that supports the
streaming agent? Lastest git master would probably be the best.

Cheers,
Lukas

> _______________________________________________
> Spice-devel mailing list
> Spice-devel@xxxxxxxxxxxxxxxxxxxxx
> https://lists.freedesktop.org/mailman/listinfo/spice-devel
_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]