[libvirt-users] pty pairing host - guest

Neel Basu neel.basu.z at gmail.com
Thu Mar 19 07:59:37 UTC 2015


I am using virt-manager GUI. There I can add a `Console Device`  through
Add Hardware. I can add a virtio pty WITHOUT restarting the VM. also I get
a pty allocated to host machine say `/dev/pty/M`

My expectation is this `host:/dev/pty/M` is connected with a
`guest:/dev/ttyN`. so If I open minicom or screen and write to
`host:/dev/pty/M` it will be propagated to 'guest:/dev/ttyN'. Is my
expectation correct ?

If it is correct how will I know what is the guest tty allocated against
this host pty ?

This is what I've tried:

dumpxml returns
<console type='pty' tty='/dev/pts/1'>
      <source path='/dev/pts/1'/>
      <target type='serial' port='0'/>
      <alias name='serial0'/>

I expected host:/dev/pts/1 is paired with guest:/dev/ttyS0. so I opened
screen/cat/echo on both sides but could not exchange messages


Similar to console device I can add a Serial device but that requires a
reboot of the guest VM. However I tried that though I prefer to do it
without a guest restart.

<serial type='pty'>
      <source path='/dev/pts/1'/>
      <target port='0'/>
      <alias name='serial0'/>

here also I expected host:/dev/pts/1 is paired with /dev/ttyS0 but couldn't

My sole requirement is to have a tty pair in host and guest that can be
used to communicate with each other. I am using qemu-kvm.

Thank You.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20150319/741d975a/attachment.htm>

More information about the libvirt-users mailing list