1. 07 5月, 2014 2 次提交
    • J
      Add support for timestamping QEMU logs · f3be5f0c
      Ján Tomko 提交于
      QEMU commit 5e2ac51 added a boolean '-msg timestamp=[on|off]'
      option, which can enable timestamps on errors:
      $ qemu-system-x86_64 -msg timestamp=on zghhdorf
      2014-04-09T13:25:46.779484Z qemu-system-x86_64: -msg timestamp=on: could
      not open disk image zghhdorf: Could not open 'zghhdorf': No such file or
      directory
      
      Enable this timestamp if the QEMU binary supports it.
      
      Add a 'log_timestamp' option to qemu.conf for disabling this behavior.
      f3be5f0c
    • T
      qemu: track quiesced status in qemuDomainSnapshotFSFreeze · b6d4dad1
      Tomoki Sekiyama 提交于
      Adds 'quiesced' status into qemuDomainObjPrivate that tracks whether
      FSFreeze is requested in the domain.
      
      It modifies error code from qemuDomainSnapshotFSFreeze and
      qemuDomainSnapshotFSThaw, so that a caller can know whether the command is
      actually sent to the guest agent. If the error is caused before sending a
      freeze command, a counterpart thaw command shouldn't be sent either, not to
      confuse fsfreeze status tracking.
      Signed-off-by: NTomoki Sekiyama <tomoki.sekiyama@hds.com>
      Signed-off-by: NEric Blake <eblake@redhat.com>
      b6d4dad1
  2. 06 5月, 2014 3 次提交
    • L
      qemu: specify domain in host-side PCI addresses when needed/supported · 1e947cf7
      Laine Stump 提交于
      This uses the new QEMU_CAPS_HOST_PCI_MULTIDOMAIN capability when
      present, for -devivce pci-assign, -device vfio-pci, and -pcidevice.
      
      While creating tests for this new functionality, I noticed that the
      xmls for two existing tests had erroneously specified an
      until-now-ignored domain="0x0002", so I corrected those two tests, and
      also added two failure tests to be sure that we alert users who
      attempt to use a non-zero domain with a qemu that doesn't support it.
      1e947cf7
    • L
      qemu: add host-pci-multidomain capability · 17133e37
      Laine Stump 提交于
      Quite a long time ago, (apparently between qemu 0.12 and 0.13) qemu
      quietly began supporting the optional specification of a domain in the
      host-side address of all pci passthrough commands (by simply
      prepending it to the bus:slot.function format, as
      "dddd:bb:ss.f"). Since machines with multiple PCI domains are very
      rare, this never came up in practice, so libvirt was never updated to
      support it.
      
      This patch takes the first step to supporting specification of a non-0
      domain in the host-side address of PCI devices being assigned to a
      domain, by adding a capability bit to indicate support
      "QEMU_CAPS_HOST_PCI_MULTIDOMAIN", and detect it. Since this support
      was added in a version prior to the minimum version required for
      QMP-style capabilities detection, the capability is always enabled for
      any qemu that uses QMP for capabilities detection. For older qemus,
      the only clue that a domain can be specified in the host pci address
      is the presence of the string "[seg:]" in the help string for
      -pcidevice. (Ironically, libvirt will not be modified to support
      specification of domain for -pcidevice, since any qemu new enough for
      us to care about also supports "-device pci-assign" or "-device
      vfio-pci", which are greatly preferred).
      17133e37
    • J
      util: use typedefs for enums in "src/util/" directory · 1b14c449
      Julio Faracco 提交于
      In "src/util/" there are many enumeration (enum) declarations.
      Sometimes, it's better using a typedef for variable types,
      function types and other usages. Other enumeration will be
      changed to typedef's in the future.
      Signed-off-by: NJulio Faracco <jcfaracco@gmail.com>
      Signed-off-by: NEric Blake <eblake@redhat.com>
      1b14c449
  3. 02 5月, 2014 1 次提交
  4. 01 5月, 2014 2 次提交
  5. 30 4月, 2014 1 次提交
  6. 29 4月, 2014 3 次提交
    • M
      qemu: properly quit migration with abort_on_error · 837154a1
      Martin Kletzander 提交于
      When EIO comes to qemu while it's replying to
      qemuMigrationUpdateJobStatus(), qemu blocks, the migration of RAM can
      complete in the meantime, and when qemu unblocks, it sends us
      BLOCK_IO_ERROR plus migrations "status": "complete".  Even though we
      act upon the BLOCK_IO_ERROR by setting the proper state of the domain,
      the call still waits for the proper reply on monitor for query_migrate
      and after it gets it, it checks that migration is completed and the
      migration is finished.  This is what abort_on_error flag was meant for
      (we can migrate with these errors, but this flag must inhibit such
      behaviour).  Changing the order of the steps guarantees the flag works
      properly.
      
      Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1045833Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
      837154a1
    • M
      qemu: don't call virFileExists() for network type disks · f6ec6af8
      Martin Kletzander 提交于
      Based on suggestion from Eric [1], because it might not get cleaned up
      before the release, so to avoid potential errors.
      
      [1] https://www.redhat.com/archives/libvir-list/2014-April/msg00929.htmlSigned-off-by: NMartin Kletzander <mkletzan@redhat.com>
      f6ec6af8
    • E
      drivers: use virDirRead API · ddcf4730
      Eric Blake 提交于
      Convert all remaining clients of readdir to use the new
      interface, so that we can ensure (unlikely) errors while
      reading a directory are reported.
      
      * src/openvz/openvz_conf.c (openvzAssignUUIDs): Use new
      interface.
      * src/parallels/parallels_storage.c (parallelsFindVolumes)
      (parallelsFindVmVolumes): Report readdir failures.
      * src/qemu/qemu_driver.c (qemuDomainSnapshotLoad): Ignore readdir
      failures.
      * src/secret/secret_driver.c (loadSecrets): Likewise.
      * src/qemu/qemu_hostdev.c
      (qemuHostdevHostSupportsPassthroughVFIO): Report readdir failures.
      * src/xen/xen_inotify.c (xenInotifyOpen): Likewise.
      * src/xen/xm_internal.c (xenXMConfigCacheRefresh): Likewise.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      ddcf4730
  7. 28 4月, 2014 1 次提交
    • J
      Recheck disk backing chains after snapshot · eec2f659
      Jiri Denemark 提交于
      When a snapshot operation finishes we have to recheck the backing chain
      of all disks involved in the snapshot. And we need to do that even if
      the operation failed because some of the disks might have changed if
      QEMU did not support transactions.
      eec2f659
  8. 27 4月, 2014 1 次提交
    • L
      network: centralize check for active network during interface attach · 34cc3b2f
      Laine Stump 提交于
      The check for a network being active during interface attach was being
      done individually in several places (by both the lxc driver and the
      qemu driver), but those places were too specific, leading to it *not*
      being checked when allocating a connection/device from a macvtap or
      hostdev network.
      
      This patch puts a single check in networkAllocateActualDevice(), which
      is always called before the any network interface is attached to any
      type of domain. It also removes all the other now-redundant checks
      from the lxc and qemu drivers.
      
      NB: the following patches are prerequisites for this patch, in the
      case that it is backported to any branch:
      
        440beeb7 network: fix virNetworkObjAssignDef and persistence
        8aaa5b68 network: create statedir during driver initialization
        b9e95491 network: change location of network state xml files
        411c5486 network: set macvtap/hostdev networks active if their state
                file exists
      
      This fixes:
      
        https://bugzilla.redhat.com/show_bug.cgi?id=880483
      34cc3b2f
  9. 25 4月, 2014 6 次提交
  10. 24 4月, 2014 8 次提交
  11. 23 4月, 2014 2 次提交
    • J
      Save domain status after cpu hotplug · b396e602
      Ján Tomko 提交于
      The live change of vcpus was not reflected in the domain status
      xml and it got lost during libvirtd restart.
      
      https://bugzilla.redhat.com/show_bug.cgi?id=1088703
      b396e602
    • L
      PPC64 prefers to set pci-ohci controller as default USB controller. · 7b6b9d38
      Li Zhang 提交于
      Currently, libvirt is using legacy USB controller as default. There
      are problems with VGA which can't work correctly with USB Keyboard and
      USB Mouse.
      
      While providing -nodefaults, ppc64 should be specifying the usb
      controller explicitly in place of using the legacy
      controller(-usb). Qemu spapr initialization code when sees "-usb" adds a
      USB Keyboard and USB Mouse by default. And libvirt has added a USB
      keyboard and USB mouse.
      
      A recent fix in the in qemu VGA code uncoverd this problem, which
      resulted in addition of extra keyboard and mouse to the qemu machine.
      
      This patch is to set pci-ohci as USB default controller.
      Signed-off-by: NLi Zhang <zhlcindy@linux.vnet.ibm.com>
      7b6b9d38
  12. 22 4月, 2014 4 次提交
  13. 18 4月, 2014 2 次提交
  14. 17 4月, 2014 1 次提交
  15. 14 4月, 2014 1 次提交
  16. 12 4月, 2014 2 次提交
    • E
      conf: drop redundant parameter to chain lookup · 74430fe3
      Eric Blake 提交于
      The original chain lookup code had to pass in the starting name,
      because it was not available in the chain.  But now that we have
      added fields to the struct, this parameter is redundant.
      
      * src/util/virstoragefile.h (virStorageFileChainLookup): Alter
      signature.
      * src/util/virstoragefile.c (virStorageFileChainLookup): Adjust
      handling of top of chain.
      * src/qemu/qemu_driver.c (qemuDomainBlockCommit): Adjust caller.
      * tests/virstoragetest.c (testStorageLookup, mymain): Likewise.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      74430fe3
    • E
      conf: report error on chain lookup failure · 6752bc2a
      Eric Blake 提交于
      The chain lookup function was inconsistent on whether it left
      a message in the log when looking up a name that is not found
      on the chain (leaving a message for OOM or if name was
      relative but not part of the chain), and could litter the log
      even when successful (when name was relative but deep in the
      chain, use of virFindBackingFile early in the chain would complain
      about a file not found).  It's easier to make the function
      consistently emit a message exactly once on failure, and to let
      all callers rely on the clean semantics.
      
      * src/util/virstoragefile.c (virStorageFileChainLookup): Always
      report error on failure.  Simplify relative lookups.
      * src/qemu/qemu_driver.c (qemuDomainBlockCommit): Avoid
      overwriting error.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      6752bc2a