1. 16 5月, 2011 1 次提交
  2. 13 5月, 2011 4 次提交
    • C
      test: Use virDomainEventState helpers · 4d7297f8
      Cole Robinson 提交于
      v3:
          Adjust for new virDomainEventStateNew argument
      4d7297f8
    • C
      xml: Use virXMLParse* helpers everywhere · b9e51e56
      Cole Robinson 提交于
      virt-aa-helper isn't even compile tested since I don't have the setup for
      it.
      
      v2:
          virt-aa-helper fixes from Eric
      b9e51e56
    • C
      xml: Make sure virXpathNodeSet always sets an error · 0571c3af
      Cole Robinson 提交于
      And update callers to actually respect the error
      0571c3af
    • 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 2 次提交
  5. 17 4月, 2011 1 次提交
  6. 22 3月, 2011 1 次提交
    • 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
  7. 11 3月, 2011 2 次提交
  8. 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
  9. 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
  10. 29 1月, 2011 1 次提交
  11. 22 1月, 2011 1 次提交
  12. 19 1月, 2011 2 次提交
  13. 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
  14. 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
  15. 23 11月, 2010 3 次提交
    • C
      qemu: setvcpus: Simplify altering the persistent config · 39b62654
      Cole Robinson 提交于
      Do this by adding a helper function to get the persistent domain config. This
      should be useful for other functions that may eventually want to alter
      the persistent domain config (attach/detach device). Also make similar changes
      to the test drivers setvcpus command.
      
      A caveat is that the function will return the running config for a transient
      domain, rather than error. This simplifies callers, as long as they use
      other methods to ensure the guest is persistent.
      39b62654
    • C
      qemu: setvcpus: Fix maxvcpus check · d7520291
      Cole Robinson 提交于
      Doing 'virsh setvcpus $vm --config 10' doesn't check the value against the
      domains maxvcpus value. A larger value for example will prevent the guest
      from starting.
      
      Also make a similar change to the test driver.
      d7520291
    • 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
  16. 12 11月, 2010 1 次提交
    • 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
  17. 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
  18. 20 10月, 2010 3 次提交
    • E
      vcpu: support all flags in test driver · 6c9e6b95
      Eric Blake 提交于
      * src/test/test_driver.c (testDomainGetVcpusFlags)
      (testDomainSetVcpusFlags): Support all flags.
      (testDomainUpdateVCPUs): Update cpu count here.
      6c9e6b95
    • E
      vcpu: make old API trivially wrap to new API · 50c51f13
      Eric Blake 提交于
      Note - this wrapping is completely mechanical; the old API will
      function identically, since the new API validates that the exact
      same flags are provided by the old API.  On a per-driver basis,
      it may make sense to have the old API pass a different set of flags,
      but that should be done in the per-driver patch that implements
      the full range of flag support in the new API.
      
      * src/esx/esx_driver.c (esxDomainSetVcpus, escDomainGetMaxVpcus):
      Move guts...
      (esxDomainSetVcpusFlags, esxDomainGetVcpusFlags): ...to new
      functions.
      (esxDriver): Trivially support the new API.
      * src/openvz/openvz_driver.c (openvzDomainSetVcpus)
      (openvzDomainSetVcpusFlags, openvzDomainGetMaxVcpus)
      (openvzDomainGetVcpusFlags, openvzDriver): Likewise.
      * src/phyp/phyp_driver.c (phypDomainSetCPU)
      (phypDomainSetVcpusFlags, phypGetLparCPUMAX)
      (phypDomainGetVcpusFlags, phypDriver): Likewise.
      * src/qemu/qemu_driver.c (qemudDomainSetVcpus)
      (qemudDomainSetVcpusFlags, qemudDomainGetMaxVcpus)
      (qemudDomainGetVcpusFlags, qemuDriver): Likewise.
      * src/test/test_driver.c (testSetVcpus, testDomainSetVcpusFlags)
      (testDomainGetMaxVcpus, testDomainGetVcpusFlags, testDriver):
      Likewise.
      * src/vbox/vbox_tmpl.c (vboxDomainSetVcpus)
      (vboxDomainSetVcpusFlags, virDomainGetMaxVcpus)
      (virDomainGetVcpusFlags, virDriver): Likewise.
      * src/xen/xen_driver.c (xenUnifiedDomainSetVcpus)
      (xenUnifiedDomainSetVcpusFlags, xenUnifiedDomainGetMaxVcpus)
      (xenUnifiedDomainGetVcpusFlags, xenUnifiedDriver): Likewise.
      * src/xenapi/xenapi_driver.c (xenapiDomainSetVcpus)
      (xenapiDomainSetVcpusFlags, xenapiDomainGetMaxVcpus)
      (xenapiDomainGetVcpusFlags, xenapiDriver): Likewise.
      (xenapiError): New helper macro.
      50c51f13
    • 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
  19. 13 10月, 2010 2 次提交
    • N
      XML parsing for memory tunables · d390fce4
      Nikunj A. Dadhania 提交于
      Adding parsing code for memory tunables in the domain xml file
      also change the internal define structures used for domain memory
      informations
      Adds a new specific test
      d390fce4
    • N
      Adding virDomainSetMemoryParameters and virDomainGetMemoryParameters API · 0cd78232
      Nikunj A. Dadhania 提交于
      Public api to set/get memory tunables supported by the hypervisors.
      
      dv:
      * some cleanups in libvirt.c
      * adding extra checks in libvirt.c new entry points
      
      v4:
      * Move exporting public API to this patch
      * Add unsigned int flags to the public api for future extensions
      
      v3:
      * Add domainGetMemoryParamters and NULL in all the driver interface
      
      v2:
      * Initialize domainSetMemoryParameters to NULL in all the driver
        interface structure.
      0cd78232
  20. 10 9月, 2010 1 次提交
  21. 24 7月, 2010 1 次提交
    • C
      Qemu Monitor API entry point. · 21adf03c
      Chris Lalancette 提交于
      Add the library entry point for the new virDomainQemuMonitorCommand()
      entry point.  Because this is not part of the "normal" libvirt API,
      it gets its own header file, library file, and will eventually
      get its own over-the-wire protocol later in the series.
      
      Changes since v1:
       - Go back to using the virDriver table for qemuDomainMonitorCommand, due to
         linking issues
       - Added versioning information to the libvirt-qemu.so
      
      Changes since v2:
       - None
      
      Changes since v3:
       - Add LGPL header to libvirt-qemu.c
       - Make virLibConnError and virLibDomainError macros instead of function calls
      
      Changes since v4:
       - Move exported symbols to libvirt_qemu.syms
      Signed-off-by: NChris Lalancette <clalance@redhat.com>
      21adf03c
  22. 15 6月, 2010 2 次提交
    • E
      drivers: add virDomainCreateWithFlags if virDomainCreate exists · de3aadaa
      Eric Blake 提交于
      * src/esx/esx_driver.c (esxDomainCreate): Move guts...
      (esxDomainCreateWithFlags): ...to new function.
      (esxDriver): Trivially support the new API.
      * src/lxc/lxc_driver.c (lxcDomainStart, lxcDomainStartWithFlags)
      (lxcDriver): Likewise.
      * src/opennebula/one_driver.c (oneDomainStart)
      (oneDomainStartWithFlags, oneDriver): Likewise.
      * src/openvz/openvz_driver.c (openvzDomainCreate)
      (openvzDomainCreateWithFlags, openvzDriver): Likewise.
      * src/qemu/qemu_driver.c (qemudDomainStart)
      (qemudDomainStartWithFlags, qemuDriver): Likewise.
      * src/test/test_driver.c (testDomainCreate)
      (testDomainCreateWithFlags, testDriver): Likewise.
      * src/uml/uml_driver.c (umlDomainStart, umlDomainStartWithFlags)
      (umlDriver): Likewise.
      * src/vbox/vbox_tmpl.c (vboxDomainCreate)
      (vboxDomainCreateWithFlags, Driver): Likewise.
      * src/xen/xen_driver.c (xenUnifiedDomainCreate)
      (xenUnifiedDomainCreateWithFlags, xenUnifiedDriver): Likewise.
      * src/xenapi/xenapi_driver.c (xenapiDomainCreate)
      (xenapiDomainCreateWithFlags, xenapiDriver): Likewise.
      de3aadaa
    • E
      libvirt: introduce domainCreateWithFlags API · 460ca88b
      Eric Blake 提交于
      Persistent domain creation needs the same features as transient
      domains, but virDomainCreate lacks the flags argument present in
      virDomainCreateXML.  virDomainCreateFlags is already claimed as
      a public enum, so we have to break convention and expose
      virDomainCreateWithFlags.
      
      * include/libvirt/libvirt.h.in (virDomainCreateWithFlags): Add.
      * src/driver.h (virDrvDomainCreateWithFlags): Internal API.
      * src/libvirt.c (virDomainCreateWithFlags): Glue public API to
      driver API.
      * src/libvirt_public.syms (LIBVIRT_0.8.2): Expose public API.
      * 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.
      460ca88b
  23. 09 6月, 2010 1 次提交
    • E
      virDomainCreateXML: support new flag · 2502ebb3
      Eric Blake 提交于
      * include/libvirt/libvirt.h.in (virDomainCreateFlags): Add
      VIR_DOMAIN_START_PAUSED.
      * src/libvirt.c (virDomainCreateXML): Update documentation.
      * src/lxc/lxc_driver.c (lxcDomainCreateAndStart): Reject new flag
      as unimplemented.
      * src/opennebula/one_driver.c (oneDomainCreateAndStart):
      Likewise.
      * src/openvz/openvz_driver.c (openvzDomainCreateXML): Likewise.
      * src/phyp/phyp_driver.c (phypDomainCreateAndStart): Likewise.
      * src/qemu/qemu_driver.c (qemudDomainCreate): Likewise.
      * src/test/test_driver.c (testDomainCreateXML): Likewise.
      * src/uml/uml_driver.c (umlDomainCreate): Likewise.
      * src/vbox/vbox_tmpl.c (vboxDomainCreateXML): Likewise.
      * src/xen/xend_internal.c (xenDaemonCreateXML): Likewise.
      * src/xenapi/xenapi_driver.c (xenapiDomainCreateXML): Likewise.
      2502ebb3
  24. 18 5月, 2010 1 次提交
    • J
      maint: add more free-like functions to the list and deal with fallout · a986892e
      Jim Meyering 提交于
      * cfg.mk (useless_free_options): Add many vir*Free* function names,
      and then remove the useless if-before-free tests exposed by running
      make syntax-check.
      * src/conf/interface_conf.c (virInterfaceDefFree): Remove useless "if".
      (virInterfaceAssignDef): Likewise.
      * src/conf/network_conf.c (virNetworkAssignDef): Likewise.
      * src/conf/storage_conf.c (virStoragePoolObjAssignDef): Likewise.
      * src/node_device/node_device_hal.c (dev_create): Likewise.
      * src/security/virt-aa-helper.c (vahDeinit): Likewise.
      * src/test/test_driver.c (testNodeDeviceCreateXML): Likewise.
      * src/util/conf.c (virConfSetValue): Likewise.
      a986892e
  25. 30 4月, 2010 1 次提交
    • D
      Internal driver API infrastructure for virDomainGetBlockInfo · 46bad512
      Daniel P. Berrange 提交于
      This defines the internal driver API and stubs out each driver
      
      * src/driver.h: Define virDrvDomainGetBlockInfo signature
      * src/libvirt.c, src/libvirt_public.syms: Glue public API to drivers
      * 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/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 out driver
      46bad512
  26. 09 4月, 2010 3 次提交