1. 25 9月, 2019 1 次提交
    • P
      lib: Lessen restrictions on VIR_DOMAIN_START_AUTODESTROY · 1172ea4f
      Peter Krempa 提交于
      Apart from migrating the VM to a remote host where we can't honour the
      VIR_DOMAIN_START_AUTODESTROY flag properly, restricting APIs which just
      modify the state of the VM does not make much sense.
      
      Change the wording of the documentation for VIR_DOMAIN_START_AUTODESTROY
      so that snapshots and saving to a file may be permitted as they
      semantically don't clash with the flag itself. Otherwise we'd have to
      forbid other APIs, such as virDomainDestroy as well.
      Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      1172ea4f
  2. 29 8月, 2019 1 次提交
  3. 27 8月, 2019 1 次提交
  4. 26 8月, 2019 1 次提交
  5. 27 7月, 2019 1 次提交
    • E
      backup: Introduce virDomainCheckpoint APIs · 0d44788f
      Eric Blake 提交于
      Introduce a bunch of new public APIs related to backup checkpoints.
      Checkpoints are modeled heavily after virDomainSnapshotPtr (both
      represent a point in time of the guest), although a snapshot exists
      with the intent of rolling back to that state, while a checkpoint
      exists to make it possible to create an incremental backup at a later
      time.  We may have a future hypervisor that can completely manage
      checkpoints without libvirt metadata, but the first two planned
      hypervisors (qemu and test) both always use libvirt for tracking
      metadata relations between checkpoints, so for now, I've deferred
      the counterpart of virDomainSnapshotHasMetadata for a separate
      API addition at a later date if there is ever a need for it.
      
      Note that until we allow snapshots and checkpoints to exist
      simultaneously on the same domain (although the actual prevention of
      this will be in a separate patch for the sake of an easier revert down
      the road), that it is not possible to branch out to create more than
      one checkpoint child to a given parent, although it may become
      possible later when we revert to a snapshot that coincides with a
      checkpoint.  This also means that for now, the decision of which
      checkpoint becomes the parent of a newly created one is the only
      checkpoint with no child (so while there are APIs for dealing with a
      current snapshot, we do not need those for checkpoints).  We may end
      up exposing a notion of a current checkpoint later, but it's easier to
      add stuff when proven needed than to blindly support it now and wish
      we hadn't exposed it.
      
      The following map shows the API relations to snapshots, with new APIs
      on the right:
      
      Operate on a domain object to create/redefine a child:
      virDomainSnapshotCreateXML          virDomainCheckpointCreateXML
      
      Operate on a child object for lifetime management:
      virDomainSnapshotDelete             virDomainCheckpointDelete
      virDomainSnapshotFree               virDomainCheckpointFree
      virDomainSnapshotRef                virDomainCheckpointRef
      
      Operate on a child object to learn more about it:
      virDomainSnapshotGetXMLDesc         virDomainCheckpointGetXMLDesc
      virDomainSnapshotGetConnect         virDomainCheckpointGetConnect
      virDomainSnapshotGetDomain          virDomainCheckpointGetDomain
      virDomainSnapshotGetName            virDomainCheckpiontGetName
      virDomainSnapshotGetParent          virDomainCheckpiontGetParent
      virDomainSnapshotHasMetadata        (deferred for later)
      virDomainSnapshotIsCurrent          (no counterpart, see note above)
      
      Operate on a domain object to list all children:
      virDomainSnapshotNum                (no counterparts, these are the old
      virDomainSnapshotListNames           racy interfaces)
      virDomainSnapshotListAllSnapshots   virDomainListAllCheckpoints
      
      Operate on a child object to list descendents:
      virDomainSnapshotNumChildren        (no counterparts, these are the old
      virDomainSnapshotListChildrenNames   racy interfaces)
      virDomainSnapshotListAllChildren    virDomainCheckpointListAllChildren
      
      Operate on a domain to locate a particular child:
      virDomainSnapshotLookupByName       virDomainCheckpointLookupByName
      virDomainSnapshotCurrent            (no counterpart, see note above)
      virDomainHasCurrentSnapshot         (no counterpart, old racy interface)
      
      Operate on a snapshot to roll back to earlier state:
      virDomainSnapshotRevert             (no counterpart, instead checkpoints
                                           are used in incremental backups via
      				     XML to virDomainBackupBegin)
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
      0d44788f
  6. 09 7月, 2019 1 次提交
  7. 03 7月, 2019 1 次提交
  8. 20 6月, 2019 3 次提交
  9. 04 6月, 2019 1 次提交
  10. 20 5月, 2019 1 次提交
    • H
      qemu: Add entry for balloon stats stat-htlb-pgalloc and stat-htlb-pgfail · a699b19f
      Han Han 提交于
      Qemu added reporting of virtio balloon new statistics stat-htlb-pgalloc and
      stat-htlb-pgfail since qemu-3.0 commit b7b12644297. The value of
      stat-htlb-pgalloc represents the number of successful hugetlb page allocations
      while stat-htlb-pgfail represents the number of failed ones. Add this
      statistics reporting to libvirt.
      
      To enable this feature for vm, guest kenel >= 4.17 is required because
      the exporting hugetlb page allocation for virtio balloon is introduced
      since 6c64fe7f.
      Signed-off-by: NHan Han <hhan@redhat.com>
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      a699b19f
  11. 17 4月, 2019 1 次提交
  12. 11 4月, 2019 1 次提交
  13. 14 3月, 2019 1 次提交
  14. 28 2月, 2019 1 次提交
  15. 20 2月, 2019 1 次提交
    • E
      domain: Define explicit flags for saved image xml · 12a51f37
      Eric Blake 提交于
      Commit d2a929d4 (0.9.4) defined virDomainSaveImageGetXMLDesc()'s use
      of @flags as a subset of virDomainXMLFlags, documenting that 2 of the
      3 flags defined at the time would never be valid.  Later, commit
      28f8dfdc (1.0.0) introduced a new flag, VIR_DOMAIN_XML_MIGRATABLE, but
      did not adjust the save image documentation to declare it as invalid.
      Later, commit a67e3872 (3.7.0) blindly copied and pasted the same text
      into virDomainManagedSaveGetXMLDesc.
      
      However, since the flag is not accepted as valid by any of the
      drivers (remote is just passthrough; and qemu is the only supporting
      driver for either API, with support for just VIR_DOMAIN_XML_SECURE),
      it is easier to just define an explicit set of supported flags
      directly related to the save image API rather than trying to borrow
      from live domain API, and risking confusion if even more domain flags
      are added later (in fact, I have an upcoming patch that plans to add
      a new flag to virDomainGetXMLDesc that makes no sense for saved
      images).  We may someday decide that saved images need to support the
      _MIGRATABLE flag, as it is possible to load a saved image with a
      different version of libvirt than the one that created it, but that
      can be a separate patch if it is ever needed.  Meanwhile, it DOES make
      sense to reuse the same flags for SaveImage and for ManagedSave (since
      ManagedSave is really just sugar for creating a normal SaveImage in a
      location controlled by libvirt instead of by the user).
      
      There is no API or ABI impact (since we purposefully used unsigned int
      rather than an enum type in public API, and since the new flag name
      carries the same value as the old reused name).
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
      12a51f37
  16. 07 2月, 2019 1 次提交
    • J
      Public API for post-copy migration bandwidth · cdc1b1d7
      Jiri Denemark 提交于
      This patch adds a new VIR_MIGRATE_PARAM_BANDWIDTH_POSTCOPY typed
      parameter for virDomainMigrate3 and virDomainMigrateToURI3 for setting
      maximum post-copy migration bandwidth.
      
      In case the initial VIR_MIGRATE_PARAM_BANDWIDTH_POSTCOPY value turns out
      to be suboptimal a new VIR_DOMAIN_MIGRATE_MAX_SPEED_POSTCOPY flag for
      virDomainMigrateSetMaxSpeed and virDomainMigrateGetMaxSpeed may be used
      to set/get the maximum post-copy migration bandwidth while migration is
      already running.
      Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      Reviewed-by: NJán Tomko <jtomko@redhat.com>
      cdc1b1d7
  17. 30 1月, 2019 3 次提交
  18. 28 1月, 2019 1 次提交
    • M
      lib: Use more of VIR_STEAL_PTR() · 5772885d
      Michal Privoznik 提交于
      We have this very handy macro called VIR_STEAL_PTR() which steals
      one pointer into the other and sets the other to NULL. The
      following coccinelle patch was used to create this commit:
      
        @ rule1 @
        identifier a, b;
        @@
      
        - b = a;
          ...
        - a = NULL;
        + VIR_STEAL_PTR(b, a);
      
      Some places were clean up afterwards to make syntax-check happy
      (e.g. some curly braces were removed where the body become a one
      liner).
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      Reviewed-by: NErik Skultety <eskultet@redhat.com>
      5772885d
  19. 18 12月, 2018 1 次提交
  20. 05 12月, 2018 1 次提交
  21. 27 11月, 2018 1 次提交
    • W
      qemu: Report cache occupancy (CMT) with domstats · a91ebc89
      Wang Huaqiang 提交于
      Adding the interface in qemu to report CMT statistic information
      through command 'virsh domstats --cpu-total'.
      
      Below is a typical output:
      
               # virsh domstats 1 --cpu-total
               Domain: 'ubuntu16.04-base'
                 ...
                 cpu.cache.monitor.count=2
                 cpu.cache.monitor.0.name=vcpus_1
                 cpu.cache.monitor.0.vcpus=1
                 cpu.cache.monitor.0.bank.count=2
                 cpu.cache.monitor.0.bank.0.id=0
                 cpu.cache.monitor.0.bank.0.bytes=4505600
                 cpu.cache.monitor.0.bank.1.id=1
                 cpu.cache.monitor.0.bank.1.bytes=5586944
                 cpu.cache.monitor.1.name=vcpus_4-6
                 cpu.cache.monitor.1.vcpus=4,5,6
                 cpu.cache.monitor.1.bank.count=2
                 cpu.cache.monitor.1.bank.0.id=0
                 cpu.cache.monitor.1.bank.0.bytes=17571840
                 cpu.cache.monitor.1.bank.1.id=1
                 cpu.cache.monitor.1.bank.1.bytes=29106176
      Signed-off-by: NWang Huaqiang <huaqiang.wang@intel.com>
      Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
      a91ebc89
  22. 19 11月, 2018 2 次提交
    • J
      lib: Introduce virDomainSetIOThreadParams · ae69bda5
      John Ferlan 提交于
      Create a new API that will allow an adjustment of IOThread
      polling parameters for the specified IOThread. These parameters
      will not be saved in the guest XML. Currently the only parameters
      supported will allow the hypervisor to adjust the parameters used
      to limit and alter the scope of the polling interval. The polling
      interval allows the IOThread to spend more or less time processing
      in the guest.
      
      Based on code originally posted by Pavel Hrdina <phrdina@redhat.com>
      to add virDomainAddIOThreadParams and virDomainModIOThreadParams.
      Modification of those changes to use virDomainSetIOThreadParams
      instead and remove concepts related to saving the data in guest
      XML as well as the way to specifically enable the polling parameters.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      ACKed-by: NMichal Privoznik <mprivozn@redhat.com>
      ae69bda5
    • J
      qemu: Implement the ability to return IOThread stats · d1eac927
      John Ferlan 提交于
      Process the IOThreads polling stats if available. Generate the
      output params record to be returned to the caller with the three
      values - poll-max-ns, poll-grow, and poll-shrink.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      ACKed-by: NMichal Privoznik <mprivozn@redhat.com>
      d1eac927
  23. 06 9月, 2018 1 次提交
  24. 04 9月, 2018 1 次提交
  25. 17 7月, 2018 1 次提交
  26. 04 7月, 2018 1 次提交
  27. 19 6月, 2018 1 次提交
  28. 13 6月, 2018 1 次提交
  29. 12 6月, 2018 1 次提交
  30. 28 5月, 2018 1 次提交
  31. 18 4月, 2018 1 次提交
  32. 15 3月, 2018 1 次提交
  33. 19 10月, 2017 2 次提交
  34. 14 10月, 2017 1 次提交