1. 13 10月, 2011 2 次提交
    • M
      virDomainCoreDump: Introduce VIR_DUMP_RESET flag · 4dadfe59
      Michal Privoznik 提交于
      This flag is intended to allow user to do so called system reset
      after dump, instead of sending ACPI reboot event.
      4dadfe59
    • E
      snapshot: add API for filtering by leaves · 8b6d1a20
      Eric Blake 提交于
      Counterpart to --roots.
      
      * include/libvirt/libvirt.h.in (VIR_DOMAIN_SNAPSHOT_LIST_LEAVES):
      New flag.
      * src/libvirt.c (virDomainSnapshotNum, virDomainSnapshotListNames)
      (virDomainSnapshotNumChildren)
      (virDomainSnapshotListChildrenNames): Document it.
      * tools/virsh.c (cmdSnapshotList): Expose it.
      * tools/virsh.pod (snapshot-list): Document --leaves.
      8b6d1a20
  2. 11 10月, 2011 1 次提交
    • E
      snapshot: new virDomainSnapshotListChildrenNames API · f2013c9d
      Eric Blake 提交于
      The previous API addition allowed traversal up the hierarchy;
      this one makes it easier to traverse down the hierarchy.
      
      In the python bindings, virDomainSnapshotNumChildren can be
      generated, but virDomainSnapshotListChildrenNames had to copy
      from the hand-written example of virDomainSnapshotListNames.
      
      * include/libvirt/libvirt.h.in (virDomainSnapshotNumChildren)
      (virDomainSnapshotListChildrenNames): New prototypes.
      (VIR_DOMAIN_SNAPSHOT_LIST_DESCENDANTS): New flag alias.
      * src/libvirt.c (virDomainSnapshotNumChildren)
      (virDomainSnapshotListChildrenNames): New functions.
      * src/libvirt_public.syms: Export them.
      * src/driver.h (virDrvDomainSnapshotNumChildren)
      (virDrvDomainSnapshotListChildrenNames): New callbacks.
      * python/generator.py (skip_impl, nameFixup): Update lists.
      * python/libvirt-override-api.xml: Likewise.
      * python/libvirt-override.c
      (libvirt_virDomainSnapshotListChildrenNames): New wrapper function.
      f2013c9d
  3. 06 10月, 2011 1 次提交
    • E
      snapshot: add REVERT_FORCE to API · 3c797404
      Eric Blake 提交于
      Although reverting to a snapshot is a form of data loss, this is
      normally expected.  However, there are two cases where additional
      surprises (failure to run the reverted state, or a break in
      connectivity to the domain) can come into play.  Requiring extra
      acknowledgment in these cases will make it less likely that
      someone can get into an unrecoverable state due to a default revert.
      
      Also create a new error code, so users can distinguish when forcing
      would make a difference, rather than having to blindly request force.
      
      * include/libvirt/libvirt.h.in (VIR_DOMAIN_SNAPSHOT_REVERT_FORCE):
      New flag.
      * src/libvirt.c (virDomainRevertToSnapshot): Document it.
      * include/libvirt/virterror.h (VIR_ERR_SNAPSHOT_REVERT_RISKY): New
      error value.
      * src/util/virterror.c (virErrorMsg): Implement it.
      * tools/virsh.c (cmdDomainSnapshotRevert): Add --force to virsh.
      * tools/virsh.pod (snapshot-revert): Document it.
      3c797404
  4. 29 9月, 2011 1 次提交
  5. 28 9月, 2011 1 次提交
    • E
      snapshot: new virDomainSnapshotGetParent API · a2f706de
      Eric Blake 提交于
      Although a client can already obtain a snapshot's parent by
      dumping and parsing the xml, then doing a snapshot lookup by
      name, it is more efficient to get the parent in one step, which
      in turn will make operations that must traverse a snapshot
      hierarchy easier to perform.
      
      * include/libvirt/libvirt.h.in (virDomainSnapshotGetParent):
      Declare.
      * src/libvirt.c (virDomainSnapshotGetParent): New function.
      * src/libvirt_public.syms: Export it.
      * src/driver.h (virDrvDomainSnapshotGetParent): New callback.
      a2f706de
  6. 21 9月, 2011 1 次提交
  7. 16 9月, 2011 2 次提交
  8. 08 9月, 2011 1 次提交
    • E
      snapshot: new APIs for inspecting snapshot object · 6c14439e
      Eric Blake 提交于
      These functions access internals of the opaque object, and do
      not need any rpc counterpart.  It could be argued that we should
      have provided these when snapshot objects were first introduced,
      since all the other vir*Ptr objects have at least a GetName accessor.
      
      * include/libvirt/libvirt.h.in (virDomainSnapshotGetName)
      (virDomainSnapshotGetDomain, virDomainSnapshotGetConnect): Declare.
      * src/libvirt.c (virDomainSnapshotGetName)
      (virDomainSnapshotGetDomain, virDomainSnapshotGetConnect): New
      functions.
      * src/libvirt_public.syms: Export them.
      6c14439e
  9. 06 9月, 2011 1 次提交
  10. 05 9月, 2011 3 次提交
    • E
      snapshot: add flag for requesting disk snapshot · e03a62b4
      Eric Blake 提交于
      Prior to this patch, <domainsnapshot>/<disks> was ignored.  This
      changes it to be an error unless an explicit disk snapshot is
      requested (a future patch may relax things if it turns out to
      be useful to have a <disks> specification alongside a system
      checkpoint).
      
      * include/libvirt/libvirt.h.in
      (VIR_DOMAIN_SNAPSHOT_CREATE_DISK_ONLY): New flag.
      * src/libvirt.c (virDomainSnapshotCreateXML): Document it.
      * src/esx/esx_driver.c (esxDomainSnapshotCreateXML): Disk
      snapshots not supported yet.
      * src/vbox/vbox_tmpl.c (vboxDomainSnapshotCreateXML): Likewise.
      * src/qemu/qemu_driver.c (qemuDomainSnapshotCreateXML): Likewise.
      e03a62b4
    • E
      snapshot: allow halting after snapshot · 6f66423e
      Eric Blake 提交于
      Since a snapshot is fully recoverable, it is useful to have a
      snapshot as a means of hibernating a guest, then reverting to
      the snapshot to wake the guest up.  This mode of usage is
      similar to 'virsh save/virsh restore', except that virsh
      save uses an external file while virsh snapshot keeps the
      vm state internal to a qcow2 file.  However, it only works on
      persistent domains.
      
      In the usage pattern of snapshot/revert for hibernating a guest,
      there is no need to keep the guest running between the two points
      in time, especially since that would generate runtime state that
      would just be discarded.  Add a flag to make it possible to
      stop the domain after the snapshot has completed.
      
      * include/libvirt/libvirt.h.in (VIR_DOMAIN_SNAPSHOT_CREATE_HALT):
      New flag.
      * src/libvirt.c (virDomainSnapshotCreateXML): Document it.
      * src/qemu/qemu_driver.c (qemuDomainSnapshotCreateXML)
      (qemuDomainSnapshotCreateActive): Implement it.
      6f66423e
    • E
      snapshot: introduce new deletion flag · 3d77d0a6
      Eric Blake 提交于
      Reverting to a state prior to an external snapshot risks
      corrupting any other branches in the snapshot hierarchy that
      were using the snapshot as a read-only backing file.  So
      disk snapshot code will default to preventing reverting to
      a snapshot that has any children, meaning that deleting just
      the children of a snapshot becomes a useful operation in
      preparing that snapshot for being a future reversion target.
      The code for the new flag is simple - it's one less deletion,
      plus a tweak to keep the current snapshot correct.
      
      * include/libvirt/libvirt.h.in
      (VIR_DOMAIN_SNAPSHOT_DELETE_CHILDREN_ONLY): New flag.
      * src/libvirt.c (virDomainSnapshotDelete): Document it, and
      enforce mutual exclusion.
      * src/qemu/qemu_driver.c (qemuDomainSnapshotDelete): Implement
      it.
      3d77d0a6
  11. 03 9月, 2011 6 次提交
    • E
      snapshot: allow full domain xml in snapshot · f609cb85
      Eric Blake 提交于
      Just like VM saved state images (virsh save), snapshots MUST
      track the inactive domain xml to detect any ABI incompatibilities.
      
      The indentation is not perfect, but functionality comes before form.
      
      Later patches will actually supply a full domain; for now, this
      wires up the storage to support one, but doesn't ever generate one
      in dumpxml output.
      
      Happily, libvirt.c was already rejecting use of VIR_DOMAIN_XML_SECURE
      from read-only connections, even though before this patch, there was
      no information to be secured by the use of that flag.
      
      And while we're at it, mark the libvirt snapshot metadata files
      as internal-use only.
      
      * src/libvirt.c (virDomainSnapshotGetXMLDesc): Document flag.
      * src/conf/domain_conf.h (_virDomainSnapshotDef): Add member.
      (virDomainSnapshotDefParseString, virDomainSnapshotDefFormat):
      Update signature.
      * src/conf/domain_conf.c (virDomainSnapshotDefFree): Clean up.
      (virDomainSnapshotDefParseString): Optionally parse domain.
      (virDomainSnapshotDefFormat): Output full domain.
      * src/esx/esx_driver.c (esxDomainSnapshotCreateXML)
      (esxDomainSnapshotGetXMLDesc): Update callers.
      * src/vbox/vbox_tmpl.c (vboxDomainSnapshotCreateXML)
      (vboxDomainSnapshotGetXMLDesc): Likewise.
      * src/qemu/qemu_driver.c (qemuDomainSnapshotCreateXML)
      (qemuDomainSnapshotLoad, qemuDomainSnapshotGetXMLDesc)
      (qemuDomainSnapshotWriteMetadata): Likewise.
      * docs/formatsnapshot.html.in: Rework doc example.
      Based on a patch by Philipp Hahn.
      f609cb85
    • E
      snapshot: prevent stranding snapshot data on domain destruction · 282fe1f0
      Eric Blake 提交于
      Just as leaving managed save metadata behind can cause problems
      when creating a new domain that happens to collide with the name
      of the just-deleted domain, the same is true of leaving any
      snapshot metadata behind.  For safety sake, extend the semantic
      change of commit b26a9fa9 to also cover snapshot metadata as a
      reason to reject undefining an inactive domain.  A future patch
      will make sure that shutdown of a transient domain automatically
      deletes snapshot metadata (whether by destroy, shutdown, or
      guest-initiated action).  Management apps of transient domains
      should take care to capture xml of snapshots, if it is necessary
      to recreate the snapshot metadata on a later transient domain
      with the same name and uuid.
      
      This also documents a new flag that hypervisors can choose to
      support as a shortcut for taking care of the metadata as part of
      the undefine process; however, nontrivial driver support for these
      flags will be deferred to future patches.
      
      Note that ESX and VBox can never be transient; therefore, they
      do not have to worry about automatic cleanup after shutdown
      (the persistent domain still remains); likewise they never
      store snapshot metadata, so the undefine flag is trivial.
      The nontrivial work remaining is thus in the qemu driver.
      
      * include/libvirt/libvirt.h.in
      (VIR_DOMAIN_UNDEFINE_SNAPSHOTS_METADATA): New flag.
      * src/libvirt.c (virDomainUndefine, virDomainUndefineFlags):
      Document new limitations and flag.
      * src/esx/esx_driver.c (esxDomainUndefineFlags): Trivial
      implementation.
      * src/vbox/vbox_tmpl.c (vboxDomainUndefineFlags): Likewise.
      * src/qemu/qemu_driver.c (qemuDomainUndefineFlags): Enforce
      the limitations.
      282fe1f0
    • E
      snapshot: allow recreation of metadata · af65695a
      Eric Blake 提交于
      The first two flags are essential for being able to replicate
      snapshot hierarchies across multiple hosts, which will come in
      handy for supervised migrations.  It also allows a management app
      to take a snapshot of a transient domain, save the metadata, stop
      the domain, recreate a new transient domain by the same name,
      redefine the snapshot, then revert to it.
      
      This is not quite as convenient as leaving the metadata behind
      after a domain is no longer around, but doing that has a few
      problems: 1. the libvirt API can only delete snapshot metadata
      if there is a valid domain handle to use to get to that snapshot
      object - if stale data is left behind without a domain, there is
      no way to request that the data be cleaned up. 2. creating a new
      domain with the same name but different uuid than the older
      domain where a snapshot existed cannot use the older snapshot
      data; this risks confusing libvirt, and forbidding the stale
      data is similar to the recent patch to forbid stale managed save.
      
      The first two flags might be useful on hypervisors with no metadata,
      but only for modifying the notion of the current snapshot;
      however, I don't know how to do that for ESX or VBox.
      
      The third flag is a convenience option, to combine a creation with
      a delete metadata into one step.  It is trivial for hypervisors
      with no metadata.
      
      The qemu changes will be involved enough to warrant a separate patch.
      
      * include/libvirt/libvirt.h.in
      (VIR_DOMAIN_SNAPSHOT_CREATE_REDEFINE)
      (VIR_DOMAIN_SNAPSHOT_CREATE_CURRENT)
      (VIR_DOMAIN_SNAPSHOT_CREATE_NO_METADATA): New flags.
      * src/libvirt.c (virDomainSnapshotCreateXML): Document them, and
      enforce mutual exclusion.
      * src/esx/esx_driver.c (esxDomainSnapshotCreateXML): Trivial
      implementation.
      * src/vbox/vbox_tmpl.c (vboxDomainSnapshotCreateXML): Likewise.
      * docs/formatsnapshot.html.in: Document re-creation.
      af65695a
    • E
      snapshot: identify which snapshots have metadata · 9f5e53e2
      Eric Blake 提交于
      To make it easier to know when undefine will fail because of existing
      snapshot metadata, we need to know how many snapshots have metadata.
      
      Also, it is handy to filter the list of snapshots to just those that
      have no parents; document that flag now, but implement it in later patches.
      
      * include/libvirt/libvirt.h.in (VIR_DOMAIN_SNAPSHOT_LIST_ROOTS)
      (VIR_DOMAIN_SNAPSHOT_LIST_METADATA): New flags.
      * src/libvirt.c (virDomainSnapshotNum)
      (virDomainSnapshotListNames): Document them.
      * src/esx/esx_driver.c (esxDomainSnapshotNum)
      (esxDomainSnapshotListNames): Implement trivial flag.
      * src/vbox/vbox_tmpl.c (vboxDomainSnapshotNum)
      (vboxDomainSnapshotListNames): Likewise.
      * src/qemu/qemu_driver.c (qemuDomainSnapshotNum)
      (qemuDomainSnapshotListNames): Likewise.
      9f5e53e2
    • E
      snapshot: allow deletion of just snapshot metadata · 795fe9b2
      Eric Blake 提交于
      A future patch will make it impossible to remove a domain if it
      would leave behind any libvirt-tracked metadata about snapshots,
      since stale metadata interferes with a new domain by the same name.
      But requiring snaphot contents to be deleted before removing a
      domain is harsh; with qemu, qemu-img can still make use of the
      contents after the libvirt domain is gone.  Therefore, we need
      an option to get rid of libvirt tracking information, but not
      the actual contents.  For hypervisors that do not track any
      metadata in libvirt, the implementation is trivial; all remaining
      hypervisors (really, just qemu) will be dealt with separately.
      
      * include/libvirt/libvirt.h.in
      (VIR_DOMAIN_SNAPSHOT_DELETE_METADATA_ONLY): New flag.
      * src/libvirt.c (virDomainSnapshotDelete): Document it.
      * src/esx/esx_driver.c (esxDomainSnapshotDelete): Trivially
      supported when there is no libvirt metadata.
      * src/vbox/vbox_tmpl.c (vboxDomainSnapshotDelete): Likewise.
      795fe9b2
    • E
      snapshot: fine-tune ability to start paused · 3cff66f4
      Eric Blake 提交于
      While it is nice that snapshots and saved images remember whether
      the domain was running or paused, sometimes the restoration phase
      wants to guarantee a particular state (paused to allow hot-plugging,
      or running without needing to call resume).  This introduces new
      flags to allow the control, and a later patch will implement the
      flags for qemu.
      
      * include/libvirt/libvirt.h.in (VIR_DOMAIN_SAVE_RUNNING)
      (VIR_DOMAIN_SAVE_PAUSED, VIR_DOMAIN_SNAPSHOT_REVERT_RUNNING)
      (VIR_DOMAIN_SNAPSHOT_REVERT_PAUSED): New flags.
      * src/libvirt.c (virDomainSaveFlags, virDomainRestoreFlags)
      (virDomainManagedSave, virDomainSaveImageDefineXML)
      (virDomainRevertToSnapshot): Document their use, and enforce
      mutual exclusion.
      3cff66f4
  12. 02 9月, 2011 3 次提交
    • O
      storage: Add fs pool formatting · 27758859
      Osier Yang 提交于
      This patch adds the ability to make the filesystem for a filesystem
      pool during a pool build.
      
      The patch adds two new flags, no overwrite and overwrite, to control
      when mkfs gets executed.  By default, the patch preserves the
      current behavior, i.e., if no flags are specified, pool build on a
      filesystem pool only makes the directory on which the filesystem
      will be mounted.
      
      If the no overwrite flag is specified, the target device is checked
      to determine if a filesystem of the type specified in the pool is
      present.  If a filesystem of that type is already present, mkfs is
      not executed and the build call returns an error.  Otherwise, mkfs
      is executed and any data present on the device is overwritten.
      
      If the overwrite flag is specified, mkfs is always executed, and any
      existing data on the target device is overwritten unconditionally.
      27758859
    • O
      API: Init conn in case of it might be used uninitialized · 50c82157
      Osier Yang 提交于
      There is a goto before "conn" is initialized.
      50c82157
    • J
      Add public API for getting migration speed · b12354be
      Jim Fehlig 提交于
      Includes impl of python binding since the generator was not
      able to cope.
      
      Note: Requires gendispatch.pl patch from Matthias Bolte
      
      https://www.redhat.com/archives/libvir-list/2011-August/msg01367.html
      b12354be
  13. 31 8月, 2011 1 次提交
    • E
      snapshot: forbid snapshot on autodestroy domain · 173015be
      Eric Blake 提交于
      There is no reason to forbid pausing an autodestroy domain
      (not to mention that 'virsh start --paused --autodestroy'
      succeeds in creating a paused autodestroy domain).
      
      Meanwhile, qemu was failing to enforce the API documentation that
      autodestroy domains cannot be saved.  And while the original
      documentation only mentioned save/restore, snapshots are another
      form of saving that are close enough in semantics as to make no
      sense on one-shot domains.
      
      * src/qemu/qemu_driver.c (qemudDomainSuspend): Drop bogus check.
      (qemuDomainSaveInternal, qemuDomainSnapshotCreateXML): Forbid
      saves of autodestroy domains.
      * src/libvirt.c (virDomainCreateWithFlags, virDomainCreateXML):
      Document snapshot interaction.
      173015be
  14. 30 8月, 2011 1 次提交
    • E
      start: allow discarding managed save · 27c85260
      Eric Blake 提交于
      There have been several instances of people having problems with
      a broken managed save file, and not aware that they could use
      'virsh managedsave-remove dom' to fix things.  Making it possible
      to do this as part of starting a domain makes the same functionality
      easier to find, and one less API call.
      
      * include/libvirt/libvirt.h.in (VIR_DOMAIN_START_FORCE_BOOT): New
      flag.
      * src/libvirt.c (virDomainCreateWithFlags): Document it.
      * src/qemu/qemu_driver.c (qemuDomainObjStart): Alter signature.
      (qemuAutostartDomain, qemuDomainStartWithFlags): Update callers.
      * tools/virsh.c (cmdStart): Expose it in virsh.
      * tools/virsh.pod (start): Document it.
      27c85260
  15. 27 8月, 2011 1 次提交
  16. 26 8月, 2011 4 次提交
    • M
      hyperv: Add driver skeleton · 4d6e6f4a
      Matthias Bolte 提交于
      4d6e6f4a
    • J
      Ignore unused streams in virStreamAbort · b136266d
      Jiri Denemark 提交于
      When virStreamAbort is called on a stream that has not been used yet,
      quite confusing error is returned: "this function is not supported by
      the connection driver". Let's just ignore such streams as there's
      nothing to abort anyway.
      b136266d
    • J
      Do not try to cancel non-existent migration on source · 3398eeda
      Jiri Denemark 提交于
      If migration failed on source daemon, the migration is automatically
      canceled by the daemon itself. Thus we don't need to call
      virDomainMigrateConfirm3(cancelled=1). Calling it doesn't cause any harm
      but the resulting error message printed in logs may confuse people.
      3398eeda
    • A
      libvirt: avoid dead store in virDomainMigrateVersion3 · 5495e45e
      Alex Jia 提交于
      * src/qemu/qemu_migration.c: avoid dead 'ret' assignment and silence
        clang warning.
      
      Detected by ccc-analyzer:
      
      libvirt.c:4277:5: warning: Value stored to 'ret' is never read
          ret = domain->conn->driver->domainMigrateConfirm3
          ^     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      5495e45e
  17. 25 8月, 2011 1 次提交
  18. 24 8月, 2011 1 次提交
    • E
      libvirt: log all flags parameters · ba0c2199
      Eric Blake 提交于
      I was testing a virsh patch, and wanted to see if I had passed the
      flags I thought.  But with LIBVIRT_DEBUG in the environment, I just
      saw:
      
      14:24:52.359: 15022: debug : virDomainSnapshotNum:15586 : dom=0xc9c180, (VM: name=rhel_6-64, uuid=48f8e8e7-e14f-0e14-02f0-ce71997bdcab),
      
      including a trailing space.  This fixes the issues.
      
      * src/libvirt.c: Log flag parameters, even if currently unused.
      (VIR_DOMAIN_DEBUG_0): Drop trailing comma in log.
      (VIR_DOMAIN_DEBUG_1): Split guts into...
      (VIR_DOMAIN_DEBUG_2): ...new macro.
      ba0c2199
  19. 11 8月, 2011 1 次提交
    • E
      managedsave: prohibit use on transient domains · 0de75e85
      Eric Blake 提交于
      Transient domains reject attempts to set autostart, and using
      virDomainCreate to restart a domain only works on persistent
      domains.  Therefore, managed save makes no sense on transient
      domains, and should be rejected up front rather than creating
      an otherwise unrecoverable managed save file.
      
      Besides, transient domains imply that a lot more management is
      being done by the upper layer; this includes the assumption
      that the upper layer is okay managing the saved state file
      created by virDomainSave, and does not need to use managed save.
      
      * src/libvirt.c: Document that transient domains are incompatible
      with managed save.
      * src/qemu/qemu_driver.c (qemuDomainManagedSave): Enforce it.
      * src/libxl/libxl_driver.c (libxlDomainManagedSave): Likewise.
      0de75e85
  20. 03 8月, 2011 1 次提交
  21. 28 7月, 2011 2 次提交
    • M
      libvirt.c: Update outdated description of flags · 867e7519
      Michal Privoznik 提交于
      Because we do support flags for virDomainSetBlkioParameters and
      virDomainGetBlkioParameters, update appropriate description as well.
      867e7519
    • A
      virsh: fix memory leak in cmdVolPath code · 1768bf63
      Alex Jia 提交于
      * tools/virsh.c: avoid memory leak in cmdVolPath.
      * src/libvirt.c: Add doc for virStorageVolGetPath to tell one
        must free() the returned path after use.
      
      * how to reproduce?
      
      % dd if=/dev/zero of=/var/lib/libvirt/images/foo.img count=1 bs=10M
      % virsh pool-refresh default
      % valgrind -v --leak-check=full virsh vol-path --vol \
      /var/lib/libvirt/images/foo.img
      
      * actual results:
      
      Detected in valgrind run:
      
      ==16436== 32 bytes in 1 blocks are definitely lost in loss record 7 of 22
      ==16436==    at 0x4A05FDE: malloc (vg_replace_malloc.c:236)
      ==16436==    by 0x386A314B3D: xdr_string (in /lib64/libc-2.12.so)
      ==16436==    by 0x3DF8CD770D: xdr_remote_nonnull_string (remote_protocol.c:3
      ==16436==    by 0x3DF8CD7EC8: xdr_remote_storage_vol_get_path_ret
      % virsh pool-refresh default
      % valgrind -v --leak-check=full virsh vol-path --vol \
      /var/lib/libvirt/images/foo.img
      Signed-off-by: NAlex Jia <ajia@redhat.com>
      1768bf63
  22. 27 7月, 2011 1 次提交
    • J
      qemu: Migration job on source daemon · d58e91a8
      Jiri Denemark 提交于
      Make MIGRATION_OUT use the new helper methods.
      
      This also introduces new protection to migration v3 process: the
      migration job is held from Begin to Confirm to avoid changes to a domain
      during migration (esp. between Begin and Perform phases). This change is
      automatically applied to p2p and tunneled migrations. For normal
      migration, this requires support from a client. In other words, if an
      old (pre 0.9.4) client starts normal migration of a domain, the domain
      will not be protected against changes between Begin and Perform steps.
      d58e91a8
  23. 26 7月, 2011 1 次提交
    • E
      vcpu: teach getVcpusFlags about current · 59d04287
      Eric Blake 提交于
      Now that virDomainSetVcpusFlags knows about VIR_DOMAIN_AFFECT_CURRENT,
      so should virDomainGetVcpusFlags.
      
      Unfortunately, the virsh counterpart 'virsh vcpucount' has already
      commandeered --current for a different meaning, so teaching virsh
      to expose this in the next patch will require a bit of care.
      
      * src/libvirt.c (virDomainGetVcpusFlags): Allow
      VIR_DOMAIN_AFFECT_CURRENT.
      * src/libxl/libxl_driver.c (libxlDomainGetVcpusFlags): Likewise.
      * src/qemu/qemu_driver.c (qemudDomainGetVcpusFlags): Likewise.
      * src/test/test_driver.c (testDomainGetVcpusFlags): Likewise.
      * src/xen/xen_driver.c (xenUnifiedDomainGetVcpusFlags): Likewise.
      59d04287
  24. 22 7月, 2011 2 次提交
    • A
      virDomainBlockPull: Implement the main entry points · 72082a05
      Adam Litke 提交于
      * src/libvirt.c: implement the main entry points
      72082a05
    • E
      save: new API to manipulate save file images · d2a929d4
      Eric Blake 提交于
      Modifying the xml on either save or restore only gets you so
      far - you have to remember to 'virsh dumpxml dom' just prior
      to the 'virsh save' in order to have an xml file worth modifying
      that won't be rejected due to abi breaks.  To make this more
      powerful, we need a way to grab the xml embedded within a state
      file, and from there, it's not much harder to also support
      modifying a state file in-place.
      
      Also, virDomainGetXMLDesc didn't document its flags.
      
      * include/libvirt/libvirt.h.in (virDomainSaveImageGetXMLDesc)
      (virDomainSaveImageDefineXML): New prototypes.
      * src/libvirt.c (virDomainSaveImageGetXMLDesc)
      (virDomainSaveImageDefineXML): New API.
      * src/libvirt_public.syms: Export them.
      * src/driver.h (virDrvDomainSaveImageGetXMLDesc)
      (virDrvDomainSaveImgeDefineXML): New driver callbacks.
      d2a929d4