[libvirt-users] Invoking virsh console from Java

Eric Blake eblake at redhat.com
Thu May 15 20:05:53 UTC 2014


On 05/15/2014 11:34 AM, Nagaraj Mandya wrote:
> Hello,
>   I have a Java application from which I am invoking the "virsh console"
> command to access the console of a VM. I invoke the virsh command using
> ProcessBuilder.start(). However, I am unable to communicate with the stdin
> of the VMs console through the OutputStream of the Process object.
> 
>   When I invoke "virsh console" from within Java, I see the following
> messages on stderr:
> 
> info : libvirt version: 0.9.8
> error : vshRunConsole:318 : unable to get tty attributes: Inappropriate
> ioctl for device
> 
>   Does anybody know how I can workaround this? Thanks.

Why not just directly use the Java bindings from libvirt-java to access
the console directly from your Java program, instead of trying to spawn
a third-party application to do it on your behalf?  Alas, I'm not
familiar enough with the Java bindings to know how easy or hard this may be.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 604 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20140515/a047cf97/attachment.sig>


More information about the libvirt-users mailing list