Re: [Spice-devel] How to check if the spice-streaming-agent workscorrectly
On Mon, Apr 23, 2018 at 02:08:45PM +0200, Lukáš Hrázký wrote: > On Mon, 2018-04-23 at 19:22 +0800, 孙得霖 wrote: > > hi, > > @lhrazky > > host: > > qemu-kvm: 1.5.3 > > spice-server: 0.13.3 > > This is an old version of spice server. You need to build the current > git master of the server on the host (note as Uri correctly commented > the name of the virtio port was recently changed, if you get the latest > master, you'll be fine). > > With your version of the spice server, the server doesn't open the > other side of the virtio port, that's why you're not getting anything. 1.5.3 is also a quite old version of qemu-kvm. Christophe signature.asc Description: PGP signature ___ Spice-devel mailing list Spice-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/spice-devel
Re: [Spice-devel] How to check if the spice-streaming-agent workscorrectly
On Mon, 2018-04-23 at 19:22 +0800, 孙得霖 wrote: > hi, > @lhrazky > host: > qemu-kvm: 1.5.3 > spice-server: 0.13.3 This is an old version of spice server. You need to build the current git master of the server on the host (note as Uri correctly commented the name of the virtio port was recently changed, if you get the latest master, you'll be fine). With your version of the spice server, the server doesn't open the other side of the virtio port, that's why you're not getting anything. Cheers, Lukas > 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(, 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 ---------- > From: "Lukáš Hrázký"<lhra...@redhat.com>; > Date: Mon, Apr 23, 2018 05:15 PM > To: "孙得霖"<kong.de...@embedway.com>; > "spice-devel"<spice-devel@lists.freedesktop.org>; > > 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(, 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@lists.freedesktop.org > > https://lists.freedesktop.org/mailman/listinfo/spice-devel ___ Spice-devel mailing list Spice-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/spice-devel
Re: [Spice-devel] How to check if the spice-streaming-agent workscorrectly
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(, 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 -- From: "Lukáš Hrázký"<lhra...@redhat.com>; Date: Mon, Apr 23, 2018 05:15 PM To: "孙得霖"<kong.de...@embedway.com>; "spice-devel"<spice-devel@lists.freedesktop.org>; 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(, 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@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/spice-devel___ Spice-devel mailing list Spice-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/spice-devel