1. 25 5月, 2011 7 次提交
    • D
      Fix resume on destination when doing non-live tunnelled migration · 73b3e0b7
      Daniel P. Berrange 提交于
      Before running perform in peer-2-peer migration, the current
      guest state must be recorded, so that non-live migration can
      currently unpause a running guest on completion.
      
      * src/qemu/qemu_migration.c: Move check for offline guest
        to fix non-live migration
      73b3e0b7
    • D
      Introduce two method migration APIs · 13555416
      Daniel P. Berrange 提交于
      There are two pieces of information which are desirable for
      migration, which cannot be supplied by applications
      
       - The explicit QEMU migration URI, while using Peer2Peer
         migration
       - An override for the target VM XML
      
      This introduces two new public APIs to support these extra
      parameters. There is no need for extra wire protocool changes,
      since this is supported by the v3 migration enhancements
      
      * include/libvirt/libvirt.h.in,
        src/libvirt.c, src/libvirt_public.syms: Add virDomainMigrate2
        and virDomainMigrateToURI2
      13555416
    • D
      Add a second URI parameter to virDomainMigratePerform3 method · f9f2d4e1
      Daniel P. Berrange 提交于
      The virDomainMigratePerform3 currently has a single URI parameter
      whose meaning varies. It is either
      
       - A QEMU migration URI (normal migration)
       - A libvirtd connection URI (peer2peer migration)
      
      Unfortunately when using peer2peer migration, without also
      using tunnelled migration, it is possible that both URIs are
      required.
      
      This adds a second URI parameter to the virDomainMigratePerform3
      method, to cope with this scenario. Each parameter how has a fixed
      meaning.
      
      NB, there is no way to actually take advantage of this yet,
      since virDomainMigrate/virDomainMigrateToURI do not have any
      way to provide the 2 separate URIs
      
      * daemon/remote.c, src/remote/remote_driver.c,
        src/remote/remote_protocol.x, src/remote_protocol-structs: Add
        the second URI parameter to perform3 message
      * src/driver.h, src/libvirt.c, src/libvirt_internal.h: Add
        the second URI parameter to Perform3 method
      * src/libvirt_internal.h, src/qemu/qemu_migration.c,
        src/qemu/qemu_migration.h: Update to handle URIs correctly
      f9f2d4e1
    • D
      Extend v3 migration protocol to allow app supplied XML for target · 7ad4b6b9
      Daniel P. Berrange 提交于
      This extends the v3 migration protocol such that the
      virDomainMigrateBegin3 and virDomainMigratePerform3
      methods accept an application supplied XML config for
      the target VM.
      
      If the 'xmlin' parameter is NULL, then Begin3 uses the
      current guest XML as normal. A driver implementing the
      Begin3 method should either reject all non-NULL 'xmlin'
      parameters, or strictly validate that the app supplied
      XML does not change guest ABI.
      
      The Perform3 method also needed the xmlin parameter to
      cope with the Peer2Peer migration sequence.
      
      NB it is not yet possible to use this capability since
      neither of the public virDomainMigrate/virDomainMigrateToURI
      methods have a way to pass in XML.
      
      * daemon/remote.c, src/remote/remote_driver.c,
        src/remote/remote_protocol.x, src/remote_protocol-structs:
        Add 'remote_string xmlin' parameter to begin3/perform3
        RPC messages
      * src/libvirt.c, src/driver.h, src/libvirt_internal.h: Add
        'const char *xmlin' parameter to Begin3/Perform3 methods
      * src/qemu/qemu_driver.c, src/qemu/qemu_migration.c,
        src/qemu/qemu_migration.h: Pass xmlin parameter around
        migration methods
      7ad4b6b9
    • M
      esx: Report an error when auth pointer is missing instead of declining · dea64db1
      Matthias Bolte 提交于
      Otherwise an attempt to use virConnectOpen or virConnectOpenAuth without
      auth pointer results in the driver declining the URI and libvirt falling
      back to the remote driver for an esx:// URI.
      dea64db1
    • J
      Fix initialization of current vcpus in libxl driver · 492e493a
      Jim Fehlig 提交于
      The cur_vcpus member of struct libxl_domain_build_info was incorrectly
      initialized to the number of vcpus, when it should have been interpreted
      as a bitmap, where bit X corresponds to online/offline status of vcpuX.
      
      To complicate matters, cur_vcpus is an int, so only 32 vcpus can be
      set online.  Add a check to ensure vcpus does not exceed this limit.
      
      V2: Eric Blake noted a compilation pitfal when '1 << 32' on an int.
          Account for vcpus == 32.
      492e493a
    • E
      build: fix VIR_DEBUG on mingw · 4486f3a2
      Eric Blake 提交于
      We don't use the gnulib vsnprintf replacement, which means that
      on mingw, vsnprintf doesn't support %zn or %lln.
      
      And as it turns out, VIR_GET_VAR_STR was a rather inefficient
      reimplementation of virVasprintf logic.
      
      * src/util/logging.c (VIR_GET_VAR_STR): Drop.
      (virLogMessage): Inline a simpler version here.
      * src/util/virterror.c (VIR_GET_VAR_STR, virRaiseErrorFull):
      Likewise.
      Reported by Matthias Bolte.
      4486f3a2
  2. 24 5月, 2011 12 次提交
  3. 23 5月, 2011 1 次提交
  4. 21 5月, 2011 1 次提交
  5. 20 5月, 2011 1 次提交
  6. 19 5月, 2011 12 次提交
    • D
      Don't generate cookies with v2 migration protocol. · 6b937b24
      Daniel P. Berrange 提交于
      The v2 migration protocol had a limit on cookie length that was
      too small to be useful for QEMU. Avoid generating cookies with
      v2 protocol, so that old libvirtd can still reliably migrate a
      guest to new libvirtd uses v2 protocol.
      
      * src/qemu/qemu_driver.c: Avoid migration cookies with v2
        migration
      6b937b24
    • D
      Fix QEMU migration cookie crash for guests with no graphics · 03f88326
      Daniel P. Berrange 提交于
      When generating a cookie for a guest with no data, the
      QEMU_MIGRATION_COOKIE_GRAPHICS flag was set even if no
      graphics data was added. Avoid setting the flag unless
      it was needed, also add a safety check for mig->graphics
      being non-NULL
      
      * src/qemu/qemu_migration.c: Avoid cookie crash for guest
        with no graphics
      03f88326
    • D
      Ensure p2p and direct migration use the new v3 protocol if available · 2f3c6826
      Daniel P. Berrange 提交于
      The internal virDomainMigratePeer2Peer and virDomainMigrateDirect
      helper methods were not checking whether the target supports the
      v3 migration protocol.
      
      * src/libvirt.c: Use v3 migration protocol for p2p/direct
        migration if available.
      2f3c6826
    • D
      Blank out the 'listenAddr' parameter if empty string · 4bfe396e
      Daniel P. Berrange 提交于
      Some bogus apps are generating a VNC/SPICE/RFB listen attribute
      with no content. This then causes a failure with the graphics
      migration cookie parsing. Blank out the 'listenAddr' parameter
      after parsing domain XML if it is the empty string, so the host
      default takes over
      
      * src/qemu/qemu_migration.c: Blank out listenAddr parameter
        if empty
      4bfe396e
    • E
      remote: remove special case for getting version · 8fcbc0c6
      Eric Blake 提交于
      The on-the-wire protocol is identical; XDR guarantees that
      both 'hyper' and 'unsigned hyper' are transmitted as 8 bytes.
      
      * src/remote/remote_protocol.x (remote_get_version_ret)
      (remote_get_lib_version_ret): Match public API.
      * daemon/remote_generator.pl: Drop special case.
      * src/remote_protocol-structs: Reflect updated type.
      8fcbc0c6
    • E
      build: silence clang false positive · 7647422a
      Eric Blake 提交于
      Clang couldn't quite see that the same condition of
      (flags & VIR_DOMAIN_MEM_CONFIG) is used twice, such that
      the second block is guaranteed that def was assigned in
      the first block.
      
      * src/libxl/libxl_driver.c (libxlDomainSetMemoryFlags): Add a hint
      for clang.
      7647422a
    • M
      Improve invalid argument checks for the public API · 4d2a1896
      Matthias Bolte 提交于
      4d2a1896
    • M
      Clarify that virDomainGet(Memory|Blkio)Parameters doesn't support subsets · 191e1ec6
      Matthias Bolte 提交于
      Improve invalid argument checks in the size query case. The drivers already
      relied on this unchecked behavior.
      
      Relax the implementation of virDomainGet(Memory|Blkio)MemoryParameters
      in the drivers and allow to pass more memory than necessary for all
      parameters.
      191e1ec6
    • M
    • M
      Clarify that virDomainSetSchedulerParameters(Flags) can take subsets · d870ec36
      Matthias Bolte 提交于
      Add invalid argument checks for params and nparams to the public API
      and remove them from the drivers (e.g. xend).
      
      Add subset handling to libxl and test drivers.
      d870ec36
    • M
      Clarify the semantic of virDomainGetSchedulerParameters arguments · e430c0d0
      Matthias Bolte 提交于
      params and nparams are essential and cannot be NULL. Check this in
      libvirt.c and remove redundant checks from the drivers (e.g. xend).
      
      Instead of enforcing that nparams must point to exact same value as
      returned by virDomainGetSchedulerType relax this to a lower bound
      check. This is what some drivers (e.g. xen hypervisor and esx)
      already did. Other drivers (e.g. xend) didn't check nparams at all
      and assumed that there is enough space in params.
      
      Unify the behavior in all drivers to a lower bound check and update
      nparams to the number of valid values in params on success.
      e430c0d0
    • M
      Clarify semantic of nparams argument of virDomainGetSchedulerType · 7b2f20b1
      Matthias Bolte 提交于
      Some drivers assumed it can be NULL (e.g. qemu and lxc) and check it
      before assigning to it, other drivers assumed it must be non-NULL
      (e.g. test and esx) and just assigned to it.
      
      Unify this to nparams being optional and document it.
      7b2f20b1
  7. 18 5月, 2011 5 次提交
    • C
      Fix messages using VIR_ERR_XML_ERROR · ed97be61
      Cole Robinson 提交于
      This error code has existed since the dawn of time, yet the messages it
      generates are almost universally busted. Here's a small sampling:
      
      src/conf/domain_conf.c:4889 : XML description for missing root element is not well formed or invalid
      src/conf/domain_conf.c:4951 : XML description for unknown device type is not well formed or invalid
      src/conf/domain_conf.c:5460 : XML description for maximum vcpus must be an integer is not well formed or invalid
      src/conf/domain_conf.c:5468 : XML description for invalid maxvcpus %(count)lu is not well formed or invalid
      
      Fix up the error code to instead be
      
      XML error: <msg>
      
      Adjust the few locations that were using the original correctly (or shouldn't
      have been using the error code at all).
      
      v2:
          Fix wording of error code without a passed argument
      ed97be61
    • D
      Add support for 'passthru' mode for direct network interfaces · 5252a06d
      Dirk Herrendorefer 提交于
      starting with kernel 2.6.38 macvtap supports a 'passthru' mode for
      attaching virtual functions of a SRIOV capable network card directly to a VM.
      This patch adds the capability to configure such a device.
      Signed-off-by: NDirk Herrendoerfer <d.herrendoerfer@herrendoerfer.name>
      5252a06d
    • M
      qemu: fix typo in spice migration code · 45b28f7c
      Michal Privoznik 提交于
      This typo caused XPath returning improper value and thus not
      working spice after migration.
      45b28f7c
    • H
      remote: introduce remoteSetSchedulerParametersFlags · bb9f1bbf
      Hu Tao 提交于
      support for virDomainSetSchedulerParametersFlags of remote driver.
      bb9f1bbf
    • H
      qemu: introduce qemuSetSchedulerParametersFlags · a9189e2c
      Hu Tao 提交于
      Support for virDomainSetSchedulerParametersFlags of qemu driver.
      a9189e2c
  8. 17 5月, 2011 1 次提交