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

Re: [libvirt-users] How do I close a console connection?



On Mon, Mar 04, 2019 at 04:54:23PM -0500, Lars Kellogg-Stedman wrote:
> I'm working on (re-) implementing serial console support in virtualbmc
> [1], and one of the issues I'm hitting right now is that after
> establishing a console connection via...
> 
>     self._stream = self._conn.newStream(libvirt.VIR_STREAM_NONBLOCK)
>     self._domain.openConsole(None, self._stream, 0)
> 
> ...I can't figure out how to close the console.  Subsequent calls to
> openConsole fail because "a console connection is already open". I
> thought maybe I should close the stream, but that doesn't appear to be
> possible (there is a finish method, but it just tells me that "this
> function is not supported by the connection driver").

You need to call either  Finish or Abort. Either should work if
the openConsole call was successful, though Abort would be more
typical for a console connection since there's on real concept
of completion there.

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-    https://www.instagram.com/dberrange :|


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