lib: Implement attach-method unix:<path>
authorRichard W.M. Jones <rjones@redhat.com>
Thu, 27 Jan 2011 15:54:33 +0000 (15:54 +0000)
committerRichard W.M. Jones <rjones@redhat.com>
Thu, 3 Feb 2011 18:50:45 +0000 (18:50 +0000)
commit17434fb159e6391353363b3d11e2c1fb626fe548
tree5e1cf03e1ac6a8232a7dfab71e65f58870ffc34f
parent91324e0a732fe592f2eecd5b541c731bf4f34b74
lib: Implement attach-method unix:<path>

Allow connections to a Unix domain socket which is connected
(via virtio-serial) to a guestfsd running free in an existing
guest.

In order to use this you have to add the following element
to the libvirt XML:

  <channel type='unix'>
    <source mode='bind' path='/tmp/socket'/>
    <target type='virtio' name='org.libguestfs.channel.0'/>
  </channel>

(or perform the equivalent on the qemu command line).

Then in guestfish, you can do:

  guestfish \
    attach-method unix:/tmp/socket : \
    run : \
    ll /

(or any other commands as desired).
src/launch.c
src/proto.c