1. 09 4月, 2013 1 次提交
    • B
      Implement support for <hostdev caps=net> · 442d6a05
      Bogdan Purcareata 提交于
      This allows a container-type domain to have exclusive access to one of
      the host's NICs.
      
      Wire <hostdev caps=net> with the lxc_controller - when moving the newly
      created veth devices into a new namespace, also look for any hostdev
      devices that should be moved. Note: once the container domain has been
      destroyed, there is no code that moves the interfaces back to the
      original namespace. This does happen, though, probably due to default
      cleanup on namespace destruction.
      Signed-off-by: NBogdan Purcareata <bogdan.purcareata@freescale.com>
      442d6a05
  2. 05 4月, 2013 2 次提交
  3. 04 4月, 2013 1 次提交
  4. 23 3月, 2013 1 次提交
    • D
      Mount temporary devpts on /var/lib/libvirt/lxc/$NAME.devpts · 7e1a7444
      Daniel P. Berrange 提交于
      Currently the lxc controller sets up the devpts instance on
      $rootfsdef->src, but this only works if $rootfsdef is using
      type=mount. To support type=block or type=file for the root
      filesystem, we must use /var/lib/libvirt/lxc/$NAME.devpts
      for the temporary devpts mount in the controller
      7e1a7444
  5. 22 3月, 2013 1 次提交
  6. 20 3月, 2013 3 次提交
  7. 19 3月, 2013 2 次提交
    • D
      Do not prematurely close loop devices in LXC controller · 0a418355
      Daniel P. Berrange 提交于
      The LXC controller is closing loop devices as soon as the
      container has started. This is fine if the loop device
      was setup as a mounted filesystem, but if we're just passing
      through the loop device as a disk, nothing else is keeping
      it open. Thus we must keep the loop device FDs open for as
      long the libvirt_lxc process is running.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      0a418355
    • D
      Setup LXC cgroups in two phases · 1760258c
      Daniel P. Berrange 提交于
      Currently the LXC controller creates the cgroup, configures the
      resources and adds the task all in one go. This is not sufficiently
      flexible for the forthcoming NBD integration. We need to make sure
      the NBD process gets into the right cgroup immediately, but we can
      not have limits (in particular the device ACL) applied at the point
      where we start qemu-nbd. So create a virLXCCgroupCreate method
      which creates the cgroup and adds the current task to be called
      early, and leave virLXCCgroupSetup to only do resource config.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      1760258c
  8. 14 3月, 2013 1 次提交
    • D
      Fix generation of systemtap probes for RPC protocols · 403594eb
      Daniel P. Berrange 提交于
      The naming used in the RPC protocols for the LXC monitor and
      lock daemon confused the script used to generate systemtap
      helper functions. Rename the LXC monitor protocol symbols to
      reduce confusion. Adapt the gensystemtap.pl script to cope
      with the LXC monitor / lock daemon naming conversions.
      
      This has no functional impact on RPC wire protocol, since
      names are only used in the C layer
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      403594eb
  9. 13 3月, 2013 1 次提交
    • P
      virCaps: conf: start splitting out irrelevat data · 27cf98e2
      Peter Krempa 提交于
      The virCaps structure gathered a ton of irrelevant data over time that.
      The original reason is that it was propagated to the XML parser
      functions.
      
      This patch aims to create a new data structure virDomainXMLConf that
      will contain immutable data that are used by the XML parser. This will
      allow two things we need:
      
      1) Get rid of the stuff from virCaps
      
      2) Allow us to add callbacks to check and add driver specific stuff
      after domain XML is parsed.
      
      This first attempt removes pointers to private data allocation functions
      to this new structure and update all callers and function that require
      them.
      27cf98e2
  10. 12 3月, 2013 1 次提交
  11. 08 3月, 2013 3 次提交
    • D
      Add support for disks backed by plain files in LXC · eaf7d4dd
      Daniel P. Berrange 提交于
      By using a loopback device, disks backed by plain files can
      be made available to LXC containers. We make no attempt to
      auto-detect format if <driver type="raw"/> is not set,
      instead we unconditionally treat that as meaning raw. This
      is to avoid the security issues inherent with format
      auto-detection
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      eaf7d4dd
    • D
      Refactor loop device setup code in LXC · f0bfb630
      Daniel P. Berrange 提交于
      Minor re-factoring of code for setting up loop devices in
      the LXC controller
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      f0bfb630
    • D
      Improve LXC startup error reporting · 09f5e012
      Daniel P. Berrange 提交于
      Currently we rely on a VIR_ERROR message being logged by the
      virRaiseError function to report LXC startup errors. This gives
      the right message, but is rather ugly and can be truncated
      if lots of log messages are written. Change the LXC controller
      to explicitly print any virErrorPtr message to stderr. Then
      change the driver to skip over anything that looks like a log
      message.
      
      The result is that this
      
      error: Failed to start domain busy
      error: internal error guest failed to start: 2013-03-04 19:46:42.846+0000: 1734: info : libvirt version: 1.0.2
      2013-03-04 19:46:42.846+0000: 1734: error : virFileLoopDeviceAssociate:600 : Unable to open /root/disk.raw: No such file or directory
      
      changes to
      
      error: Failed to start domain busy
      error: internal error guest failed to start: Unable to open /root/disk.raw: No such file or directory
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      09f5e012
  12. 11 2月, 2013 1 次提交
  13. 08 2月, 2013 1 次提交
  14. 14 1月, 2013 3 次提交
  15. 09 1月, 2013 1 次提交
  16. 08 1月, 2013 2 次提交
  17. 21 12月, 2012 6 次提交
  18. 19 12月, 2012 1 次提交
  19. 28 11月, 2012 1 次提交
    • G
      add fuse support for libvirt lxc · 2a596dac
      Gao feng 提交于
      this patch addes fuse support for libvirt lxc.
      we can use fuse filesystem to generate sysinfo dynamically,
      So we can isolate /proc/meminfo,cpuinfo and so on through
      fuse filesystem.
      
      we mount fuse filesystem for every container.
      the mount name is libvirt,mount point is
      localstatedir/run/libvirt/lxc/containername.
      Signed-off-by: NGao feng <gaofeng@cn.fujitsu.com>
      2a596dac
  20. 26 11月, 2012 2 次提交
  21. 23 11月, 2012 1 次提交
    • D
      Fix exiting of libvirt_lxc program on container quit · 37db3f5d
      Daniel P. Berrange 提交于
      The virLXCControllerClientCloseHook method was mistakenly
      assuming that the private data associated with the network
      client was the virLXCControllerPtr. In fact it was just a
      dummy int, so we were derefencing a bogus struct. The
      frequent result of this was that we would never quit, because
      we tried to arm a non-existant timer.
      
      Fix the code by removing the dummy private data and just
      using the virLXCControllerPtr instance as private data
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      37db3f5d
  22. 22 11月, 2012 2 次提交
    • D
      Log an audit message with the LXC init pid · a6158336
      Daniel P. Berrange 提交于
      Currently the LXC driver logs audit messages when a container
      is started or stopped. These audit messages, however, contain
      the PID of the libvirt_lxc supervisor process. To enable
      sysadmins to correlate with audit messages generated by
      processes /inside/ the container, we need to include the
      container init process PID.
      
      We can't do this in the main 'start' audit message, since
      the init PID is not available at that point. Instead we output
      a completely new audit record, that lists both PIDs.
      
      type=VIRT_CONTROL msg=audit(1353433750.071:363): pid=20180 uid=0 auid=501 ses=3 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='virt=lxc op=init vm="busy" uuid=dda7b947-0846-1759-2873-0f375df7d7eb vm-pid=20371 init-pid=20372 exe="/home/berrange/src/virt/libvirt/daemon/.libs/lt-libvirtd" hostname=? addr=? terminal=pts/6 res=success'
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      a6158336
    • D
      Use virNetServerRun instead of custom main loop · f33e43c2
      Daniel P. Berrange 提交于
      The LXC controller code currently directly invokes the
      libvirt main loop code. The problem is that this misses
      the cleanup of virNetServerClient connections that
      virNetServerRun takes care of.
      
      The result is that when libvirtd is stopped, the
      libvirt_lxc controller process gets stuck in a I/O loop.
      When libvirtd is then started again, it fails to connect
      to the controller and thus kills off the entire domain.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      f33e43c2
  23. 15 11月, 2012 1 次提交
  24. 14 11月, 2012 1 次提交