search for: virstream

Displaying 20 results from an estimated 23 matches for "virstream".

2010 Jul 08
1
virStream functions
May anybody tell me which is the porpose of virStream functions ? Thanks in advance. Camilo Aguilar -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20100708/ab2a6e86/attachment.htm>
2017 Apr 28
2
No way to stop virStream error after guest stop
Hello everyone, I am opening a virChannel(unix) to a domain and receiving data with a non-blocking virStream using events, when the connected domain gets stopped(which deletes the channel unix socket) by calling destroy, shutdown, pause or migrate on that domain, with the stream open the read event is triggered repeatedly, and virStreamRecv returns 0 bytes indicating EOF but neither virStreamFinish nor...
2017 May 16
0
Re: No way to stop virStream error after guest stop
On Fri, Apr 28, 2017 at 11:01:18PM +0000, JosÉ Luis Valencia Gutierrez wrote: >Hello everyone, >I am opening a virChannel(unix) to a domain and receiving data with a >non-blocking virStream using events, when the connected domain gets >stopped(which deletes the channel unix socket) by calling destroy, >shutdown, pause or migrate on that domain, with the stream open the read >event is triggered repeatedly, and virStreamRecv returns 0 bytes indicating > EOF but neither virS...
2017 May 17
0
Re: No way to stop virStream error after guest stop
On Wed, May 17, 2017 at 01:01:39AM +0000, JosÉ Luis Valencia Gutierrez wrote: >I get just _READABLE events repeatedly, virStreamAbort() doesn't work, it >gets out of control after the target domain stops and the unix scocket is >deleted. I ended connecting directly to the unix socket. I just wanted to >ask if it certainly is a bug or perhaps someone went through this before >and have a workaround. > It...
2017 May 17
0
Re: No way to stop virStream error after guest stop
I just tried removing the callback before calling virStreamFinish and it worked right, I thought by simply finish the stream would stop the events and close it, the example I was based on only calls virStreamFinish on EOF event. Em qua, 17 de mai de 2017 às 12:49, Martin Kletzander <mkletzan@redhat.com> escreveu: > On Wed, May 17, 2017 at 09:08:...
2017 May 17
2
Re: No way to stop virStream error after guest stop
I get just _READABLE events repeatedly, virStreamAbort() doesn't work, it gets out of control after the target domain stops and the unix scocket is deleted. I ended connecting directly to the unix socket. I just wanted to ask if it certainly is a bug or perhaps someone went through this before and have a workaround. Jose V. Em ter, 16 de mai...
2017 May 24
2
Re: No way to stop virStream error after guest stop
On Wed, May 17, 2017 at 07:53:35PM +0000, JosÉ Luis Valencia Gutierrez wrote: >I just tried removing the callback before calling virStreamFinish and it >worked right, I thought by simply finish the stream would stop the events >and close it, the example I was based on only calls virStreamFinish on EOF >event. > I'm working on a patch that removes the callbacks after calling Finish. Our docs don't really say it'...
2017 May 24
0
Re: No way to stop virStream error after guest stop
That is great, calling Abort also should remove the callbacks. On Wed, 24 May 2017 11:11 Martin Kletzander, <mkletzan@redhat.com> wrote: > On Wed, May 17, 2017 at 07:53:35PM +0000, JosÉ Luis Valencia Gutierrez > wrote: > >I just tried removing the callback before calling virStreamFinish and it > >worked right, I thought by simply finish the stream would stop the events > >and close it, the example I was based on only calls virStreamFinish on EOF > >event. > > > > I'm working on a patch that removes the callbacks after calling Finish. > Ou...
2013 Sep 19
0
Re: Trouble using virStream with callbacks
I tried to dig a bit deeper in this. From my limited understanding, it seems like stream events are implemented as enabled/disabled timers. The issue is that if there's no data from the guest app pending, the timeout in virEventPollRunOnce will be calculated as -1. So then we block on the poll() and only come out once stdin is ready for reading. This means that if data is received from the
2013 Sep 19
0
Re: Trouble using virStream with callbacks
...ou > aren't putting it into raw mode like virsh console does. This will > delay I/O on the stdio streams. That's a good point. But since all the messages between host and guest end in newlines, that shouldn't be an issue, right? Anyway, I can see the lines from stdin making it to virStreamSend() upon the first <Enter>. And from the other side, it's safe to assume socat sends the data after the first <Enter> as well (since it works fine with socat to socat directly on the socket/port). Thanks, Jonathan
2013 Sep 19
0
Re: Trouble using virStream with callbacks
> As a test why not try hacking virsh console so that it connects to your > virtio serial port, instead of a console. If we assume 'virsh console' > is bug-free, that would let you identify whether the flaw is in your host > code, or the guest side. Thanks for the pointer. Doing a few trivial changes to virsh-console does show that it works correctly and pointed out multiple
2015 Feb 02
0
virStream text codec
Hi. I'm try to use virDomainOpenConsole( domainPtr, NULL, stream, VIR_DOMAIN_CONSOLE_SAFE) for control remote terminal, but i don't understand in which text codec the stream returns a data?
2017 May 17
2
Re: No way to stop virStream error after guest stop
On Wed, May 17, 2017 at 09:08:14AM +0200, Martin Kletzander wrote: >On Wed, May 17, 2017 at 01:01:39AM +0000, JosÉ Luis Valencia Gutierrez wrote: >>I get just _READABLE events repeatedly, virStreamAbort() doesn't work, it >>gets out of control after the target domain stops and the unix scocket is >>deleted. I ended connecting directly to the unix socket. I just wanted to >>ask if it certainly is a bug or perhaps someone went through this before >>and have a workaro...
2013 Sep 19
2
Re: Trouble using virStream with callbacks
...g it into raw mode like virsh console does. This will > > delay I/O on the stdio streams. > > That's a good point. But since all the messages between host and guest end > in newlines, that shouldn't be an issue, right? Anyway, I can see the lines > from stdin making it to virStreamSend() upon the first <Enter>. And from the > other side, it's safe to assume socat sends the data after the first <Enter> > as well (since it works fine with socat to socat directly on the socket/port). As a test why not try hacking virsh console so that it connects to your v...
2013 Sep 19
2
Re: Trouble using virStream with callbacks
On Thu, Sep 19, 2013 at 11:59:45AM -0400, Jonathan Lebon wrote: > I tried to dig a bit deeper in this. From my limited understanding, > it seems like stream events are implemented as enabled/disabled timers. > The issue is that if there's no data from the guest app pending, the > timeout in virEventPollRunOnce will be calculated as -1. So then we > block on the poll() and only
2013 Sep 18
2
Trouble using virStream with callbacks
...gt; #include <libvirt/libvirt.h> #include <fcntl.h> #define CONNECT_URI "qemu:///system" #define DOMAIN "TestVM" #define CHANNEL "channel.0" #define BUF_SIZE 80 int stream_active = 1; void stdin_to_stream(int watch, int fd, int events, void *opaque) { virStreamPtr stream = *((virStreamPtr*)(opaque)); if (events & VIR_EVENT_HANDLE_READABLE) { char buf[1024]; int bytes_read = read(fd, buf, sizeof(buf)); if (bytes_read > 0) virStreamSend(stream, buf, bytes_read); } if (events & (VIR_EVENT_HANDLE_ERROR|VIR_EVENT_...
2014 May 18
1
help to implement LXC terminal
Hi, guys! I began to write qt-virt-manager (https://github.com/F1ash/qt-virt-manager), using libvirt API. I'm currently trying to implement a terminal for LXC-containers, but I do not have enough knowledge and experience. As I understand it, i must use virDomainOpenConsole, which binds virStream with working domain (Virtual Machine). But how to use this stream, I do not know ( I found qterminalwidget to implement the terminal, but I do not know how to tie them). Can anyone suggest how can I do? -- Fl@sh
2018 Dec 03
2
Re: console type tcp with logging
пн, 3 дек. 2018 г. в 12:27, Daniel P. Berrangé <berrange@redhat.com>: > > We don't have any plans to add it, but if someone's interested we'd > accept patches. It would need to integrate with our virStream APIs > to allow download, in similar way to how virStorageVolDownload() works What args this function need to receive? VolDownload this args: virStorageVolDownload(virStorageVolPtr vol, virStreamPtr stream, unsigned long long offset,...
2018 Dec 01
2
Re: console type tcp with logging
пт, 30 нояб. 2018 г. в 12:43, Daniel P. Berrangé <berrange@redhat.com>: > > On Thu, Nov 29, 2018 at 08:57:54PM +0300, Vasiliy Tolstov wrote: > > чт, 29 нояб. 2018 г. в 18:23, Daniel P. Berrangé <berrange@redhat.com>: > > > > > > On Thu, Nov 29, 2018 at 06:19:43PM +0300, Vasiliy Tolstov wrote: > > > > Hi! I want to have ability to connect to
2018 Dec 03
0
Re: console type tcp with logging
...ead this log via libvirt api? > > > > No, not at this time. > > > > Thanks! Do you have some plans to add this ability or patches welcome? =) We don't have any plans to add it, but if someone's interested we'd accept patches. It would need to integrate with our virStream APIs to allow download, in similar way to how virStorageVolDownload() works Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- htt...