1. 21 12月, 2012 1 次提交
  2. 19 12月, 2012 6 次提交
  3. 18 12月, 2012 1 次提交
  4. 17 12月, 2012 2 次提交
    • G
      qemu: use newer -device video device in qemu commandline · aa51202b
      Guannan Ren 提交于
      '-device VGA' maps to '-vga std'
      '-device cirrus-vga' maps to '-vga cirrus'
      '-device qxl-vga' maps to '-vga qxl'
                   (there is also '-device qxl' for secondary devices)
      '-device vmware-svga' maps to '-vga vmware'
      
      For qemu(>=1.2), we can use -device to replace -vga for video
      device. For the primary video device, the patch tries to use 0x2
      slot for matching old qemu. If the 0x2 slot is allocated already,
      the addr property could help for using any available slot.
      For qemu(< 1.2), we keep using -vga for primary device.
      aa51202b
    • 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
  5. 15 12月, 2012 1 次提交
    • E
      build: minor build fixes for BSD · 70743dae
      Eric Blake 提交于
      Noticed these while building on FreeBSD.
      
      * src/qemu/qemu_monitor.c (qemuMonitorBlockInfoLookup): Rename
      variable to avoid 'devname' collision.
      * src/qemu/qemu_driver.c (qemuDomainInterfaceStats): Mark unused
      variable.
      70743dae
  6. 14 12月, 2012 1 次提交
    • L
      qemu: don't fail update netdev on bridge detach failure · 9cf8734e
      Laine Stump 提交于
      When a network device's bridge connection is changed by
      virDomainUpdateDevice, libvirt first removes the netdev's tap from its
      old bridge, then adds it to the new bridge. Sometimes, due to a
      network being destroyed while a guest device is still attached, the
      tap may already be "removed" from the old bridge (or the old bridge
      may not even exist any more); the existing code was needlessly failing
      the update when this happened, making it impossible to recover from
      the situation without completely detaching (i.e. removing) the netdev
      from the guest and re-attaching.
      
      Instead of failing the entire operation when removal of the tap from
      the old bridge fails, this patch changes qemuDomainChangeNetBridge to
      just log a warning and continue, allowing a reasonable recover from
      the situation.
      
      (you'll appreciate this change if you ever accidentally destroy a
      network while your guests are still using it).
      9cf8734e
  7. 13 12月, 2012 4 次提交
  8. 12 12月, 2012 10 次提交
  9. 11 12月, 2012 6 次提交
    • P
      qemu: snapshot: Remove memory image if external checkpoint fails · a912977a
      Peter Krempa 提交于
      When the disk snapshot part of an external system checkpoint fails the
      memory image is retained. This patch adds code to remove the image in
      such case.
      a912977a
    • P
      qemu: snapshot: Don't leak XML definition if restarting of CPUs fails · d5b28287
      Peter Krempa 提交于
      In case the snapshot code isn't able to restart CPUs after an external
      checkpoint we would leak a copy of the domains XML definition. This
      patch fixes the cleanup path.
      d5b28287
    • J
      qemu: fix uninitialized variable warning in doPeer2PeerMigrate · 07b64de5
      Ján Tomko 提交于
      False positive, but it breaks the build with gcc-4.6.3.
      
      qemu/qemu_migration.c:2931:37: error: 'offline' may be used
      uninitialized in this function [-Werror=uninitialized]
      qemu/qemu_migration.c:2887:10: note: 'offline' was declared here
      07b64de5
    • P
      qemu: Restart CPUs with valid async job type when doing external snapshots · 46b0c933
      Peter Krempa 提交于
      When restarting CPUs after an external snapshot, the restarting function
      was called without the appropriate async job type. This caused that a
      new sync job wasn't created and allowed races in the monitor.
      46b0c933
    • L
      Add support for offline migration · 8b9bf787
      liguang 提交于
      Offline migration transfers inactive definition of a domain (which may
      or may not be active). After successful completion, the domain remains
      in its current state on source host and is defined but inactive on
      destination host. It's a bit more clever than virDomainGetXMLDesc() on
      source host followed by virDomainDefineXML() on destination host, as
      offline migration will run pre-migration hook to update the domain XML
      on destination host. Currently, copying non-shared storage is not
      supported during offline migration.
      
      Offline migration can be requested with a new migration flag called
      VIR_MIGRATE_OFFLINE (which has to be combined with
      VIR_MIGRATE_PERSIST_DEST flag).
      8b9bf787
    • L
      qemu: eliminate bogus error log when changing netdev's bridge · e5577872
      Laine Stump 提交于
      This fixes a problem that showed up during testing of:
      
        https://bugzilla.redhat.com/show_bug.cgi?id=881480
      
      Due to a logic error in the function that gets the name of the bridge
      an interface connects to, any time a bridge was specified directly
      (type='bridge') rather than indirectly (type='network'), An error
      would be logged (although the operation would then complete
      successfully):
      
         Network type 6 is not supported
      
      The final virReportError() in the function
      qemuDomainNetGetBridgeName() was apparently avoided in the past with a
      "goto cleanup" at the end of each case, but the case of bridge somehow
      no longer has that final goto cleanup.
      
      The proper solution is anyway to not rely on goto's, but put the error
      log inside an else {} clause, so that it's executed only if the type
      is neither bridge nor network (in reality, this function should only
      ever be called for those two types, that's why this is an internal
      error).
      
      While making this change, the error message was also tuned to be more
      correct (since it's not really the type of the network, but the type
      of the interface, and it *is* otherwise supported, it's just that the
      interface type in question doesn't *have* a bridge device associated
      with it, or at least we don't know how to get it).
      e5577872
  10. 10 12月, 2012 1 次提交
  11. 08 12月, 2012 1 次提交
  12. 07 12月, 2012 1 次提交
  13. 05 12月, 2012 5 次提交
    • J
      qemu: Fix memory (and FD) leak on PCI device detach · 69103187
      Jiri Denemark 提交于
      Unmanaged PCI devices were only leaked if pciDeviceListAdd failed but
      managed devices were always leaked. And leaking PCI device is likely to
      leave PCI config file descriptor open. This patch fixes
      qemuReattachPciDevice to either free the PCI device or add it to the
      inactivePciHostdevs list.
      69103187
    • J
      qemu: Don't free PCI device if adding it to activePciHostdevs fails · ea1a9b5f
      Jiri Denemark 提交于
      The device is still referenced from pcidevs and freeing it would leave
      an invalid pointer there.
      ea1a9b5f
    • J
      qemu: Fix error code when attaching existing device · 935550c6
      Jiri Denemark 提交于
      An attempt to attach device that is already attached to a domain results
      in the following error:
      
      virsh # attach-device rhel6 pci2 --persistent
      error: Failed to attach device from pci2
      error: invalid argument: device is already in the domain configuration
      
      The "invalid argument" error code looks wrong, we usually use "operation
      invalid" when the action cannot be done in current state.
      935550c6
    • O
      qemu: Simplify the code · 9ee809d6
      Osier Yang 提交于
      "disk" is initialized to "dev->data.disk" in the beginning of the
      function.
      9ee809d6
    • E
      qemu: improve error for failed JSON commands · 149fa591
      Eric Blake 提交于
      Only one error in qemu_monitor was already using the relatively
      new OPERATION_UNSUPPORTED error, even though it is a better fit
      for all of the messages related to options that are unsupported
      due to the version of qemu in use rather than due to a user's
      XML or .conf file choice.  Suggested by Osier Yang.
      
      * src/qemu/qemu_monitor.c (qemuMonitorSendFileHandle)
      (qemuMonitorAddHostNetwork, qemuMonitorRemoveHostNetwork)
      (qemuMonitorAttachDrive, qemuMonitorDiskSnapshot)
      (qemuMonitorDriveMirror, qemuMonitorTransaction)
      (qemuMonitorBlockCommit, qemuMonitorDrivePivot)
      (qemuMonitorBlockJob, qemuMonitorSystemWakeup)
      (qemuMonitorGetVersion, qemuMonitorGetMachines)
      (qemuMonitorGetCPUDefinitions, qemuMonitorGetCommands)
      (qemuMonitorGetEvents, qemuMonitorGetKVMState)
      (qemuMonitorGetObjectTypes, qemuMonitorGetObjectProps)
      (qemuMonitorGetTargetArch): Use better error category.
      149fa591