1. 01 11月, 2012 1 次提交
  2. 31 10月, 2012 1 次提交
    • M
      Make non-KVM machines work with QMP probing · 037a49dc
      Martin Kletzander 提交于
      When there is no 'qemu-kvm' binary and the emulator used for a machine
      is, for example, 'qemu-system-x86_64' that, by default, runs without
      kvm enabled, libvirt still supplies '-no-kvm' option to this process,
      even though it does not recognize such option (making the start of a
      domain fail in that case).
      
      This patch fixes building a command-line for QEMU machines without KVM
      acceleration and is based on following assumptions:
      
       - QEMU_CAPS_KVM flag means that QEMU is running KVM accelerated
         machines by default (without explicitly requesting that using a
         command-line option).  It is the closest to the truth according to
         the code with the only exception being the comment next to the
         flag, so it's fixed in this patch as well.
      
       - QEMU_CAPS_ENABLE_KVM flag means that QEMU is, by default, running
         without KVM acceleration and in case we need KVM acceleration it
         needs to be explicitly instructed to do so.  This is partially
         true for the past (this option essentially means that QEMU
         recognizes the '-enable-kvm' option, even though it's almost the
         same).
      037a49dc
  3. 27 10月, 2012 1 次提交
    • E
      blockjob: add qemu capabilities related to block jobs · 6d264c91
      Eric Blake 提交于
      Upstream qemu 1.3 is adding two new monitor commands, 'drive-mirror'
      and 'block-job-complete'[1], which can drive live block copy and
      storage migration.  [Additionally, RHEL 6.3 had backported an earlier
      version of most of the same functionality, but under the names
      '__com.redhat_drive-mirror' and '__com.redhat_drive-reopen' and with
      slightly different JSON arguments, and has been using patches similar
      to these upstream patches for several months now.]
      
      The libvirt API virDomainBlockRebase as already committed for 0.9.12
      is flexible enough to expose the basics of block copy, but some
      additional features in the 'drive-mirror' qemu command, such as
      setting error policy, setting granularity, or using a persistent
      bitmap, may later require a new libvirt API virDomainBlockCopy.  I
      will wait to add that API until we know more about what qemu 1.3
      will finally provide.
      
      This patch caters only to the upstream qemu 1.3 interface, although
      I have proven that the changes for RHEL 6.3 can be isolated to
      just qemu_monitor_json.c, and the rest of this series will
      gracefully handle either interface once the JSON differences are
      papered over in a downstream patch.
      
      For consistency with other block job commands, libvirt must handle
      the bandwidth argument as MiB/sec from the user, even though qemu
      exposes the speed argument as bytes/sec; then again, qemu rounds
      up to cluster size internally, so using MiB hides the worst effects
      of that rounding if you pass small numbers.
      
      [1]https://lists.gnu.org/archive/html/qemu-devel/2012-10/msg04123.html
      
      * src/qemu/qemu_capabilities.h (QEMU_CAPS_DRIVE_MIRROR)
      (QEMU_CAPS_DRIVE_REOPEN): New bits.
      * src/qemu/qemu_capabilities.c (qemuCaps): Name them.
      * src/qemu/qemu_monitor_json.c (qemuMonitorJSONCheckCommands): Set
      them.
      (qemuMonitorJSONDriveMirror, qemuMonitorDrivePivot): New functions.
      * src/qemu/qemu_monitor_json.h (qemuMonitorJSONDriveMirror)
      (qemuMonitorDrivePivot): Declare them.
      * src/qemu/qemu_monitor.c (qemuMonitorDriveMirror)
      (qemuMonitorDrivePivot): New passthroughs.
      * src/qemu/qemu_monitor.h (qemuMonitorDriveMirror)
      (qemuMonitorDrivePivot): Declare them.
      6d264c91
  4. 23 10月, 2012 1 次提交
  5. 22 10月, 2012 2 次提交
    • D
      qemu: Don't blindly assume VNC is supported · 2da776b1
      Doug Goldstein 提交于
      Currently it's assumed that qemu always supports VNC, however it is
      definitely possible to compile qemu without VNC support so we should at
      the very least check for it and handle that correctly.
      2da776b1
    • M
      qemu: set seamless migration capability · 508451e4
      Michal Privoznik 提交于
      As we switched to setting capabilities based on QMP communication,
      qemu seamless-migration capability was not set. In the -help output
      this knob is called seamless-migration=[on|off]. The equivalent in
      QMP world is SPICE_MIGRATE_COMPLETED event (qemu upstream commit
      2fdd16e2).
      508451e4
  6. 20 10月, 2012 1 次提交
    • E
      blockjob: manage qemu block-commit monitor command · 3f38c7e3
      Eric Blake 提交于
      qemu 1.3 will be adding a 'block-commit' monitor command, per
      qemu.git commit ed61fc1.  It matches nicely to the libvirt API
      virDomainBlockCommit.
      
      * src/qemu/qemu_capabilities.h (QEMU_CAPS_BLOCK_COMMIT): New bit.
      * src/qemu/qemu_capabilities.c (qemuCapsProbeQMPCommands): Set it.
      * src/qemu/qemu_monitor.h (qemuMonitorBlockCommit): New prototype.
      * src/qemu/qemu_monitor_json.h (qemuMonitorJSONBlockCommit):
      Likewise.
      * src/qemu/qemu_monitor.c (qemuMonitorBlockCommit): Implement it.
      * src/qemu/qemu_monitor_json.c (qemuMonitorJSONBlockCommit):
      Likewise.
      (qemuMonitorJSONHandleBlockJobImpl)
      (qemuMonitorJSONGetBlockJobInfoOne): Handle new event type.
      3f38c7e3
  7. 19 10月, 2012 1 次提交
    • G
      qemu: Set arch to i686 if qemu-system-i386 is found · c324bad9
      Guido Günther 提交于
      If we can't probe the architecture from QMP we parse the architecture
      from the qemu binaries name. This results in the architecture being i386
      instead of i686 which then results in QEMU_CAPS_PCI_MULTIBUS being unset
      which gives a broken qemu command line.
      
      This probably didn't show up earlier since most of the time there's also
      a /usr/bin/qemu around which results in i686 capabilities.
      c324bad9
  8. 18 10月, 2012 2 次提交
  9. 12 10月, 2012 1 次提交
  10. 09 10月, 2012 1 次提交
    • J
      qemu: Fix QMP detection of QXL graphics · 844cdf22
      Jiri Denemark 提交于
      With the recent introduction of QMP capabilities probing, libvirt failed
      to detect support for QXL graphics in QEMU 1.2 and newer. In addition to
      fixing that, this patch also causes libvirt to detect QXL support for
      qemu-kvm-0.13.0, which doesn't advertise it in -help output but mentions
      it in device list. Since qemu-kvm-0.13.0 supported -spice, it looks like
      not having qxl in -help was a bug.
      844cdf22
  11. 02 10月, 2012 2 次提交
    • E
      build: fix typo in debug message · 2b804cfa
      Eric Blake 提交于
      Introduced in commit 0caccb58.
      
        CC     libvirt_driver_qemu_impl_la-qemu_capabilities.lo
      ../../src/qemu/qemu_capabilities.c: In function 'qemuCapsInitQMP':
      ../../src/qemu/qemu_capabilities.c:2327:13: error: format '%d' expects argument of type 'int', but argument 8 has type 'const char *' [-Werror=format]
      
      * src/qemu/qemu_capabilities.c (qemuCapsInitQMP): Use correct format.
      2b804cfa
    • J
      qemu: Kill processes used for QMP caps probing · 0caccb58
      Jiri Denemark 提交于
      Since libvirt switched to QMP capabilities probing recently, it starts
      QEMU process used for this probing with -daemonize, which means
      virCommandAbort can no longer reach these processes. As a result of
      that, restarting libvirtd will leave several new QEMU processes behind.
      Let's use QEMU's -pidfile and use it to kill the process when QMP caps
      probing is done.
      0caccb58
  12. 28 9月, 2012 3 次提交
    • D
      Add support for detecting capablities using QMP commands · 43e23c73
      Daniel P. Berrange 提交于
      Start a QEMU process using
      
         $QEMU -S -no-user-config -nodefaults \
               -nographic -M none -qmp unix:/some/path,server,nowait
      
      and talk QMP over stdio to discover what capabilities the
      binary supports. This works for QEMU 1.2.0 or later and
      for older QEMU automatically fallback to the old approach
      of parsing -help and related command line args.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      43e23c73
    • D
      Fix QEMU test with 1.2.0 help output · 72574808
      Daniel P. Berrange 提交于
      The help output for QEMU 1.2.0 changed 'pci-assign' to 'kvm-pci-assign'.
      Since the new capabilities code does exact device name matching
      instead of substring matching, this caused the capabilities to go
      missing.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      72574808
    • D
      Refactor qemuCapsParseDeviceStr to work from data tables · b073fe40
      Daniel P. Berrange 提交于
      Currently the qemuCapsParseDeviceStr method has a bunch of open
      coded string searches/comparisons to detect devices and their
      properties. Soon this data will be obtained from QMP queries
      instead of -device help output. Maintaining the list of device
      and properties in two places is undesirable. Thus the existing
      qemuCapsParseDeviceStr() method needs to be refactored to
      separate the device types and properties from the actual
      search code.
      
      Thus the -device help output is now parsed to construct a
      list of device names, and device properties. These are then
      checked against a set of datatables to set the capability
      flags
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      b073fe40
  13. 27 9月, 2012 10 次提交
  14. 26 9月, 2012 1 次提交
    • M
      qemu: wait for SPICE to migrate · 3521cd1c
      Michal Privoznik 提交于
      Recently, there have been some improvements made to qemu so it
      supports seamless migration or something very close to it.
      However, it requires libvirt interaction. Once qemu is migrated,
      the SPICE server needs to send its internal state to the destination.
      Once it's done, it fires SPICE_MIGRATE_COMPLETED event and this
      fact is advertised in 'query-spice' output as well.
      We must not kill qemu until SPICE server finishes the transfer.
      3521cd1c
  15. 21 9月, 2012 1 次提交
  16. 20 9月, 2012 2 次提交
    • M
      qemu: add support for dump-guest-core option · ff2d5a3d
      Martin Kletzander 提交于
      The "dump-guest-core' option is new option for the machine type
      (-machine pc,dump-guest-core) that controls whether the guest memory
      will be marked as dumpable.
      
      While testing this, I've found out that the value for the '-M' options
      is not parsed correctly when additional parameters are used. However,
      when '-machine' is used for the same options, it gets parsed as
      expected. That's why this patch also modifies the parsing and creating
      of the command line, so both '-M' and '-machine' are recognized. In
      QEMU's help there is only mention of the 'machine parameter now with
      no sign of the older '-M'.
      ff2d5a3d
    • M
      qemu: Add support for reboot-timeout · 94827a78
      Martin Kletzander 提交于
      This patch adds support for "-boot reboot-timeout=rb_time" that is
      added in QEMU.
      94827a78
  17. 18 9月, 2012 3 次提交
  18. 14 9月, 2012 1 次提交
  19. 13 9月, 2012 5 次提交