search for: vir_stream_nonblock

Displaying 3 results from an estimated 3 matches for "vir_stream_nonblock".

2019 Mar 04
1
How do I close a console connection?
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...
2014 May 26
0
How to open virtual machine console using python libvirt.
...to open virtual machine console using python libvirt. I tried openConsole function,it returning integer 0 and not opening any console. code ====  import libvirt  conn = libvirt.open('qemu+ssh://root@192.168.1.6/system')  vm=conn.lookupByName("vm1-1")  stream=onn.newStream(libvirt.VIR_STREAM_NONBLOCK)  vm.openConsole(None,stream, 0) Regards,  Deepak S   ------------------------- Message sent via Atmail Open - http://atmail.org/
2013 Sep 18
2
Trouble using virStream with callbacks
...virStreamPtr st; int bytes_read; char buf[BUF_SIZE]; if ((conn = virConnectOpen(CONNECT_URI)) == NULL) errx(1, "virConnectOpen"); if ((dom = virDomainLookupByName(conn, DOMAIN)) == NULL) errx(1, "virDomainLookupByName"); if ((st = virStreamNew(conn, VIR_STREAM_NONBLOCK)) == NULL) errx(1, "virStreamNew"); if (virDomainOpenChannel(dom, CHANNEL, st, 0) == -1) errx(1, "virDomainOpenChannel"); if (virEventRegisterDefaultImpl() != 0) errx(1, "virEventRegisterDefaultImpl"); if (virStreamEventAddCallback(st, 1|4...