1. 25 5月, 2011 4 次提交
    • 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 14 次提交
  3. 23 5月, 2011 2 次提交
  4. 22 5月, 2011 1 次提交
    • W
      build: generate files when building without libvirtd · 7ed95b2c
      Wen Congyang 提交于
      Steps to reproduce this problem:
      1. # ./autogen.sh --without-libvirtd
      2. # make dist
         ...
         make[1]: Entering directory `/home/wency/source/libvirt-nodaemon/daemon'
         make[1]: *** No rule to make target `remote_dispatch_prototypes.h', needed by `distdir'.  Stop.
         make[1]: Leaving directory `/home/wency/source/libvirt-nodaemon/daemon'
         make: *** [distdir] Error 1
      7ed95b2c
  5. 21 5月, 2011 2 次提交
  6. 20 5月, 2011 6 次提交
  7. 19 5月, 2011 11 次提交
    • 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
    • E
      virsh: optimize creation of default connection · d218344e
      Eric Blake 提交于
      Ramon de Carvalho Valle reported a problem with:
      virsh connect qemu:///system
      as a non-root user.  The real root problem appears to be a regression
      in libvirtd being auto-started on the default qemu:///session URI;
      however, the symptom points to an independent flaw in virsh - we
      shouldn't be wasting efforts on making a connection if we aren't going
      to be using that connection.  Fixing virsh avoids Ramon's issue, while
      I work in the meantime to fix the real libvirtd regression.
      
      This patch looks big, but that's because 'gcc -Wmissing-field-initializers'
      gets triggered by './autobuild.sh --enable-compile-warnings=error', so I
      had to add 0 initialization to everyone (rather than my preference of
      just adding the non-zero flags to virshCmds and to cmdConnect).
      
      Meanwhile, if you use 'virsh -c URI', the connection must succeed; this
      patch _only_ optimizes the default connection to be deferred to a later
      point where we know if a particular command to be run needs a connection.
      
      * tools/virsh.c (VSH_CMD_FLAG_NOCONNECT): New flag.
      (vshCmdDef): Add new flags field.
      (vshCommandRun): Honor new flag.
      (domManagementCmds, domMonitoringCmds, storagePoolCmds)
      (storageVolCmds, networkCmds, nodedevCmds, ifaceCmds)
      (nwfilterCmds, secretCmds, virshCmds, snapshotCmds)
      (hostAndHypervisorCmds): Populate new field.
      (vshReconnect): Don't warn on initial connection.
      d218344e
    • 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