1. 05 9月, 2012 1 次提交
  2. 31 8月, 2012 1 次提交
  3. 23 8月, 2012 1 次提交
  4. 22 8月, 2012 3 次提交
  5. 26 7月, 2012 2 次提交
  6. 25 7月, 2012 1 次提交
  7. 21 7月, 2012 1 次提交
  8. 13 7月, 2012 1 次提交
    • J
      Clarify direct migration · 3189dfb1
      Jiri Denemark 提交于
      When --direct is used when migrating a domain running on a hypervisor
      that does not support direct migration (such as QEMU), the caller would
      get the following error message:
      
          this function is not supported by the connection driver:
          virDomainMigrateToURI2
      
      which is a complete nonsense since qemu driver implements
      virDomainMigrateToURI2. This patch would emit a more sensible error in
      this case:
      
          Requested operation is not valid: direct migration is not supported
          by the connection driver
      3189dfb1
  9. 10 7月, 2012 1 次提交
  10. 27 6月, 2012 1 次提交
    • D
      virsh: Add domdisplay cmd for VNC, SPICE and RDP · 421a2009
      Doug Goldstein 提交于
      v2:
      - Refactored to use virBuffer
      - Refactored to use virXPath wrappers
      - Added support for tls-port and password for SPICE
      - Added optional flag to disable SPICE password to the URI
      - Added support for RDP
      - Fixed code reviews
      
      Add a new 'domdisplay' command that provides a URI for VNC, SPICE and
      RDP connections. Presently the 'vncdisplay' command provides you with
      the port info that QEMU is listening on but there is no counterpart for
      SPICE and RDP. Additionally this provides you with the bind address as
      specified in the XML, which the existing 'vncdisplay' lacks. For SPICE
      connections it supports secure and unsecure channels and optionally
      providing the password for the SPICE channel.
      Signed-off-by: NDoug Goldstein <cardoe@cardoe.com>
      421a2009
  11. 25 6月, 2012 1 次提交
    • M
      storage: Introduce --inactive for pool-dumpxml · 8d27005b
      Michal Privoznik 提交于
      Storage is one of the last domains in libvirt where we don't fully
      utilize inactive and live XML. Okay, it might be because we don't
      have support for that. So implement such support. However, we need
      to fallback when talking to old daemon which doesn't support this
      new flag called VIR_STORAGE_XML_INACTIVE.
      8d27005b
  12. 21 6月, 2012 1 次提交
    • P
      virsh: add support for virConnectListAllDomains and clean up cmdList · d62e51f8
      Peter Krempa 提交于
      This patch makes use of the newly added api virConnectListAllDomains()
      to list domains in virsh.
      
      Virsh now represents lists of domains using an internal structure
      vshDomainList. This structure contains the virDomainPtr list as provided
      by virConnectListAllDomains() and the count of domains in the list.
      
      For backwards compatibility, the function vshDomainListCollect was added
      that tries to enumerate the domains using the new API and if the API is
      not supported falls back to the older approach with the two list
      functions.  The helper function also simulates filtering by all
      currently supported flags added with virConnectListAllDomains().
      
      This patch also cleans up the "list" command handler to use the new
      helpers and adds new command line flags to make use of filtering.
      d62e51f8
  13. 20 6月, 2012 2 次提交
    • E
      snapshot: expose new flags in virsh · 35ae18f3
      Eric Blake 提交于
      Previously, to get the name of all snapshots with children, it was
      necessary to get the name of all snapshots and then remove the
      name of leaf snapshots.  This is racy, and somewhat inefficient
      compared to planned API additions.  We can emulate --no-metadata on
      0.9.5-0.9.12, but for now, there is no emulation of --no-leaves.
      
      * tools/virsh.c (cmdSnapshotList): Add new options --no-leaves and
      --no-metadata.
      (vshSnapshotList): Emulate where possible.
      * tools/virsh.pod (snapshot-list): Document them.
      35ae18f3
    • M
      virsh: fix few typos on desc command · 3dc733bb
      Martin Kletzander 提交于
      virsh help fix:
       - <--title> can also /get/ the title
      
      virsh man page:
       - missing <domain-id>
       - <new_desc> should be <new-desc>
      3dc733bb
  14. 18 6月, 2012 2 次提交
  15. 15 6月, 2012 1 次提交
  16. 14 6月, 2012 1 次提交
    • L
      network: fully support/use VIR_NETWORK_XML_INACTIVE flag · 1f145b2f
      Laine Stump 提交于
      commit 52d064f4 added
      VIR_NETWORK_XML_INACTIVE in order to allow suppressing the
      auto-generated list of VFs in network definitions, and a --inactive
      flag to virsh net-dumpxml to take advantage of the flag. However, it
      missed out on two opportunities:
      
      1) Use INACTIVE to get the current config of the network as it
         exists on disk, rather than the currently active config.
      
      2) Add INACTIVE to the flags used for the virsh net-edit command, so
         that it won't include the forward-pool interfaces that were
         autogenerated, and so that a re-edit of the network prior to
         restarting it will show any other edits made since the last restart
         of the network. (prior to this patch, if you edited a network a 2nd
         time without restarting, all of the previous edits would magically
         disappear).
      
      In order to fit with the new #define-based generic edit function in
      virsh.c, a new function vshNetworkGetXMLDesc() was added. This
      function first tries to call virNetworkGetXMLDesc with the INACTIVE
      flag added, then retries without if the first attempt fails (in the
      manner expected when the server doesn't support it).
      1f145b2f
  17. 12 6月, 2012 1 次提交
    • E
      snapshot: add 'virsh snapshot-info' · 757c4763
      Eric Blake 提交于
      Expose the recent API additions in virsh.  Borrows ideas from 'dominfo'
      for the general type of information to display.
      
      Output looks like:
      
      $ tools/virsh snapshot-info fedora-local tmp
      Name:           tmp
      Domain:         fedora-local
      Current:        no
      State:          disk-snapshot
      Parent:         -
      Children:       1
      Descendants:    2
      Metadata:       yes
      
      possibly with fewer lines when talking to older servers.
      
      * tools/virsh.c (cmdSnapshotInfo): New command.
      * tools/virsh.pod (snapshot-info): Document it.
      757c4763
  18. 23 4月, 2012 1 次提交
    • E
      blockjob: add 'blockcopy' to virsh · 1f06c007
      Eric Blake 提交于
      Rather than further overloading 'blockpull', I decided to create a
      new virsh command to expose the new flags of virDomainBlockRebase.
      
      Blocking until the command completes naturally is pointless, since
      the block copy job is intended to run indefinitely.  Instead, I
      made the command support three --wait modes: by default, it runs until
      mirroring is started; with --pivot, it pivots as soon as mirroring
      is started; and with --finish, it aborts (for a clean copy) as
      soon as mirroring is started.
      
      * tools/virsh.c (VSH_CMD_BLOCK_JOB_COPY): New mode.
      (blockJobImpl): Support new flags.
      (cmdBlockCopy): New command.
      (cmdBlockJob): Support new job info, new abort flag.
      * tools/virsh.pod (blockcopy, blockjob): Document the new command
      and flags.
      1f06c007
  19. 19 4月, 2012 1 次提交
  20. 18 4月, 2012 1 次提交
    • E
      blockjob: add virsh blockpull --wait · 3b96a892
      Eric Blake 提交于
      I'm tired of shell-scripting to wait for completion of a block pull,
      when virsh can be taught to do the same.  I couldn't quite reuse
      vshWatchJob, as this is not a case of a long-running command where
      a second thread must be used to probe job status (at least, not unless
      I make virsh start doing blocking waits for an event to fire), but it
      served as inspiration for my simpler single-threaded loop.  There is
      up to a half-second delay between sending SIGINT and the job being
      aborted, but I didn't think it worth the complexity of a second thread
      and use of poll() just to minimize that delay.
      
      * tools/virsh.c (cmdBlockPull): Add new options to wait for
      completion.
      (blockJobImpl): Add argument.
      (cmdBlockJob): Adjust caller.
      * tools/virsh.pod (blockjob): Document new mode.
      3b96a892
  21. 12 4月, 2012 1 次提交
    • A
      blockjob: add API for async virDomainBlockJobAbort · a696f8b7
      Adam Litke 提交于
      Block job cancellation can take a while.  Now that upstream qemu 1.1
      has asynchronous block cancellation, we want to expose that to the user.
      Therefore, the following updates are made to the virDomainBlockJob API:
      
      A new block job event type VIR_DOMAIN_BLOCK_JOB_CANCELED is managed by
      libvirt.  Regardless of the flags used with virDomainBlockJobAbort, this
      event will be raised: 1. when using synchronous block_job_cancel (the
      event will be synthesized by libvirt), and 2. whenever it is received
      from qemu (via asynchronous block-job-cancel).  Note that the event
      may be detected by libvirt even before the virDomainBlockJobAbort
      completes (always true when it is synthesized, but also possible if
      cancellation was fast).
      
      A new extension flag VIR_DOMAIN_BLOCK_JOB_ABORT_ASYNC is added to the
      virDomainBlockJobAbort API.  When enabled, this function will allow
      (but not require) asynchronous operation (ie, it returns as soon as
      possible, which might be before the job has actually been canceled).
      When the API is used in this mode, it is the responsibility of the
      caller to wait for a VIR_DOMAIN_BLOCK_JOB_CANCELED event or poll via
      the virDomainGetBlockJobInfo API to check the cancellation status.
      
      This patch also exposes the new flag through virsh, and makes virsh
      slightly easier to use (--async implies --abort, and lack of any options
      implies --info), although it leaves the qemu implementation for later
      patches.
      Signed-off-by: NAdam Litke <agl@us.ibm.com>
      Cc: Stefan Hajnoczi <stefanha@gmail.com>
      Signed-off-by: NEric Blake <eblake@redhat.com>
      a696f8b7
  22. 10 4月, 2012 1 次提交
  23. 03 4月, 2012 1 次提交
    • M
      virsh: Clarify escape sequence · 7960ce84
      Michal Privoznik 提交于
      Currently, we put no strains on escape sequence possibly leaving users
      with console that cannot be terminated. However, not all ASCII
      characters can be used as escape sequence. Only those falling in
      @ - _ can be; implement and document this constraint.
      7960ce84
  24. 28 3月, 2012 1 次提交
    • E
      snapshot: fix virsh docs · 3ff4b069
      Eric Blake 提交于
      Commit d42a2ffc forgot to touch up virsh documentation, and commit
      4e9953a4 mis-spelled the option name.
      
      * tools/virsh.pod (snapshot-create, snapshot-create-as): Fix typo
      and match recent change in flag meaning.
      3ff4b069
  25. 24 3月, 2012 1 次提交
    • E
      snapshot: add atomic create flag · 4d5533ca
      Eric Blake 提交于
      Right now, it is appallingly easy to cause qemu disk snapshots
      to alter a domain then fail; for example, by requesting a two-disk
      snapshot where the second disk name resides on read-only storage.
      In this failure scenario, libvirt reports failure, but modifies
      the live domain XML in-place to record that the first disk snapshot
      was taken; and places a difficult burden on the management app
      to grab the XML and reparse it to see which disks, if any, were
      altered by the partial snapshot.
      
      This patch adds a new flag where implementations can request that
      the hypervisor make snapshots atomically; either no changes to
      XML occur, or all disks were altered as a group.  If you request
      the flag, you either get outright failure up front, or you take
      advantage of hypervisor abilities to make an atomic snapshot. Of
      course, drivers should prefer the atomic means even without the
      flag explicitly requested.
      
      There's no way to make snapshots 100% bulletproof - even if the
      hypervisor does it perfectly atomic, we could run out of memory
      during the followup tasks of updating our in-memory XML, and report
      a failure.  However, these sorts of catastrophic failures are rare
      and unlikely, and it is still nicer to know that either all
      snapshots happened or none of them, as that is an easier state to
      recover from.
      
      * include/libvirt/libvirt.h.in
      (VIR_DOMAIN_SNAPSHOT_CREATE_ATOMIC): New flag.
      * src/libvirt.c (virDomainSnapshotCreateXML): Document it.
      * tools/virsh.c (cmdSnapshotCreate, cmdSnapshotCreateAs): Expose it.
      * tools/virsh.pod (snapshot-create, snapshot-create-as): Document
      it.
      4d5533ca
  26. 23 3月, 2012 3 次提交
    • O
      New domain state pmsuspended · 54d9026a
      Osier Yang 提交于
      This introduces a new domain state pmsuspended to represent
      the domain which has been suspended by guest power management,
      e.g. (entered itno s3 state). Because a "running" state could
      be confused in this case, one will see the guest is paused
      actually while playing. And state "paused" is for the domain
      which was paused by virDomainSuspend.
      54d9026a
    • D
      Clarify virsh freecell manpage entry · 350e6c5e
      Dave Allan 提交于
      350e6c5e
    • D
      Clarify what documentation is being referenced · ceb1d36b
      Dave Allan 提交于
      virsh.pod had several instances in which it referred to "the
      documentation" which was a little puzzling to me since it is
      documentation.  Reading the document from end to end makes it clear
      that it means a specific URI which was noted previously in the text,
      but I had never noticed those URIs in several years of referring to
      the man page.  This patch adds those URIs to several additional places
      in the text.
      ceb1d36b
  27. 15 3月, 2012 1 次提交
    • D
      Allow overriding default URI in config file · e457d5ef
      Daniel P. Berrange 提交于
      Currently if the URI passed to virConnectOpen* is NULL, then we
      
       - Look for LIBVIRT_DEFAULT_URI env var
       - Probe for drivers
      
      This changes it so that
      
       - Look for LIBVIRT_DEFAULT_URI env var
       - Look for 'uri_default' in $HOME/.libvirt/libvirt.conf
       - Probe for drivers
      e457d5ef
  28. 09 3月, 2012 1 次提交
    • O
      virsh: Use option alias for outmoded "--persistent" · 1e31b835
      Osier Yang 提交于
      Since VIR_DOMAIN_AFFECT_{LIVE,CONFIG,CURRENT} was created,
      all new virsh commands use "--config" to represents the
      persistent changing. This patch add "--config" option
      for the old commands which still use "--persistent",
      and "--persistent" is now alias of "--config".
      
      tools/virsh.c: (use "--config", and "--persistent" is
          alias of "--config" now).
          cmdDomIfSetLink, cmdDomIfGetLink, cmdAttachDevice,
          cmdDetachDevice, cmdUpdateDevice, cmdAttachInterface,
          cmdDetachInterface, cmdAttachDisk, cmdDetachDisk
      
      toos/virsh.pod: Update docs of the changed commands, and
          add some missed docs for "--config" (detach-interface,
          detach-disk, and detach-device).
      1e31b835
  29. 08 3月, 2012 5 次提交
    • E
      virsh: improve memory unit parsing · 210ed0e8
      Eric Blake 提交于
      The last vestige of the inaccurate 'kilobytes' when we meant 1024 is
      now gone.  And virsh is now useful for setting memory in units other
      than KiB.
      
      * tools/virsh.c (cmdSetmem, cmdSetmaxmem): Use new helper routine,
      allow passing bogus arguments on to hypervisor to test driver
      sanity checking, and fix leak on parse error.
      (vshMemtuneGetSize): New helper.
      (cmdMemtune): Use it.
      * tools/virsh.pod (setmem, setmaxmem, memtune): Document this.
      210ed0e8
    • E
      virsh: improve storage unit parsing · ab95da40
      Eric Blake 提交于
      Now can now do:
      
      virsh vol-resize $vol 10M
      virsh blockresize $dom $vol 10M
      
      to get both interfaces to resize to 10MiB.  The remaining wart
      is that vol-resize defaults to bytes, but blockresize defaults
      to KiB, but we can't break existing scripts; oh well, it's no
      worse than the same wart of the underlying virDomainBlockResize.
      
      The API for virStorageVolResize states that capacity must always
      be positive, and that the presence of shrink and delta flags is
      what implies a negative change.
      
      * tools/virsh.c (vshCommandOptScaledInt): New function.
      (cmdVolResize): Don't pass negative size.
      (cmdVolSize): Rename...
      (vshVolSize): ...and use new helper routine.
      (cmdBlockResize): Use new helper routine, and support new bytes
      flag.
      * tools/virsh.pod (NOTES): Document suffixes.
      (blockresize, vol-create-as, vol-resize): Point to notes.
      ab95da40
    • E
      virsh: add command aliases, and rename nodedev-detach · af3f9aab
      Eric Blake 提交于
      Just because our public API has a typo doesn't mean that virsh
      has to keep the typo.
      
      * tools/virsh.c (VSH_CMD_FLAG_ALIAS): New flag.
      (nodedevCmds): Use it.
      (cmdHelp): Omit alias commands.
      (cmdNodeDeviceDettach): Rename...
      (cmdNodeDeviceDetach): ...to this.
      * tools/virsh.pod (nodedev-detach): Document it.
      af3f9aab
    • E
      virsh: use option aliases · 3d150d32
      Eric Blake 提交于
      Command line interfaces should use dash, not underscore, as many
      keyboard layouts allow that to be typed with fewer shift key presses.
      
      Also, the US spelling of --tunneled gets more google hits than the
      UK spelling of --tunnelled.
      
      * tools/virsh.c (opts_migrate): Allow US variant.
      (opts_blkdeviotune): Prefer - over _.
      * tools/virsh.pod (blkdeviotune): Fix spelling.
      3d150d32
    • E
      virsh: add option aliases · 1c56b9fe
      Eric Blake 提交于
      In the past, we have created some virsh options with less-than-stellar
      names.  For back-compat reasons, those names must continue to parse,
      but we don't want to document them in help output.  This introduces
      a new option type, an alias, which points to a canonical option name
      later in the option list.
      
      I'm actually quite impressed that our code has already been factored
      to do all option parsing through common entry points, such that I
      got this added in relatively few lines of code!
      
      * tools/virsh.c (VSH_OT_ALIAS): New option type.
      (opts_echo): Hook up an alias, for easy testing.
      (vshCmddefOptParse, vshCmddefHelp, vshCmddefGetOption): Allow for
      aliases.
      * tools/virsh.pod (NOTES): Document promise of back-compat.
      * tests/virshtest.c (mymain): Test new feature.
      1c56b9fe