[libvirt-users] On which /dev/pts/x is channel source mapped ?

Daniel P. Berrange berrange at redhat.com
Wed Aug 26 13:37:47 UTC 2015


On Tue, Aug 25, 2015 at 03:17:51PM +0000, Jean-Pierre Ribeauville wrote:
> Hi,
> 
> By adding following lines in a Guest .xml  conf file , I'm able to send / receive datas between host and this guest.
> 
> <channel type='pty'>
>       <target type='virtio' name='arbitrary.virtio.serial.port.name'/>
>       <address type='virtio-serial' controller='0' bus='0' port='1'/>
>     </channel>
> 
> My question  is the following :
> 
> How may I find to which  /dev/pts/x  is mapped the source path  ( from the host point of view) ?

You have to queryy the XML from libvirt after the guest has started,
at which point libvirt will have filled in the dynamically alllocated
pty path.

Honestly, you're probably better off not using type='pty', and
instead use type='unix', which lets you specify an explicit
UNIX domain socket path upfront, avoiding the whole problem.


Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|




More information about the libvirt-users mailing list