1. 28 2月, 2013 7 次提交
    • V
      qemu: virConnectGetVersion returns bogus value · adfa3469
      Viktor Mihajlovski 提交于
      The unitialized local variable qemuVersion can cause an random value
      to be returned for the hypervisor version, observable with virsh version.
      Introduced by commit b46f7f4aSigned-off-by: NViktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
      adfa3469
    • P
      qemu: fix use-after-free when parsing NBD disk · 0a562de1
      Paolo Bonzini 提交于
      disk->src is still used for disks->hosts->name, do not free it.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: NEric Blake <eblake@redhat.com>
      0a562de1
    • D
      Don't try to add non-existant devices to ACL · 7f544a4c
      Daniel P. Berrange 提交于
      The QEMU driver has a list of devices nodes that are whitelisted
      for all guests. The kernel has recently started returning an
      error if you try to whitelist a device which does not exist.
      This causes a warning in libvirt logs and an audit error for
      any missing devices. eg
      
      2013-02-27 16:08:26.515+0000: 29625: warning : virDomainAuditCgroup:451 : success=no virt=kvm resrc=cgroup reason=allow vm="vm031714" uuid=9d8f1de0-44f4-a0b1-7d50-e41ee6cd897b cgroup="/sys/fs/cgroup/devices/libvirt/qemu/vm031714/" class=path path=/dev/kqemu rdev=? acl=rw
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      7f544a4c
    • D
      Fix typo in internal VIR_QEMU_PROCESS_START_AUTODESROY constant · d0b3ee55
      Daniel P. Berrange 提交于
      s/VIR_QEMU_PROCESS_START_AUTODESROY/VIR_QEMU_PROCESS_START_AUTODESTROY/
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      d0b3ee55
    • D
      Avoid spamming logs with cgroups warnings · 279336c5
      Daniel P. Berrange 提交于
      The code for putting the emulator threads in a separate cgroup
      would spam the logs with warnings
      
      2013-02-27 16:08:26.731+0000: 29624: warning : virCgroupMoveTask:887 : no vm cgroup in controller 3
      2013-02-27 16:08:26.731+0000: 29624: warning : virCgroupMoveTask:887 : no vm cgroup in controller 4
      2013-02-27 16:08:26.732+0000: 29624: warning : virCgroupMoveTask:887 : no vm cgroup in controller 6
      
      This is because it has only created child cgroups for 3 of the
      controllers, but was trying to move the processes from all the
      controllers. The fix is to only try to move threads in the
      controllers we actually created. Also remove the warning and
      make it return a hard error to avoid such lazy callers in the
      future.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      279336c5
    • D
      Fix autodestroy of QEMU guests · b4a124ef
      Daniel P. Berrange 提交于
      The virQEMUCloseCallbacksRunOne method was passing a uuid string
      to virDomainObjListFindByUUID, when it actually expected to get
      a raw uuid buffer. This was not caught by the compiler because
      the method was using a 'void *uuid' instead of first casting
      it to the expected type.
      
      This regression was accidentally caused by refactoring in
      
        commit 568a6cda
        Author: Jiri Denemark <jdenemar@redhat.com>
        Date:   Fri Feb 15 15:11:47 2013 +0100
      
          qemu: Avoid deadlock in autodestroy
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      b4a124ef
    • E
      qemu: -numa doesn't (yet) support disjoint range · 25dc8ba0
      Eric Blake 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=896092 mentions that
      qemu 1.4 and earlier only accept a simple start-stop range for
      the cpu=... argument of -numa.  Libvirt would attempt to use
      -numa cpu=1,3 for a disjoint range, which did not work as intended.
      
      Upstream qemu will be adding a new syntax for disjoint cpu ranges
      in 1.5; but the design for that syntax is still under discussion
      at the time of this patch.  So for libvirt 1.0.3, it is safest to
      just reject attempts to build an invalid qemu command line; in the
      future, we can add a capability bit and translate to the final
      accepted design for selecting a disjoint cpu range in numa.
      
      * src/qemu/qemu_command.c (qemuBuildNumaArgStr): Reject disjoint
      ranges.
      25dc8ba0
  2. 27 2月, 2013 8 次提交
  3. 26 2月, 2013 7 次提交
    • J
      libvirt: fix error message when connection can't be opened · 633d859b
      Ján Tomko 提交于
      VIR_ERR_NO_CONNECT already contains "no connection driver available".
      
      This patch changes:
      no connection driver available for No connection for URI hello
      to:
      no connection driver available for hello
      
      Bug: https://bugzilla.redhat.com/show_bug.cgi?id=851413
      633d859b
    • P
      qemu: do not set unpriv_sgio if neither supported nor requested · 45dc3f17
      Paolo Bonzini 提交于
      Currently we call virSetDeviceUnprivSGIO with val == 0 if a block device
      has an sgio attribute.  But for sgio='filtered', we know that a
      kernel with no unpriv_sgio support will always behave as the user
      wanted.  In this case, there is no need to call the function and
      report a (bogus) error.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      45dc3f17
    • E
      qemu: minor monitor lock cleanups · 6abd5ea1
      Eric Blake 提交于
      If virCondInit fails (okay, so that's unlikely), then we end up
      attempting a virObjectUnlock() on the cleanup path, even though
      we don't hold a lock.  This is not guaranteed to be safe.  While
      at it, I noticed a couple places where we were referencing mon->fd
      outside locks.
      
      * src/qemu/qemu_monitor.c (qemuMonitorOpenInternal): Minimize lock
      duration.  mon->watch doesn't need clean up on error.
      (qemuMonitorGetBlockExtent, qemuMonitorBlockResize): Don't
      dereference fd outside of lock.
      6abd5ea1
    • E
      qemu: don't override earlier json error · 29424d1a
      Eric Blake 提交于
      I built without yajl support, and noticed a strange failure message
      in qemumonitorjsontest:
      
      2013-02-22 16:12:37.503+0000: 19812: error : virJSONValueToString:1119 : internal error No JSON parser implementation is available
      2013-02-22 16:12:37.503+0000: 19812: error : qemuMonitorJSONCommandWithFd:253 : out of memory
      
      While a later patch will fix the test to skip when json is not present,
      this patch avoids overriding the more useful error message from
      virJSONValueToString returning NULL.
      
      * src/qemu/qemu_monitor_json.c (qemuMonitorJSONCommandWithFd):
      Don't override message.
      (qemuMonitorJSONCheckError): Don't print NULL.
      * src/qemu/qemu_agent.c (qemuAgentCommand): Don't override message.
      (qemuAgentCheckError): Don't print NULL.
      (qemuAgentArbitraryCommand): Properly fail on OOM.
      29424d1a
    • P
      conf: Avoid leaking of RNG device definition · 34f1a618
      Peter Krempa 提交于
      34f1a618
    • P
      qemu: Refactor qemuDomainSetMemoryParameters · 19c6ad9a
      Peter Krempa 提交于
      The new TypedParam helper APIs allow to simplify this function
      significantly.
      
      This patch integrates the fix in 75e5bec9
      by correctly ordering the setting functions instead of reordering the
      parameters.
      19c6ad9a
    • D
      interface: Fix udev backend bridge device display · 65bb1b97
      Doug Goldstein 提交于
      The bridge device was showing the vnet devices created for the domains
      as connected to the bridge. libvirt should only show host devices when
      trying to get the interface definition rather than the domain devices as
      well.
      65bb1b97
  4. 25 2月, 2013 14 次提交
  5. 23 2月, 2013 4 次提交
    • M
      qemu_migration: Cancel running jobs on failed migration · 1e54685f
      Michal Privoznik 提交于
      If a migration fails, we need to stop all block jobs running so
      qemu doesn't try to send data to destination over and over again.
      1e54685f
    • M
      qemu_migration: Stop NBD server at Finish phase · ae21b9bd
      Michal Privoznik 提交于
      At the end of migration, it is important to stop NBD
      server and thus release all allocated resources.
      ae21b9bd
    • M
      qemu_migration: Introduce qemuMigrationDriveMirror · 7b7600b3
      Michal Privoznik 提交于
      This function does the source part of NBD magic. It
      invokes drive-mirror on each non shared and RW disk with
      a source and wait till the mirroring process completes.
      When it does we can proceed with migration.
      
      Currently, an active waiting is done: every 500ms libvirt
      asks qemu if block-job is finished or not.  However, once
      the job finishes, qemu doesn't report its progress so we
      can only assume if the job finished successfully or not.
      The better solution would be to listen to the event which
      is sent as soon as the job finishes. The event does
      contain the result of job.
      7b7600b3
    • M
      qemu_migration: Introduce qemuMigrationStartNBDServer() · 86d90b3a
      Michal Privoznik 提交于
      We need to start NBD server and feed it with all non-<shared/>,
      RW and source-full disks. Moreover, with new virPortAllocator we
      must ensure the borrowed port for NBD server will be returned if
      either migration completes or qemu process is torn down.
      86d90b3a