1. 16 5月, 2011 1 次提交
  2. 13 5月, 2011 3 次提交
    • C
      lxc: Use virDomainEventState helpers · 1ded8942
      Cole Robinson 提交于
      v3:
          Adjust for new virDomainEventStateNew argument
      1ded8942
    • M
      virFDStream: Add option for delete file after it's opening · 6a1f5f56
      Michal Privoznik 提交于
      This is needed if we want to transfer a temporary file. If the
      transfer is done with iohelper, we might run into a race condition,
      where we unlink() file before iohelper is executed.
      
      * src/fdstream.c, src/fdstream.h,
        src/util/iohelper.c: Add new option
      * src/lxc/lxc_driver.c, src/qemu/qemu_driver.c,
        src/storage/storage_driver.c, src/uml/uml_driver.c,
        src/xen/xen_driver.c: Expand existing function calls
      6a1f5f56
    • M
      screenshot: Defining the internal API · 3c386643
      Michal Privoznik 提交于
      * src/driver.h: Stub code for new API
      * src/esx/esx_driver.c, src/libxl/libxl_driver.c,
        src/lxc/lxc_driver.c, src/openvz/openvz_driver.c,
        src/phyp/phyp_driver.c, src/qemu/qemu_driver.c,
        rc/remote/remote_driver.c, rc/test/test_driver.c,
        src/uml/uml_driver.c, src/vbox/vbox_tmpl.c,
        src/vmware/vmware_driver.c, src/xen/xen_driver.c,
        src/xen/xen_driver.h, src/xen/xen_hypervisor.c,
        src/xen/xen_inotify.c, src/xen/xend_internal.c,
        src/xen/xm_internal.c, src/xen/xs_internal.c,
        src/xenapi/xenapi_driver.c: Add dummy entries in driver
        table for new APIs
      3c386643
  3. 12 5月, 2011 1 次提交
    • L
      libvirt,logging: cleanup VIR_XXX0() · b65f37a4
      Lai Jiangshan 提交于
      These VIR_XXXX0 APIs make us confused, use the non-0-suffix APIs instead.
      
      How do these coversions works? The magic is using the gcc extension of ##.
      When __VA_ARGS__ is empty, "##" will swallow the "," in "fmt," to
      avoid compile error.
      
      example: origin				after CPP
      	high_level_api("%d", a_int)	low_level_api("%d", a_int)
      	high_level_api("a  string")	low_level_api("a  string")
      
      About 400 conversions.
      
      8 special conversions:
      VIR_XXXX0("") -> VIR_XXXX("msg") (avoid empty format) 2 conversions
      VIR_XXXX0(string_literal_with_%) -> VIR_XXXX(%->%%) 0 conversions
      VIR_XXXX0(non_string_literal) -> VIR_XXXX("%s", non_string_literal)
        (for security) 6 conversions
      Signed-off-by: NLai Jiangshan <laijs@cn.fujitsu.com>
      b65f37a4
  4. 11 5月, 2011 4 次提交
  5. 04 5月, 2011 2 次提交
    • E
      lxc: report correct error · 32388f12
      Eric Blake 提交于
      Clang noticed a dead assignment, which turned out to be the use
      of the wrong variable.  rc starts life as -1, and is only ever
      assigned to 0 just before a successful cleanup.
      
      * src/lxc/lxc_driver.c (lxcSetupInterfaces): Don't call
      virReportSystemError(-1).
      32388f12
    • E
      Revert "lxc: Do not try to reconnect inactive domain when do lxcStartup" · 6e177fa1
      Eric Blake 提交于
      This reverts commit 0e7f7f85.
      
      From the mailing list:
      
      > So, AFAICT, this patch means we will never reconnect to any LXC
      > VMs now.
      >
      > The correct solution, is to refactor LXC driver startup to work
      > the same way as the QEMU driver startup.
      >
      >   - Load all the live state XML files (to pick up running VMs)
      >   - Reconnect to all VMs
      >   - Load all the persistent config XML files (to pick up any additional
      >     inactive guets)
      
      But that solution is invasive enough to be post-0.9.1.
      6e177fa1
  6. 03 5月, 2011 1 次提交
  7. 29 3月, 2011 2 次提交
    • O
      cputune: Support cputune for lxc driver · e98eb7f4
      Osier Yang 提交于
      LXC driver doesn't support vcpu affinity yet, so just need
      to modify it to support cpu shares.
      e98eb7f4
    • D
      Enhance the streams helper to support plain file I/O · e886237a
      Daniel P. Berrange 提交于
      The O_NONBLOCK flag doesn't work as desired on plain files
      or block devices. Introduce an I/O helper program that does
      the blocking I/O operations, communicating over a pipe that
      can support O_NONBLOCK
      
      * src/fdstream.c, src/fdstream.h: Add non-blocking I/O
        on plain files/block devices
      * src/Makefile.am, src/util/iohelper.c: I/O helper program
      * src/qemu/qemu_driver.c, src/lxc/lxc_driver.c,
        src/uml/uml_driver.c, src/xen/xen_driver.c: Update for
        streams API change
      e886237a
  8. 22 3月, 2011 2 次提交
    • D
      Fix uninitialized variable & error reporting in LXC veth setup · c59176c1
      Daniel P. Berrange 提交于
      THe veth setup in LXC had a couple of flaws, first brInit did
      not report any error when it failed. Second vethCreate() did
      not correctly initialize the variable containing the return
      code, so could report failure even when it succeeded.
      
      * src/lxc/lxc_driver.c: Report error when brInit fails
      * src/lxc/veth.c: Fix uninitialized variable
      c59176c1
    • D
      Add public API for setting migration speed on the fly · cb4aba9b
      Daniel P. Berrange 提交于
      It is possible to set a migration speed limit when starting
      migration. This new API allows the speed limit to be changed
      on the fly to adjust to changing conditions
      
      * src/driver.h, src/libvirt.c, src/libvirt_public.syms,
        include/libvirt/libvirt.h.in: Add virDomainMigrateSetMaxSpeed
      * src/esx/esx_driver.c, src/lxc/lxc_driver.c,
        src/opennebula/one_driver.c, src/openvz/openvz_driver.c,
        src/phyp/phyp_driver.c, src/qemu/qemu_driver.c,
        src/remote/remote_driver.c, src/test/test_driver.c,
        src/uml/uml_driver.c, src/vbox/vbox_tmpl.c,
        src/vmware/vmware_driver.c, src/xen/xen_driver.c,
        src/libxl/libxl_driver.c: Stub new API
      cb4aba9b
  9. 18 3月, 2011 1 次提交
  10. 15 3月, 2011 1 次提交
    • D
      Make LXC container startup/shutdown/I/O more robust · 4e3117ae
      Daniel P. Berrange 提交于
      The current LXC I/O controller looks for HUP to detect
      when a guest has quit. This isn't reliable as during
      initial bootup it is possible that 'init' will close
      the console and let mingetty re-open it. The shutdown
      of containers was also flakey because it only killed
      the libvirt I/O controller and expected container
      processes to gracefully follow.
      
      Change the I/O controller such that when it see HUP
      or an I/O error, it uses kill($PID, 0) to see if the
      process has really quit.
      
      Change the container shutdown sequence to use the
      virCgroupKillPainfully function to ensure every
      really goes away
      
      This change makes the use of the 'cpu', 'devices'
      and 'memory' cgroups controllers compulsory with
      LXC
      
      * docs/drvlxc.html.in: Document that certain cgroups
        controllers are now mandatory
      * src/lxc/lxc_controller.c: Check if PID is still
        alive before quitting on I/O error/HUP
      * src/lxc/lxc_driver.c: Use virCgroupKillPainfully
      4e3117ae
  11. 11 3月, 2011 2 次提交
  12. 25 2月, 2011 1 次提交
    • D
      Allow hash tables to use generic pointers as keys · 16ba2aaf
      Daniel P. Berrange 提交于
      Relax the restriction that the hash table key must be a string
      by allowing an arbitrary hash code generator + comparison func
      to be provided
      
      * util/hash.c, util/hash.h: Allow any pointer as a key
      * internal.h: Include stdbool.h as standard.
      * conf/domain_conf.c, conf/domain_conf.c,
        conf/nwfilter_params.c, nwfilter/nwfilter_gentech_driver.c,
        nwfilter/nwfilter_gentech_driver.h, nwfilter/nwfilter_learnipaddr.c,
        qemu/qemu_command.c, qemu/qemu_driver.c,
        qemu/qemu_process.c, uml/uml_driver.c,
        xen/xm_internal.c: s/char */void */ in hash callbacks
      16ba2aaf
  13. 24 2月, 2011 1 次提交
  14. 21 2月, 2011 1 次提交
    • E
      maint: kill all remaining uses of old DEBUG macro · 994e7567
      Eric Blake 提交于
      Done mechanically with:
      $ git grep -l '\bDEBUG0\? *(' | xargs -L1 sed -i 's/\bDEBUG0\? *(/VIR_&/'
      
      followed by manual deletion of qemudDebug in daemon/libvirtd.c, along
      with a single 'make syntax-check' fallout in the same file, and the
      actual deletion in src/util/logging.h.
      
      * src/util/logging.h (DEBUG, DEBUG0): Delete.
      * daemon/libvirtd.h (qemudDebug): Likewise.
      * global: Change remaining clients over to VIR_DEBUG counterpart.
      994e7567
  15. 09 2月, 2011 1 次提交
    • E
      sysinfo: define internal driver API · dec13a5a
      Eric Blake 提交于
      * src/driver.h (virDrvGetSysinfo): New typedef.
      (_virDriver): New callback member.
      * src/esx/esx_driver.c (esxDriver): Add stub for driver.
      * src/lxc/lxc_driver.c (lxcDriver): Likewise.
      * src/opennebula/one_driver.c (oneDriver): Likewise.
      * src/openvz/openvz_driver.c (openvzDriver): Likewise.
      * src/phyp/phyp_driver.c (phypDriver): Likewise.
      * src/qemu/qemu_driver.c (qemuDriver): Likewise.
      * src/remote/remote_driver.c (remote_driver): Likewise.
      * src/test/test_driver.c (testDriver): Likewise.
      * src/uml/uml_driver.c (umlDriver): Likewise.
      * src/vbox/vbox_tmpl.c (Driver): Likewise.
      * src/vmware/vmware_driver.c (vmwareDriver): Likewise.
      * src/xen/xen_driver.c (xenUnifiedDriver): Likewise.
      * src/xenapi/xenapi_driver.c (xenapiDriver): Likewise.
      dec13a5a
  16. 22 1月, 2011 1 次提交
  17. 19 1月, 2011 1 次提交
  18. 15 1月, 2011 2 次提交
    • N
      memtune: Let virsh know the unlimited value for memory tunables · d94a14f8
      Nikunj A. Dadhania 提交于
      Display or set unlimited values for memory parameters. Unlimited is
      represented by INT64_MAX in memory cgroup.
      Signed-off-by: NNikunj A. Dadhania <nikunj@linux.vnet.ibm.com>
      Reported-by: NJustin Clift <jclift@redhat.com>
      d94a14f8
    • E
      domain_conf: split source data out from ChrDef · 98334e7c
      Eric Blake 提交于
      This opens up the possibility of reusing the smaller ChrSourceDef
      for both qemu monitor and a passthrough smartcard device.
      
      * src/conf/domain_conf.h (_virDomainChrDef): Factor host
      details...
      (_virDomainChrSourceDef): ...into new struct.
      (virDomainChrSourceDefFree): New prototype.
      * src/conf/domain_conf.c (virDomainChrDefFree)
      (virDomainChrDefParseXML, virDomainChrDefFormat): Split...
      (virDomainChrSourceDefClear, virDomainChrSourceDefFree)
      (virDomainChrSourceDefParseXML, virDomainChrSourceDefFormat):
      ...into new functions.
      (virDomainChrDefParseTargetXML): Update clients to reflect type
      split.
      * src/vmx/vmx.c (virVMXParseSerial, virVMXParseParallel)
      (virVMXFormatSerial, virVMXFormatParallel): Likewise.
      * src/xen/xen_driver.c (xenUnifiedDomainOpenConsole): Likewise.
      * src/xen/xend_internal.c (xenDaemonParseSxprChar)
      (xenDaemonFormatSxprChr): Likewise.
      * src/vbox/vbox_tmpl.c (vboxDomainDumpXML, vboxAttachSerial)
      (vboxAttachParallel): Likewise.
      * src/security/security_dac.c (virSecurityDACSetChardevLabel)
      (virSecurityDACSetChardevCallback)
      (virSecurityDACRestoreChardevLabel)
      (virSecurityDACRestoreChardevCallback): Likewise.
      * src/security/security_selinux.c (SELinuxSetSecurityChardevLabel)
      (SELinuxSetSecurityChardevCallback)
      (SELinuxRestoreSecurityChardevLabel)
      (SELinuxSetSecurityChardevCallback): Likewise.
      * src/security/virt-aa-helper.c (get_files): Likewise.
      * src/lxc/lxc_driver.c (lxcVmStart, lxcDomainOpenConsole):
      Likewise.
      * src/uml/uml_conf.c (umlBuildCommandLineChr): Likewise.
      * src/uml/uml_driver.c (umlIdentifyOneChrPTY, umlIdentifyChrPTY)
      (umlDomainOpenConsole): Likewise.
      * src/qemu/qemu_command.c (qemuBuildChrChardevStr)
      (qemuBuildChrArgStr, qemuBuildCommandLine)
      (qemuParseCommandLineChr): Likewise.
      * src/qemu/qemu_domain.c (qemuDomainObjPrivateXMLFormat)
      (qemuDomainObjPrivateXMLParse): Likewise.
      * src/qemu/qemu_cgroup.c (qemuSetupChardevCgroup): Likewise.
      * src/qemu/qemu_hotplug.c (qemuDomainAttachNetDevice): Likewise.
      * src/qemu/qemu_driver.c (qemudFindCharDevicePTYsMonitor)
      (qemudFindCharDevicePTYs, qemuPrepareChardevDevice)
      (qemuPrepareMonitorChr, qemudShutdownVMDaemon)
      (qemuDomainOpenConsole): Likewise.
      * src/qemu/qemu_command.h (qemuBuildChrChardevStr)
      (qemuBuildChrArgStr): Delete, now that they are static.
      * src/libvirt_private.syms (domain_conf.h): New exports.
      * cfg.mk (useless_free_options): Update list.
      * tests/qemuxml2argvtest.c (testCompareXMLToArgvFiles): Update
      tests.
      98334e7c
  19. 25 11月, 2010 1 次提交
    • O
      Implementations of virDomainIsUpdated for drivers except qemu · f3605b33
      Osier Yang 提交于
      Except LXC and UML driver, implementations of all other drivers
      simply return 0, because these drivers doesn't have config both
      in memory and on disk, no need to track if the domain of these
      drivers updated or not.
      
      Rename "xenUnifiedDomainisPersistent" to "xenUnifiedDomainIsPersistent"
      
      * esx/esx_driver.c
      * lxc/lxc_driver.c
      * opennebula/one_driver.c
      * openvz/openvz_driver.c
      * phyp/phyp_driver.c
      * test/test_driver.c
      * uml/uml_driver.c
      * vbox/vbox_tmpl.c
      * xen/xen_driver.c
      * xenapi/xenapi_driver.c
      f3605b33
  20. 24 11月, 2010 1 次提交
    • O
      define internal driver API · 37a02efd
      Osier Yang 提交于
      * src/driver.h (new typedef, new callback member for "_virDriver")
      * src/esx/esx_driver.c
      * src/lxc/lxc_driver.c
      * src/opennebula/one_driver.c
      * src/openvz/openvz_driver.c
      * src/phyp/phyp_driver.c
      * src/qemu/qemu_driver.c
      * src/remote/remote_driver.c
      * src/test/test_driver.c
      * src/uml/uml_driver.c
      * src/vbox/vbox_tmpl.c
      * src/xen/xen_driver.c
      * src/xenapi/xenapi_driver.c
      37a02efd
  21. 23 11月, 2010 1 次提交
    • C
      Make state driver device hotplug/update actually transient · 45ec297d
      Cole Robinson 提交于
      The current semantics of non-persistent hotplug/update are confusing: the
      changes will persist as long as the in memory domain definition isn't
      overwritten. This means hotplug changes stay around until the domain is
      redefined or libvirtd is restarted.
      
      Call virDomainObjSetDefTransient at VM startup, so that we properly discard
      hotplug changes when the VM is shutdown.
      45ec297d
  22. 12 11月, 2010 2 次提交
    • D
      Wire up virDomainOpenConsole for LXC, Xen and UML · 5fb9db27
      Daniel P. Berrange 提交于
      Introduce implementations of the virDomainOpenConsole() API
      for LXC, Xen and UML drivers.
      
      * src/lxc/lxc_driver.c, src/lxc/lxc_driver.c,
        src/xen/xen_driver.c: Wire up virDomainOpenConsole
      5fb9db27
    • D
      Introduce a virDomainOpenConsole API · 88a9b382
      Daniel P. Berrange 提交于
      To enable virsh console (or equivalent) to be used remotely
      it is necessary to provide remote access to the /dev/pts/XXX
      pseudo-TTY associated with the console/serial/parallel device
      in the guest. The virStream API provide a bi-directional I/O
      stream capability that can be used for this purpose. This
      patch thus introduces a virDomainOpenConsole API that uses
      the stream APIs.
      
      * src/libvirt.c, src/libvirt_public.syms,
        include/libvirt/libvirt.h.in, src/driver.h: Define the
        new virDomainOpenConsole API
      * src/esx/esx_driver.c, src/lxc/lxc_driver.c,
        src/opennebula/one_driver.c, src/openvz/openvz_driver.c,
        src/phyp/phyp_driver.c, src/qemu/qemu_driver.c,
        src/remote/remote_driver.c, src/test/test_driver.c,
        src/uml/uml_driver.c, src/vbox/vbox_tmpl.c,
        src/xen/xen_driver.c, src/xenapi/xenapi_driver.c: Stub
        API entry point
      88a9b382
  23. 10 11月, 2010 1 次提交
    • S
      bye to close(), welcome to VIR_(FORCE_)CLOSE() · 60ae1c34
      Stefan Berger 提交于
      Using automated replacement with sed and editing I have now replaced all
      occurrences of close() with VIR_(FORCE_)CLOSE() except for one, of
      course. Some replacements were straight forward, others I needed to pay
      attention. I hope I payed attention in all the right places... Please
      have a look. This should have at least solved one more double-close
      error.
      60ae1c34
  24. 09 11月, 2010 1 次提交
  25. 21 10月, 2010 1 次提交
  26. 20 10月, 2010 2 次提交
    • G
      Don't fail lxc domain start when memory controller support is missing · 679b464b
      Guido Günther 提交于
      Debian stock kernel has CONFIG_CGROUP_MEM_RES_CTLR disabled due to the
      overhead [1]. Allow to start containers if the corresponding files in
      the cgroup filesystem are missing. This fixes Debian bug #566180 [2].
      
      [1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=534964
      [2] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=566180
      679b464b
    • E
      vcpu: define internal driver API · dd255d64
      Eric Blake 提交于
      * src/driver.h (virDrvDomainSetVcpusFlags)
      (virDrvDomainGetVcpusFlags): New typedefs.
      (_virDriver): New callback members.
      * src/esx/esx_driver.c (esxDriver): Add stub for driver.
      * src/lxc/lxc_driver.c (lxcDriver): Likewise.
      * src/opennebula/one_driver.c (oneDriver): Likewise.
      * src/openvz/openvz_driver.c (openvzDriver): Likewise.
      * src/phyp/phyp_driver.c (phypDriver): Likewise.
      * src/qemu/qemu_driver.c (qemuDriver): Likewise.
      * src/remote/remote_driver.c (remote_driver): Likewise.
      * src/test/test_driver.c (testDriver): Likewise.
      * src/uml/uml_driver.c (umlDriver): Likewise.
      * src/vbox/vbox_tmpl.c (Driver): Likewise.
      * src/xen/xen_driver.c (xenUnifiedDriver): Likewise.
      * src/xenapi/xenapi_driver.c (xenapiDriver): Likewise.
      dd255d64
  27. 13 10月, 2010 2 次提交