1. 13 6月, 2013 1 次提交
  2. 11 6月, 2013 4 次提交
    • P
      qemu: Forbid migration of machines with I/O errors · 5f719f21
      Peter Krempa 提交于
      Such machine can't be successuflly migrated unles the I/O error has
      recovered and might lead to data corruption. Forbid this kind of
      migration.
      5f719f21
    • P
      qemu: Cancel migration if guest encoutners I/O error while migrating · caa467db
      Peter Krempa 提交于
      During a live migration the guest may receive a disk access I/O error.
      In this state the guest is unable to continue running on a remote host
      after migration as some state may be present in the kernel and not
      migrated.
      
      With this patch, the migration is canceled in such case so it can either
      continue on the source if the I/O issues are recovered or has to be
      destroyed anyways.
      caa467db
    • M
      qemu_migrate: Dispose listen address if set from config · 6546017c
      Michal Privoznik 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=971485
      
      As of d7f9d827 we copy the listen
      address from the qemu.conf config file in case none has been provided
      via XML. But later, when migrating, we should not include such listen
      address in the migratable XML as it is something autogenerated, not
      requested by user. Moreover, the binding to the listen address will
      likely fail, unless the address is '0.0.0.0' or its IPv6 equivalent.
      This patch introduces a new boolean attribute to virDomainGraphicsListenDef
      to distinguish autofilled listen addresses. However, we must keep the
      attribute over libvirtd restarts, so it must be kept within status XML.
      6546017c
    • J
      qemu: Fix memory leak in Prepare phase · 9313a6a7
      Jiri Denemark 提交于
      Avoid leaking virDomainDef if Prepare phase fails before it gets to
      qemuMigrationPrepareAny.
      9313a6a7
  3. 10 6月, 2013 1 次提交
    • P
      Fix commit 29c1e913 · c2093b2a
      Peter Krempa 提交于
      This patch fixes changes done in commit 29c1e913
      that was pushed without implementing review feedback.
      
      The flag introduced by the patch is changed to VIR_DOMAIN_VCPU_GUEST and
      documentation makes the difference between regular hotplug and this new
      functionality more explicit.
      
      The virsh options that enable the use of the new flag are changed to
      "--guest" and the documentation is fixed too.
      c2093b2a
  4. 07 6月, 2013 8 次提交
  5. 06 6月, 2013 5 次提交
    • J
      qemu: simplify CPU command line parsing · d60570b3
      Ján Tomko 提交于
      Use virStringSplit. Change the 'error' label to 'cleanup' to prevent
      memory leaks on error.
      d60570b3
    • J
      qemu: change two-state int parameters to bool · 5debc722
      Ján Tomko 提交于
      5debc722
    • J
      Remove redundant two-state integers · 85f91781
      Ján Tomko 提交于
      85f91781
    • J
      Replace two-state local integers with bool · e557766c
      Ján Tomko 提交于
      Found with 'git grep "= 1"'.
      e557766c
    • M
      qemu: Reformat listen address prior to checking · e5fa9db1
      Michal Privoznik 提交于
      Currently, a listen address for a SPICE server can be specified. Later,
      when the domain is migrated, we need to relocate the graphics which
      involves telling new destination to the SPICE server. However, we can't
      just assume the listen address is the new location, because the listen
      address can be ANYCAST (0.0.0.0 for IPv4, :: for IPv6). In which case,
      we want to pass the remote hostname. But there are some troubles with
      ANYCAST. In both IPv4 and IPv6 it has many ways for specifying such
      address. For instance, in IPv4: 0, 0.0, 0.0.0, 0.0.0.0.  The number of
      variations gets bigger in IPv6 world. Hence, in order to check for
      ANYCAST address sanely, we should take the provided listen address,
      parse it and format back in it's full form. Which is exactly what this
      patch does.
      e5fa9db1
  6. 05 6月, 2013 3 次提交
    • E
      maint: don't use config.h in .h files · 1add9c78
      Eric Blake 提交于
      Enforce the rule that .h files don't need to (redundantly)
      include <config.h>.
      
      * cfg.mk (sc_prohibit_config_h_in_headers): New rule.
      (_virsh_includes): Delete; instead, inline a smaller number of
      exclusions...
      (exclude_file_name_regexp--sc_require_config_h)
      (exclude_file_name_regexp--sc_require_config_h_first): ...here.
      * daemon/libvirtd.h (includes): Fix offenders.
      * src/driver.h (includes): Likewise.
      * src/gnutls_1_0_compat.h (includes): Likewise.
      * src/libxl/libxl_conf.h (includes): Likewise.
      * src/libxl/libxl_driver.h (includes): Likewise.
      * src/lxc/lxc_conf.h (includes): Likewise.
      * src/lxc/lxc_driver.h (includes): Likewise.
      * src/lxc/lxc_fuse.h (includes): Likewise.
      * src/network/bridge_driver.h (includes): Likewise.
      * src/phyp/phyp_driver.h (includes): Likewise.
      * src/qemu/qemu_conf.h (includes): Likewise.
      * src/util/virnetlink.h (includes): Likewise.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      1add9c78
    • O
      8da9516a
    • G
      snapshot: remove mutually exclusive memory and disk-only duplicate check · ed91e32b
      Guannan Ren 提交于
      The work was done at the time of snapshot xmlstring parsing
      
       if (offline && def->memory &&
           def->memory != VIR_DOMAIN_SNAPSHOT_LOCATION_NONE) {
           virReportError(...);
       }
      ed91e32b
  7. 03 6月, 2013 1 次提交
  8. 01 6月, 2013 1 次提交
    • L
      qemu: prevent termination of guests w/hostdev on driver reconnect · 2ea45647
      Laine Stump 提交于
      This should resolve:
      
        https://bugzilla.redhat.com/show_bug.cgi?id=959191
      
      The problem was that qemuUpdateActivePciHostdevs was returning 0
      (success) when no hostdevs were present, but would otherwise return -1
      (failure) even when it completed successfully. It is only called from
      qemuProcessReconnect(), and when qemuProcessReconnect got back an
      error, it would not only stop reconnecting, but would terminate the
      guest qemu process "to remove danger of it ending up running twice if
      user tries to start it again later".
      
      (This bug was introduced in commit 011cf7ad, which was pushed between
      v1.0.2 and v1.0.3, so all maintenance branches from v1.0.3 up to 1.0.5
      will need this one line patch applied.)
      2ea45647
  9. 31 5月, 2013 5 次提交
  10. 30 5月, 2013 3 次提交
    • E
      build: port qemu to cygwin · 19a7f9ff
      Eric Blake 提交于
      A cygwin build of the qemu driver fails with:
      
      qemu/qemu_process.c: In function 'qemuPrepareCpumap':
      qemu/qemu_process.c:1803:31: error: 'CPU_SETSIZE' undeclared (first use in this function)
      
      CPU_SETSIZE is a Linux extension in <sched.h>; a bit more portable
      is using sysconf if _SC_NPROCESSORS_CONF is defined (several platforms
      have it, including Cygwin).  Ultimately, I would have preferred to
      use gnulib's 'nproc' module, but it is currently under an incompatible
      license.
      
      * src/qemu/qemu_conf.h (QEMUD_CPUMASK_LEN): Provide definition on
      cygwin.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      19a7f9ff
    • C
      qemu: migration: error if tunnelled + storage specified · 98bbda00
      Cole Robinson 提交于
      Since as the code indicates it doesn't work yet, so let's be
      explicit about it.
      98bbda00
    • C
      qemu: migration: Improve p2p error if we can't open conn · 5751fc4f
      Cole Robinson 提交于
      By actually showing the Open() error to the user
      5751fc4f
  11. 29 5月, 2013 1 次提交
    • M
      qemuOpenVhostNet: Decrease vhostfdSize on open failure · d10cfaec
      Michal Privoznik 提交于
      Currently, if there's an error opening /dev/vhost-net (e.g. because
      it doesn't exist) but it's not required we proceed with vhostfd array
      filled with -1 and vhostfdSize unchanged. Later, when constructing
      the qemu command line only non-negative items within vhostfd array
      are taken into account. This means, vhostfdSize may be greater than
      the actual count of non-negative items in vhostfd array. This results
      in improper command line arguments being generated, e.g.:
      
      -netdev tap,fd=21,id=hostnet0,vhost=on,vhostfd=(null)
      d10cfaec
  12. 28 5月, 2013 1 次提交
    • C
      qemu: Don't report error on successful media eject · 406d8a98
      Cole Robinson 提交于
      If we are just ejecting media, ret == -1 even after the retry loop
      determines that the tray is open, as requested. This means media
      disconnect always report's error.
      
      Fix it, and fix some other mini issues:
      
      - Don't overwrite the 'eject' error message if the retry loop fails
      - Move the retries decrement inside the loop, otherwise the final loop
        might succeed, yet retries == 0 and we will raise error
      - Setting ret = -1 in the disk->src check is unneeded
      - Fix comment typos
      
      cc: mprivozn@redhat.com
      406d8a98
  13. 27 5月, 2013 1 次提交
  14. 25 5月, 2013 1 次提交
    • S
      qemu: save domain state to XML after reboot · 2697c8a1
      Sergey Fionov 提交于
      Currently qemuDomainReboot() does reboot in two phases:
      qemuMonitorSystemPowerdown() and qemuProcessFakeReboot().
      
      qemuMonitorSystemPowerdown() shutdowns the domain and saves domain
      state/reason as VIR_DOMAIN_SHUTDOWN_UNKNOWN.
      
      qemuProcessFakeReboot() sets domain state/reason to
      VIR_DOMAIN_RESUMED_UNPAUSED but does not save domain state changes.
      
      Subsequent restart of libvirtd leads to restoring domain state/reason to
      saved that is VIR_DOMAIN_SHUTDOWN_UNKNOWN and to automatic shutdown of
      the domain. This commit adds virDomainSaveStatus() into
      qemuProcessFakeReboot() to avoid unexpected shutdowns.
      2697c8a1
  15. 24 5月, 2013 2 次提交
    • M
      Adapt to new VIR_STRNDUP behavior · 0fc5d09c
      Michal Privoznik 提交于
      With previous patch, we accept negative value as length of string to
      duplicate. So there is no need to pass strlen(src) in case we want to do
      duplicate the whole string.
      0fc5d09c
    • M
      Fix blkdeviotune for shutoff domain · 5af3ce82
      Martin Kletzander 提交于
      Function qemuDomainSetBlockIoTune() was checking QEMU capabilities
      even when !(flags & VIR_DOMAIN_AFFECT_LIVE) and the domain was
      shutoff, resulting in the following problem:
      
       virsh # domstate asdf; blkdeviotune asdf vda --write-bytes-sec 100
       shut off
      
       error: Unable to change block I/O throttle
       error: unsupported configuration: block I/O throttling not supported with this QEMU binary
      
      Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=965016
      5af3ce82
  16. 23 5月, 2013 2 次提交