[libvirt] [PATCH 0/8] Enable NIC reporting to systemd

Daniel P. Berrange berrange at redhat.com
Fri Jan 16 17:36:13 UTC 2015


This series enables the QEMU and LXC drivers to report the
network interface backends they use to systemd. This gets
then shown to the user in

 # machinectl status lxc-shell
  lxc-shell(95449419f969d649d9962566ec42af7d)
     Since: Fri 2015-01-16 16:53:37 GMT; 3s ago
    Leader: 28085 (sh)
   Service: libvirt-lxc; class container
     Iface: vnet0
   Address: fe80::216:3eff:fe00:c317%124
        OS: Fedora 21 (Twenty One)
      Unit: machine-lxc\x2dshell.scope
            └─28085 /bin/sh

but most fun is that if you add  nss-mymachines to the
/etc/nsswitch.conf, the machine names can now be used
as hostnames.

eg if your guest is 'lxc-shell' this lets you just do
'ssh lxc-shell' and it'll use the detected link local
address to connect.

Daniel P. Berrange (8):
  qemu: report TAP device indexes to systemd
  systemd: don't report an error if the guest is already terminated
  lxc: don't build pidfile string multiple times
  lxc: re-arrange startup synchronization sequence with controller
  lxc: only write XML once for lxc controller
  lxc: delay setup of cgroup until we have the init pid
  lxc: more logging during startup paths
  lxc: report veth device indexes to systemd

 src/conf/domain_conf.c   |   2 +-
 src/conf/domain_conf.h   |   5 ++
 src/lxc/lxc_cgroup.c     |  15 +++---
 src/lxc/lxc_cgroup.h     |   5 +-
 src/lxc/lxc_container.c  |   8 +++
 src/lxc/lxc_controller.c | 116 ++++++++++++++++++++++++++++++++++++----
 src/lxc/lxc_process.c    | 134 +++++++++++++++++++++++++++--------------------
 src/qemu/qemu_cgroup.c   |  13 +++--
 src/qemu/qemu_cgroup.h   |   4 +-
 src/qemu/qemu_command.c  |  27 ++++++++--
 src/qemu/qemu_command.h  |   7 ++-
 src/qemu/qemu_driver.c   |   7 ++-
 src/qemu/qemu_hotplug.c  |   4 +-
 src/qemu/qemu_process.c  |   9 +++-
 src/util/virsystemd.c    |  25 +++++++--
 tests/qemuxml2argvtest.c |   5 +-
 tests/qemuxmlnstest.c    |   6 ++-
 17 files changed, 288 insertions(+), 104 deletions(-)

-- 
2.1.0




More information about the libvir-list mailing list