<div dir="ltr">Hi Eric,<div>  I did check the libvirt Java bindings, but I did not find any way to access the console through the Java API. Is anybody aware of how this can be done using the Java API?</div><div class="gmail_extra">
<div><div dir="ltr">--<div>Regards,</div><div>Nagaraj</div></div></div>
<br><br><div class="gmail_quote">On Fri, May 16, 2014 at 1:35 AM, Eric Blake <span dir="ltr"><<a href="mailto:eblake@redhat.com" target="_blank">eblake@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb"><div class="h5">On 05/15/2014 11:34 AM, Nagaraj Mandya wrote:<br>
> Hello,<br>
>   I have a Java application from which I am invoking the "virsh console"<br>
> command to access the console of a VM. I invoke the virsh command using<br>
> ProcessBuilder.start(). However, I am unable to communicate with the stdin<br>
> of the VMs console through the OutputStream of the Process object.<br>
><br>
>   When I invoke "virsh console" from within Java, I see the following<br>
> messages on stderr:<br>
><br>
> info : libvirt version: 0.9.8<br>
> error : vshRunConsole:318 : unable to get tty attributes: Inappropriate<br>
> ioctl for device<br>
><br>
>   Does anybody know how I can workaround this? Thanks.<br>
<br>
</div></div>Why not just directly use the Java bindings from libvirt-java to access<br>
the console directly from your Java program, instead of trying to spawn<br>
a third-party application to do it on your behalf?  Alas, I'm not<br>
familiar enough with the Java bindings to know how easy or hard this may be.<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Eric Blake   eblake redhat com    <a href="tel:%2B1-919-301-3266" value="+19193013266">+1-919-301-3266</a><br>
Libvirt virtualization library <a href="http://libvirt.org" target="_blank">http://libvirt.org</a><br>
<br>
</font></span></blockquote></div><br></div></div>