[libvirt] [Test] Add API to tunnel channels

John Eckersberg jeckersb at redhat.com
Mon Dec 17 21:49:22 UTC 2012


Attached is a simple test program to exercise virDomainOpenChannel that
echoes a toupper()'d string and exits.  Edit the #defines as necessary
to match your setup.  You'll need a channel defined in the guest similar
to:

    <channel type="unix">
      <source mode="bind" path="/tmp/guestfsd.sock"/>
      <target type="virtio" name="org.libguestfs.channel.0"/>
    </channel>

Run the test, and then inside of the VM, you should be able to:

    [root at f17-minimal ~]# socat - /dev/virtio-ports/org.libguestfs.channel.0
    hello world
    HELLO WORLD
    [root at f17-minimal ~]#

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: test.c
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20121217/208a9942/attachment-0001.c>


More information about the libvir-list mailing list