1. 02 10月, 2012 1 次提交
  2. 21 9月, 2012 1 次提交
    • L
      virsh: new net-update command · fe787282
      Laine Stump 提交于
      This command uses the new virNetworkUpdate() API to modify an existing
      network definition, and optionally have those modifications take
      effect immediately without restarting the network.
      
      An example usage:
      
        virsh net-update mynet add-last ip-dhcp-host \
         "<host mac='00:11:22:33:44:55' ip='192.168.122.45'/>" \
         --live --config
      
      If you like, you can instead put the xml into a file, and call like
      this:
      
        virsh net-update mynet add ip-dhcp-host /tmp/myxml.xml
         --live --config
      
      virsh will autodetect whether the argument is itself an xml element,
      or if it's a file, by looking at the first character - the first
      character of an xml element is always "<", and the first character of
      a file is almost always *not* "<" (in the rare case that it is, the
      user could specify "./<filename...").
      
      A --parent-index option is also available (to give the index within a
      list of parent objects, e.g. the index of the parent <ip> element when
      updating ip-dhcp-host elements), but is optional and at least for now
      will probably be used rarely.
      
      --live, --config, and --current options - if you specify --live, only
      the live state of the network will be updated. If you also specify
      --config, then the persistent configuration will also be updated;
      these two commands can be given separately, or both together. If you
      don't specify either (you can optionally specify "--current" for the
      same effect), then the "current" config will be updated (i.e. if the
      network is active, then only its live config is affected, but if the
      network is inactive, only the persistent config is affected).
      fe787282
  3. 18 9月, 2012 1 次提交
    • E
      blockjob: add virsh blockcommit · ed23b106
      Eric Blake 提交于
      The new command 'virsh blockcommit $dom $disk' requests the start
      of an asynchronous commit operation across the entire chain of
      $disk.  Further arguments can fine-tune which portion of the
      chain is committed.  Existing 'virsh blockjob' commands can then
      track the status, change the bandwidth, or abort the commit job.
      
      With a bit more on the command line, 'virsh blockcommit $dom $disk
      --wait --verbose' can be used for blocking behavior, with visual
      feedback on the overall status, and can be canceled with Ctrl-C.
      
      The overall design, including the wait loop logic, borrows heavily
      from the existing blockpull command.
      
      * tools/virsh-domain.c (cmdBlockCommit): New function.
      * tools/virsh.pod (blockcommit): Document it.
      ed23b106
  4. 17 9月, 2012 4 次提交
    • P
      virsh: Clarify behavior of domain list filtering. · 60b0284f
      Peter Krempa 提交于
      Some combinations of filtering flags produce no result. This patch tries
      to clarify this.
      60b0284f
    • O
      node_memory: Expose the APIs to virsh · 0e96fa54
      Osier Yang 提交于
      New command node-memory-tune to get/set the node memory parameters,
      only two parameters are allowed to set (pages_to_scan, and sleep_millisecs,
      see documents in this patch for more details).
      
      Example of node-memory-tune's output:
      
      Shared memory:
      	pages_to_scan   100
      	sleep_millisecs 20
      	pages_shared    0
      	pages_sharing   0
      	pages_unshared  0
      	pages_volatile  0
      	full_scans      0
      0e96fa54
    • O
      list: Use virConnectListAllSecrets in virsh · d15d092c
      Osier Yang 提交于
      This introduces four new options for secret-list, to filter the
      returned secrets by whether it's ephemeral or not, and/or by
      whether it's private or not.
      
      * tools/virsh-secret.c: (New helper vshSecretSorter,
        vshSecretListFree, and vshCollectSecretList; Use the new
        API for secret-list; error out if flags are specified,
        because there is no way to filter the results when using
        old APIs (no APIs to get the properties (ephemeral, private)
        of a secret yet).
      
      * tools/virsh.pod: Document the 4 new options.
      d15d092c
    • O
      list: Use virConnectListAllNodeDevices in virsh · aa20e975
      Osier Yang 提交于
      tools/virsh-nodedev.c:
        * vshNodeDeviceSorter to sort node devices by name
      
        * vshNodeDeviceListFree to free the node device objects list.
      
        * vshNodeDeviceListCollect to collect the node device objects, trying
          to use new API first, fall back to older APIs if it's not supported.
      
        * Change option --cap to accept multiple capability types.
      
      tools/virsh.pod
        * Update document for --cap
      aa20e975
  5. 11 9月, 2012 1 次提交
    • O
      list: Use virConnectListAllNetworks in virsh · 895913dd
      Osier Yang 提交于
      tools/virsh-network.c:
        * vshNetworkSorter to sort networks by name
      
        * vshNetworkListFree to free the network objects list.
      
        * vshNetworkListCollect to collect the network objects, trying
          to use new API first, fall back to older APIs if it's not supported.
      
        * New options --persistent, --transient, --autostart, --no-autostart,
          for net-list, and new field 'Persistent' for its output.
      
      tools/virsh.pod:
        * Add documents for the new options.
      895913dd
  6. 07 9月, 2012 1 次提交
  7. 06 9月, 2012 2 次提交
    • O
      list: Use virConnectListAllStoragePools in virsh · 93a346d3
      Osier Yang 提交于
      tools/virsh-pool.c:
        * vshStoragePoolSorter to sort the pool list by pool name.
      
        * struct vshStoragePoolList to present the pool list, pool info
          is collected by list->poolinfo if 'details' is specified by
          user.
      
        * vshStoragePoolListFree to free the pool list
      
        * vshStoragePoolListCollect to collect the pool list, new API
          virStorageListAllPools is tried first, if it's not supported,
          fall back to older APIs.
      
        * New options --persistent, --transient, --autostart, --no-autostart
          and --type for pool-list. --persistent or --transient is to filter
          the returned pool list by whether the pool is persistent or not.
          --autostart or --no-autostart is to filter the returned pool list
          by whether the pool is autostarting or not. --type is to filter
          the pools by pool types. E.g.
      
          % virsh pool-list --all --persistent --type dir,disk
      
      tools/virsh.pod:
         * Add documentations for the new options.
      93a346d3
    • O
      virsh: Fix the wrong doc for pool-list · 974a6330
      Osier Yang 提交于
      The storage pool's management doesn't relate with a domain, it
      probably was an intention, but not achieved yet. And the fact
      is only active pools are listed by default.
      974a6330
  8. 05 9月, 2012 1 次提交
  9. 31 8月, 2012 1 次提交
  10. 23 8月, 2012 1 次提交
  11. 22 8月, 2012 3 次提交
  12. 26 7月, 2012 2 次提交
  13. 25 7月, 2012 1 次提交
  14. 21 7月, 2012 1 次提交
  15. 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
  16. 10 7月, 2012 1 次提交
  17. 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
  18. 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
  19. 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
  20. 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
  21. 18 6月, 2012 2 次提交
  22. 15 6月, 2012 1 次提交
  23. 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
  24. 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
  25. 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
  26. 19 4月, 2012 1 次提交
  27. 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
  28. 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
  29. 10 4月, 2012 1 次提交
  30. 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
  31. 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