1. 14 7月, 2014 1 次提交
  2. 09 7月, 2014 1 次提交
  3. 08 7月, 2014 2 次提交
  4. 03 7月, 2014 1 次提交
  5. 02 7月, 2014 1 次提交
  6. 26 6月, 2014 1 次提交
  7. 24 6月, 2014 1 次提交
    • N
      net-dhcp-leases: Add virsh support · 59cac9a9
      Nehal J Wani 提交于
      Use virNetworkGetDHCPLeases and virNetworkGetDHCPLeasesForMAC in virsh.
      
      The new feature supports the follwing methods:
      
      1. Retrieve leases info for a given virtual network
      
      2. Retrieve leases info for given network interface
      
      tools/virsh-domain-monitor.c
         * Introduce new command : net-dhcp-leases
           Example Usage: net-dhcp-leases <network> [mac]
      
         virsh # net-dhcp-leases --network default6
         Expiry Time          MAC address        Protocol  IP address                Hostname        Client ID or DUID
         -------------------------------------------------------------------------------------------------------------------
         2014-06-16 03:40:14  52:54:00:85:90:e2  ipv4      192.168.150.231/24        fedora20-test   01:52:54:00:85:90:e2
         2014-06-16 03:40:17  52:54:00:85:90:e2  ipv6      2001:db8:ca2:2:1::c0/64   fedora20-test   00:04:b1:d8:86:42:e1:6a:aa:cf:d5:86:94:23:6f:94:04:cd
         2014-06-16 03:34:42  52:54:00:e8:73:eb  ipv4      192.168.150.181/24        ubuntu14-vm     -
         2014-06-16 03:34:46  52:54:00:e8:73:eb  ipv6      2001:db8:ca2:2:1::5b/64   -               00:01:00:01:1b:30:c6:aa:52:54:00:e8:73:eb
      
      tools/virsh.pod
         * Document new command
      
      src/internal.h
         * Introduce new macro: EMPTYSTR
      59cac9a9
  8. 19 6月, 2014 2 次提交
    • M
      virsh: Expose virNodeGetFreePages · 9e3efe53
      Michal Privoznik 提交于
      The new API is exposed under 'freepages' command.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      9e3efe53
    • E
      virsh: expose new active commit controls · f182da20
      Eric Blake 提交于
      Add knobs to virsh to manage a 2-phase active commit of the top
      layer, similar to knobs already present on blockcopy.  While this
      code will fail until later patches actually implement the new
      knobs in the qemu driver, doing it now proves that the API is
      usable and also makes it easier for testing the qemu changes as
      they are made.
      
      * tools/virsh-domain.c (cmdBlockCommit): Add --active, --pivot,
      and --keep-overlay options, modeled after blockcopy.
      (blockJobImpl): Support --active flag.
      * tools/virsh.pod (blockcommit): Document new flags.
      (blockjob): Mention 2-phase commit interaction.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      f182da20
  9. 18 6月, 2014 2 次提交
  10. 13 6月, 2014 1 次提交
    • E
      virsh: improve blockcopy UI · 17840379
      Eric Blake 提交于
      Peter's review of an early version of my addition of active block
      commit pointed out some issues that I was copying from the block
      copy code; fix them up now before perpetuating them.
      
      For virsh commands that manage a single API call, it's nice to have
      a 1:1 mapping of options to flags, so that we can test that
      lower-layer software handles flag combinations correctly.  But where
      virsh is introducing syntactic sugar to combine multiple API calls
      into a single user interface, we might as well make that interface
      compact.  That is, we should allow the shorter command-line of
      'blockcopy $dom $disk --pivot' without having to explicitly specify
      --wait, because this isn't directly a flag passed to a single
      underlying API call.
      
      Also, my use of embedded ?: ternaries bordered on unreadable.
      
      * tools/virsh-domain.c (cmdBlockCopy): Make --pivot, --finish,
      and --timeout imply --wait. Drop excess ?: operators.
      * tools/virsh.pod (blockcopy): Update documentation.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      17840379
  11. 11 6月, 2014 1 次提交
  12. 06 6月, 2014 1 次提交
  13. 29 5月, 2014 1 次提交
  14. 15 5月, 2014 1 次提交
  15. 13 5月, 2014 1 次提交
  16. 06 5月, 2014 1 次提交
  17. 23 4月, 2014 1 次提交
  18. 22 4月, 2014 1 次提交
  19. 02 4月, 2014 1 次提交
  20. 31 3月, 2014 1 次提交
  21. 25 3月, 2014 1 次提交
  22. 21 3月, 2014 2 次提交
    • E
      qemu: allow filtering events by regex · 43b17dd4
      Eric Blake 提交于
      When listening for a subset of monitor events, it can be tedious
      to register for each event name in series; nicer is to register
      for multiple events in one go.  Implement a flag to use regex
      interpretation of the event filter.
      
      While at it, prove how much I hate the shift key, by adding a
      way to filter for 'shutdown' instead of 'SHUTDOWN'. :)
      
      * include/libvirt/libvirt-qemu.h
      (virConnectDomainQemuMonitorEventRegisterFlags): New enum.
      * src/libvirt-qemu.c (virConnectDomainQemuMonitorEventRegister):
      Document flags.
      * tools/virsh-domain.c (cmdQemuMonitorEvent): Expose them.
      * tools/virsh.pod (qemu-monitor-event): Document this.
      * src/conf/domain_event.c
      (virDomainQemuMonitorEventStateRegisterID): Add flags.
      (virDomainQemuMonitorEventFilter): Handle regex, and optimize
      client side.
      (virDomainQemuMonitorEventCleanup): Clean up regex.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      43b17dd4
    • E
      qemu: virsh wrapper for qemu events · 88996de1
      Eric Blake 提交于
      Any new API deserves a good virsh wrapper :)
      
          qemu-monitor-event [<domain>] [<event>] [--pretty] [--loop] [--timeout <number>]
      
      Very similar to the previous work on 'virsh event'.  For an
      example session:
      
      $ virsh -c qemu:///system qemu-monitor-event --event SHUTDOWN&
      $ virsh -c qemu:///system start f18-live
      Domain f18-live started
      
      $ virsh -c qemu:///system destroy f18-live
      Domain f18-live destroyed
      
      event SHUTDOWN at 1391212552.026544 for domain f18-live: (null)
      events received: 1
      
      [1]+  Done                    virsh -c qemu:///system qemu-monitor-event --event SHUTDOWN
      $
      
      * tools/virsh-domain.c (cmdQemuMonitorEvent): New command.
      * tools/virsh.pod (qemu-monitor-event): Document it.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      88996de1
  23. 19 3月, 2014 1 次提交
  24. 18 3月, 2014 2 次提交
    • M
      qemuDomainSetInterfaceParameters: Allow bandwidth clear out · 14973382
      Michal Privoznik 提交于
      We allow translation from no_bandwidth to has_bandwidth for a vnic.
      However, going in the opposite direction is not implemented. It's not
      limitation of the API rather than internal implementation. The problem
      is, we correctly detect that user hasn't specified any outbound (say
      he wants to clear out outbound). However, this gets overwritten by
      current vnic outbound settings. Then, virNetDevBandwidthSet doesn't
      change anything. We need to stop overwriting the outbound if users
      don't want us to. Same applies for inbound.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      14973382
    • M
      virsh: Add keepalive in new vshConnect function · 676cb4f4
      Martin Kletzander 提交于
      Introducing keepalive similarly to Guannan around 2 years ago.  Since
      we want to introduce keepalive for every connection, it makes sense to
      wrap the connecting function into new virsh one that can deal
      keepalive as well.
      
      Function vshConnect() is now used for connecting and keepalive added
      in that function (if possible) helps preventing long waits e.g. while
      nework goes down during migration.
      
      This patch also adds the options for keepalive tuning into virsh and
      fails connecting only when keepalives are explicitly requested and
      cannot be set (whether it is due to missing support in connected
      driver or remote server).  If not explicitely requested, a debug
      message is printed (hence the addition to virsh-optparse test).
      
      Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1073506
      Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=822839Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
      676cb4f4
  25. 10 3月, 2014 1 次提交
  26. 04 3月, 2014 1 次提交
    • E
      virsh: report exit status of failed lxc-enter-namespace · 2ebf593a
      Eric Blake 提交于
      'virsh lxc-enter-namespace' does not have a way to reflect exit
      status to the caller in single-command mode, but we might as well
      at least report the exit status.  Prior to this patch,
      
      $ virsh -c lxc:/// lxc-enter-namespace shell /bin/sh 'exit 3'; echo $?
      1
      
      now it gives some details:
      
      $ virsh -c lxc:/// lxc-enter-namespace shell /bin/sh -c 'exit 3'; echo $?
      error: internal error: Child process (31557) unexpected exit status 3
      1
      
      Also useful:
      
      $ virsh -c lxc:/// lxc-enter-namespace shell /bin/sh -c 'kill $$'; echo $?
      error: internal error: Child process (31585) unexpected fatal signal 15
      1
      
      * tools/virsh-domain.c (cmdLxcEnterNamespace): Avoid magic numbers.
      Dispatch any error.
      * tools/virsh.pod: Document that non-zero exit status is collapsed.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      2ebf593a
  27. 01 3月, 2014 1 次提交
    • E
      virsh: add --all flag to 'event' command · 0e16ae40
      Eric Blake 提交于
      Similar to our event-test demo program, it's nice to be able to
      have a mode where we can sniff all events at once, rather than
      having to spawn multiple virsh in parallel with one for each
      event type.
      
      (Can I just say our RegisterAny design is lousy?  The fact that
      the majority of our callback pointers have a function signature
      with the opaque data in a different position, and that we have
      to cast the function signature before registering it, makes it
      hard to write a generic callback function; we have to write one
      for every type of event id.  Life would have been easier if we
      had designed the callback as a fixed signature with a void*
      and size parameter, and then allowed the caller to downcast
      the void* to a particular struct for data specific to their
      callback id, where we could have then had a single function
      with a switch statement for each event id, and register that
      one function for all types of events.  It would also be nicer
      if the callback functions knew which callbackID was being used
      when invoking that callback, so that I could use a common data
      structure among all registrations instead of having to create
      an array of one data per callback.  But I really don't want to
      go add yet another event API design.)
      
      * tools/virsh-domain.c (cmdEvent): Add --all parameter; convert
      all callbacks to support shared counter.
      * tools/virsh.pod (event): Document it.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      0e16ae40
  28. 21 2月, 2014 3 次提交
    • E
      virsh: add net-event command · de87691f
      Eric Blake 提交于
      Add 'virsh net-event --list' and 'virsh net-event [net] --event=name
      [--loop] [--timeout]'.  Very similar to 'virsh event'.
      
      * tools/virsh.pod (net-event): Document new command.
      * tools/virsh-network.c (vshNetworkEventToString, vshNetEventData)
      (vshEventLifecyclePrint, cmdNetworkEvent): New struct and
      functions.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      de87691f
    • E
      virsh: add event command, for lifecycle events · 99fa96c3
      Eric Blake 提交于
      Add 'virsh event --list' and 'virsh event [dom] --event=name
      [--loop] [--timeout]'.  Borrows somewhat from event-test.c,
      but defaults to a one-shot notification, and takes advantage
      of the event loop integration to allow Ctrl-C to interrupt the
      wait for an event.  For now, this just does lifecycle events.
      
      * tools/virsh.pod (event): Document new command.
      * tools/virsh-domain.c (vshDomainEventToString)
      (vshDomainEventDetailToString, vshDomEventData)
      (vshEventLifecyclePrint, cmdEvent): New struct and functions.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      99fa96c3
    • J
      bandwidth: Adjust documentation · 7eb37a0d
      John Ferlan 提交于
      Recent autotest/virt-test testing on f20 discovered an anomaly in how
      the bandwidth options are documented and used. This was discovered due
      to a bug fix in the /sbin/tc utility found in iproute-3.11.0.1 (on f20)
      in which overflow was actually caught and returned as an error. The fix
      was first introduced in iproute-3.10 (search on iproute2 commit 'a303853e').
      
      The autotest/virt-test test for virsh domiftune was attempting to send
      the largest unsigned integer value (4294967295) for maximum value
      testing. The libvirt xml implementation was designed to manage values
      in kilobytes thus when this value was passed to /sbin/tc, it (now)
      properly rejected the 4294967295kbps value.
      
      Investigation of the problem discovered that formatdomain.html.in and
      formatnetwork.html.in described the elements and property types slightly
      differently, although they use the same code - virNetDevBandwidthParseRate()
      (shared by portgroups, domains, and networks xml parsers). Rather than
      have the descriptions in two places, this patch will combine and reword
      the description under formatnetwork.html.in and have formatdomain.html.in
      link to that description.
      
      This documentation faux pas was continued into the virsh man page where
      the bandwidth description for both 'attach-interface' and 'domiftune'
      did not indicate the format of each value, thus leading to the test using
      largest unsigned integer value assuming "bps" rather than "kbps", which
      ultimately was wrong.
      7eb37a0d
  29. 20 2月, 2014 1 次提交
  30. 04 2月, 2014 1 次提交
  31. 23 1月, 2014 1 次提交
    • O
      storage: Add document for possible problem on volume detection · 6b29eb84
      Osier Yang 提交于
      For pool which relies on remote resources, such as a "iscsi" type
      pool, since how long it takes to export the corresponding devices
      to host's sysfs is really depended, it could depend on the network
      connection, it also could depend on the host's udev procedures. So
      it's likely that the volumes are not able to be detected during pool
      starting process, polling the sysfs doesn't work, since we don't
      know how much time is best for the polling, and even worse, the
      volumes could still be not detected or partly not detected even after
      the polling.  So we end up with a documentation to prompt the fact,
      in virsh manual.
      
      And as a small improvement, let's explicitly say no LUNs found in
      the debug log in that case.
      6b29eb84
  32. 22 1月, 2014 2 次提交
    • O
      Doc: Add "note" for node-memory-tune · deb924dd
      Osier Yang 提交于
      To let the user know the command onlys work for KSM under Linux.
      deb924dd
    • O
      Doc: Improve the document for nodesuspend · 39a0e328
      Osier Yang 提交于
      Explicitly lists the possible values for "--target" option;
      Gets rid of the confused strings like "Suspend-to-RAM";
      Emphasises the node *has to* be suspended in the time duration
      specified by "--duration". And rewords the entire document a
      bit according to the API's implementation and document.
      39a0e328