Hey,
This v2 from channel series. Since v1 path is now autogenerated as needed,
and a few other comments from Jim that were addressed. Difference to qemu
driver would be only the autogenerated path being slightly different.
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"}]}
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 | 120 ++++++++++++++++++++-
src/libxl/libxl_conf.h | 4 +-
src/libxl/libxl_domain.c | 44 +++++++-
src/libxl/libxl_driver.c | 7 ++
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 +
14 files changed, 471 insertions(+), 8 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