1. 22 10月, 2012 1 次提交
  2. 15 10月, 2012 1 次提交
    • O
      node_memory: Add new parameter field to tune the new sysfs knob · f81f0f2f
      Osier Yang 提交于
      Upstream kernel introduced new sysfs knob "merge_across_nodes" to
      specify if pages from different numa nodes can be merged. When set
      to 0, only pages which physically reside in the memory area of
      same NUMA node can be merged. When set to 1, pages from all nodes
      can be merged.
      
      This patch supports the tuning by adding new param field
      "shm_merge_across_nodes".
      f81f0f2f
  3. 12 10月, 2012 1 次提交
  4. 11 10月, 2012 1 次提交
    • J
      Add MIGRATABLE flag for virDomainGetXMLDesc · 28f8dfdc
      Jiri Denemark 提交于
      Using VIR_DOMAIN_XML_MIGRATABLE flag, one can request domain's XML
      configuration that is suitable for migration or save/restore. Such XML
      may contain extra run-time stuff internal to libvirt and some default
      configuration may be removed for better compatibility of the XML with
      older libvirt releases.
      
      This flag may serve as an easy way to get the XML that can be passed
      (after desired modifications) to APIs that accept custom XMLs, such as
      virDomainMigrate{,ToURI}2 or virDomainSaveFlags.
      28f8dfdc
  5. 09 10月, 2012 1 次提交
    • E
      virsh: add qemu-monitor-command --pretty · 2a1aaa60
      Eric Blake 提交于
      I was using qemu-monitor-command during development, and found it quite
      hard to use.  Compare the results of this patch on ease of reading:
      
      $ virsh qemu-monitor-command          dom '{"execute":"query-version"}'
      {"return":{"qemu":{"micro":1,"minor":12,"major":0},"package":"(qemu-kvm-0.12.1.2)"},"id":"libvirt-7683"}
      
      $ virsh qemu-monitor-command --pretty dom '{"execute":"query-version"}'
      {
          "return": {
              "qemu": {
                  "micro": 1,
                  "minor": 12,
                  "major": 0
              },
              "package": "(qemu-kvm-0.12.1.2)"
          },
          "id": "libvirt-7674"
      }
      
      * tools/virsh-host.c (cmdQemuMonitorCommand): New option.
      * tools/virsh.pod (qemu-monitor-command): Document it.
      2a1aaa60
  6. 02 10月, 2012 1 次提交
  7. 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
  8. 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
  9. 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
  10. 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
  11. 07 9月, 2012 1 次提交
  12. 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
  13. 05 9月, 2012 1 次提交
  14. 31 8月, 2012 1 次提交
  15. 23 8月, 2012 1 次提交
  16. 22 8月, 2012 3 次提交
  17. 26 7月, 2012 2 次提交
  18. 25 7月, 2012 1 次提交
  19. 21 7月, 2012 1 次提交
  20. 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
  21. 10 7月, 2012 1 次提交
  22. 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
  23. 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
  24. 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
  25. 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
  26. 18 6月, 2012 2 次提交
  27. 15 6月, 2012 1 次提交
  28. 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
  29. 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
  30. 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
  31. 19 4月, 2012 1 次提交