1. 08 2月, 2013 2 次提交
  2. 01 2月, 2013 1 次提交
  3. 25 1月, 2013 2 次提交
    • D
      Fix bogus reporting of KVM support for non-native emulators · c29eafc8
      Daniel P. Berrange 提交于
      A logic bug meant we reported KVM was possible for every
      architecture, merely based on whether the query-kvm command
      exists. We should instead have been doing it based on whether
      the query-kvm command returns 'present: 1'
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      c29eafc8
    • D
      Fix performance & reliabilty of QMP probing · 1b253a10
      Daniel P. Berrange 提交于
      This previous commit
      
        commit 1a50ba2c
        Author: Viktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
        Date:   Mon Nov 26 15:17:13 2012 +0100
      
          qemu: Fix QMP Capabability Probing Failure
      
      which attempted to make sure the QEMU process used for probing
      ran as the right user id, caused serious performance regression
      and unreliability in probing. The -daemonize switch in QEMU
      guarantees that the monitor socket is present before the parent
      process exits. This means libvirtd is guaranteed to be able to
      connect immediately. By switching from -daemonize to the
      virCommandDaemonize API libvirtd was no longer synchronized with
      QEMU's startup process. The result was that the QEMU monitor
      failed to open and went into its 200ms sleep loop. This happened
      for all 25 binaries resulting in 5 seconds worth of sleeping
      at libvirtd startup. In addition sometimes when libvirt connected,
      QEMU would be partially initialized and crash causing total
      failure to probe that binary.
      
      This commit reverts the previous change, ensuring we do use the
      -daemonize flag to QEMU. Startup delay is cut from 7 seconds
      to 2 seconds on my machine, which is on a par with what it was
      prior to the capabilities rewrite.
      
      To deal with the fact that QEMU needs to be able to create the
      pidfile, we switch pidfile location fron runDir to libDir, which
      QEMU is guaranteed to be able to write to.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      1b253a10
  4. 17 1月, 2013 1 次提交
    • J
      qemu: fix QEMU_CAPS_NO_ACPI detection · 31494974
      Ján Tomko 提交于
      In commit c4bbaaf8, caps->arch was checked uninitialized, rendering the
      whole check useless.
      
      This patch moves the conditional setting of QEMU_CAPS_NO_ACPI to
      qemuCapsInitQMP, and removes the no longer needed exception for S390.
      
      It also clears the flag for all non-x86 archs instead of just S390 in
      qemuCapsInitHelp.
      31494974
  5. 16 1月, 2013 2 次提交
  6. 12 1月, 2013 1 次提交
  7. 11 1月, 2013 2 次提交
  8. 10 1月, 2013 2 次提交
  9. 08 1月, 2013 2 次提交
  10. 04 1月, 2013 1 次提交
    • M
      qemu: Detect VGA_QXL capability correctly · 632c60ed
      Michal Privoznik 提交于
      Since 4c993d8a we failed to set this important capability, which
      allows starting a domain with QXL video card. We set DEVICE_QXL
      capability bit instead, which is not necessary wrong. Anyway, if
      qemu supports the new '-device qxl' it supports older '-vga qxl'
      as well. The latter is used for the primary (the first) qxl video
      card, the former for other video cards.
      632c60ed
  11. 03 1月, 2013 1 次提交
    • M
      qemu: Don't parse log output when starting up a domain · b3f2b4ca
      Michal Privoznik 提交于
      Despite our great effort we still parsed qemu log output.
      We wouldn't notice unless upcoming qemu 1.4 changed the
      format of the logs slightly. Anyway, now we should gather
      all interesting knobs like pty paths from monitor. Moreover,
      since for historical reasons the first console can be just
      an alias to the first serial port, we need to check this and
      copy the pty path if that's the case to the first console.
      b3f2b4ca
  12. 22 12月, 2012 1 次提交
  13. 21 12月, 2012 7 次提交
  14. 19 12月, 2012 4 次提交
  15. 17 12月, 2012 1 次提交
    • G
      qemu: add qemu vga devices caps and one cap to mark them usable · 4c993d8a
      Guannan Ren 提交于
      QEMU_CAPS_DEVICE_QXL          -device qxl
      QEMU_CAPS_DEVICE_VGA          -device VGA
      QEMU_CAPS_DEVICE_CIRRUS_VGA   -device cirrus-vga
      QEMU_CAPS_DEVICE_VMWARE_SVGA  -device vmware-svga
      
      QEMU_CAPS_DEVICE_VIDEO_PRIMARY  /* safe to use -device XXX
                                       for primary video device */
      
      Fix a typo in qemuCapsObjectTypes, the string 'qxl' here
      should be -device qxl rather than -vga [...|qxl|..]
      4c993d8a
  16. 13 12月, 2012 1 次提交
  17. 12 12月, 2012 1 次提交
    • J
      qemu: assume seccomp sandbox is supported since qemu 1.2 · 6543a459
      Ján Tomko 提交于
      Currently there is no way to detect it via QMP and requesting "-sandbox
      off" works correctly even if it was compiled out, so this will work
      unless someone both requests the sandbox in qemu.conf and builds QEMU
      without the support for it.
      6543a459
  18. 08 12月, 2012 1 次提交
  19. 05 12月, 2012 1 次提交
    • E
      qemu: nicer error message if live disk snapshot unsupported · 3bef4adf
      Eric Blake 提交于
      Without this patch, attempts to create a disk snapshot when qemu
      is too old results in a cryptic message:
      
      virsh # snapshot-create 23 --disk-only
      error: operation failed: Failed to take snapshot: unknown command: 'snapshot_blkdev'
      
      Now it reports:
      
      virsh # snapshot-create 23 --disk-only
      error: unsupported configuration: live disk snapshot not supported with this QEMU binary
      
      All versions of qemu that support live disk snapshot also support
      QMP (basically upstream qemu 1.1 and later, and backports to RHEL 6.2).
      
      * src/qemu/qemu_capabilities.h (QEMU_CAPS_DISK_SNAPSHOT): New
      capability.
      * src/qemu/qemu_capabilities.c (qemuCaps): Track it.
      (qemuCapsProbeQMPCommands): Set it.
      * src/qemu/qemu_driver.c (qemuDomainSnapshotCreateDiskActive): Use
      it.
      * src/qemu/qemu_monitor.c (qemuMonitorDiskSnapshot): Simplify.
      * src/qemu/qemu_monitor_json.c (qemuMonitorJSONDiskSnapshot):
      Likewise.
      * src/qemu/qemu_monitor_text.h (qemuMonitorTextDiskSnapshot):
      Delete.
      * src/qemu/qemu_monitor_text.c (qemuMonitorTextDiskSnapshot):
      Likewise.
      3bef4adf
  20. 01 12月, 2012 1 次提交
  21. 29 11月, 2012 1 次提交
  22. 28 11月, 2012 2 次提交
    • V
      qemu: Add QEMU version computation to QMP probing · 856a4822
      Viktor Mihajlovski 提交于
      With QMP capability probing, the version was not set.
      virsh version returns:
      ...
      Cannot extract running QEMU hypervisor version
      
      This is fixed by computing caps->version from QMP major,
      minor, micro values.
      Signed-off-by: NViktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
      856a4822
    • V
      qemu: Fix QMP Capabability Probing Failure · 1a50ba2c
      Viktor Mihajlovski 提交于
      QMP Capability probing will fail if QEMU cannot bind to the
      QMP monitor socket in the qemu_driver->libDir directory.
      That's because the child process is stripped of all
      capabilities and this directory is chown'ed to the configured
      QEMU user/group (normally qemu:qemu) by the QEMU driver.
      
      To prevent this from happening, the driver startup will now pass
      the QEMU uid and gid down to the capability probing code.
      All capability probing invocations of QEMU will be run with
      the configured QEMU uid instead of libvirtd's.
      
      Furter, the pid file handling is moved to libvirt, as QEMU
      cannot write to the qemu_driver->runDir (root:root). This also
      means that the libvirt daemonizing must be used.
      Signed-off-by: NViktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
      1a50ba2c
  23. 15 11月, 2012 1 次提交
  24. 10 11月, 2012 1 次提交
    • V
      capabilities: defaultConsoleTargetType can depend on architecture · b1c88c14
      Viktor Mihajlovski 提交于
      For S390, the default console target type cannot be of type 'serial'.
      It is necessary to at least interpret the 'arch' attribute
      value of the os/type element to produce the correct default type.
      
      Therefore we need to extend the signature of defaultConsoleTargetType
      to account for architecture. As a consequence all the drivers
      supporting this capability function must be updated.
      
      Despite the amount of changed files, the only change in behavior is
      that for S390 the default console target type will be 'virtio'.
      
      N.B.: A more future-proof approach could be to to use hypervisor
      specific capabilities to determine the best possible console type.
      For instance one could add an opaque private data pointer to the
      virCaps structure (in case of QEMU to hold capsCache) which could
      then be passed to the defaultConsoleTargetType callback to determine
      the console target type.
      Seems to be however a bit overengineered for the use case...
      Signed-off-by: NViktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
      b1c88c14