[libvirt] [PATCH v1 0/4] libxl: channels support

Joao Martins joao.m.martins at oracle.com
Fri Sep 16 23:43:32 UTC 2016


Hey,

Channels have been on xen toolstack since Xen 4.5 and this small series
adds support for it, including xenconfig conversion and appropriate tests.
After this series it's possible to do this:
(assuming correct configuration of qemu agent in the guest)

 $ cat domain.xml | grep -a1 channel | head -n 5 | tail -n 4
 <channel type='unix'>
   <source mode='bind' path='/tmp/channel'/>
   <target type='xen' name='org.qemu.guest_agent.0'/>
 </channel>

 $ virsh create domain.xml
 $ echo '{"execute":"guest-network-get-interfaces"}' | socat
 stdio,ignoreeof  unix-connect:/tmp/channel

 {"execute":"guest-network-get-interfaces"}
 {"return": [{"name": "lo", "ip-addresses": [{"ip-address-type": "ipv4",
 "ip-address": "127.0.0.1", "prefix": 8}, {"ip-address-type": "ipv6",
 "ip-address": "::1", "prefix": 128}], "hardware-address":
 "00:00:00:00:00:00"}, {"name": "eth0", "ip-addresses":
 [{"ip-address-type": "ipv4", "ip-address": "10.100.0.6", "prefix": 24},
 {"ip-address-type": "ipv6", "ip-address": "fe80::216:3eff:fe40:88eb",
 "prefix": 64}], "hardware-address": "00:16:3e:40:88:eb"}, {"name":
 "sit0"}]}

There is just one thing unclear: is source "path" meant to be auto-generated
if it's not specified in the channel config? Additionally what does "state"
signify for virtio case: is it that the guest agent is connected, or that the
virtio serial is connected? Looking at the qemu driver on
processSerialChangedEvent it sounds to me like it's about the serial state.

I also have one other series that lets us share the qemu agent across both qemu
and libxl drivers, with qemu-agent-command implemented. But it's still in an
early stage.

Any comments or feedback is appreciated :)

Thanks,
Joao

Joao Martins (4):
  conf: add xen type for channels
  libxl: channels support
  xenconfig: channels conversion support
  xlconfigtest: add test for channel conversion

 docs/schemas/domaincommon.rng            |  11 ++
 src/conf/domain_conf.c                   |  18 +++-
 src/conf/domain_conf.h                   |   1 +
 src/libxl/libxl_conf.c                   |  81 ++++++++++++++
 src/libxl/libxl_domain.c                 |  38 +++++++
 src/qemu/qemu_command.c                  |   1 +
 src/xenconfig/xen_xl.c                   | 176 +++++++++++++++++++++++++++++++
 tests/xlconfigdata/test-channel-pty.cfg  |  13 +++
 tests/xlconfigdata/test-channel-pty.xml  |  33 ++++++
 tests/xlconfigdata/test-channel-unix.cfg |  13 +++
 tests/xlconfigdata/test-channel-unix.xml |  34 ++++++
 tests/xlconfigtest.c                     |   4 +
 12 files changed, 419 insertions(+), 4 deletions(-)
 create mode 100644 tests/xlconfigdata/test-channel-pty.cfg
 create mode 100644 tests/xlconfigdata/test-channel-pty.xml
 create mode 100644 tests/xlconfigdata/test-channel-unix.cfg
 create mode 100644 tests/xlconfigdata/test-channel-unix.xml

-- 
2.1.4




More information about the libvir-list mailing list