1. 16 3月, 2011 1 次提交
    • E
      virsh: allow empty string arguments · 6eaa4ee4
      Eric Blake 提交于
      "virsh connect ''" should try to connect to the default connection,
      but the previous patch made it issue a warning about an invalid URI.
      
      * tools/virsh.c (VSH_OFLAG_EMPTY_OK): New option flag.
      (vshCommandOptString): Per the declaration, value is required to
      be non-NULL.  Honor new flag.
      (opts_connect): Allow empty string connection.
      6eaa4ee4
  2. 15 3月, 2011 2 次提交
  3. 14 3月, 2011 3 次提交
  4. 12 3月, 2011 1 次提交
  5. 11 3月, 2011 2 次提交
  6. 09 3月, 2011 3 次提交
  7. 07 3月, 2011 3 次提交
    • D
      Expose event loop implementation as a public API · 2ed6cc7b
      Daniel P. Berrange 提交于
      Not all applications have an existing event loop they need
      to integrate with. Forcing them to implement the libvirt
      event loop integration APIs is an undue burden. This just
      exposes our simple poll() based implementation for apps
      to use. So instead of calling
      
         virEventRegister(....callbacks...)
      
      The app would call
      
         virEventRegisterDefaultImpl()
      
      And then have a thread somewhere calling
      
          static bool quit = false;
          ....
          while (!quit)
            virEventRunDefaultImpl()
      
      * daemon/libvirtd.c, tools/console.c,
        tools/virsh.c: Convert to public event loop APIs
      * include/libvirt/libvirt.h.in, src/libvirt_private.syms: Add
        virEventRegisterDefaultImpl and virEventRunDefaultImpl
      * src/util/event.c: Implement virEventRegisterDefaultImpl
        and virEventRunDefaultImpl using poll() event loop
      * src/util/event_poll.c: Add full error reporting
      * src/util/virterror.c, include/libvirt/virterror.h: Add
        VIR_FROM_EVENTS
      2ed6cc7b
    • D
      Move event code out of the daemon/ into src/util/ · 343eaa15
      Daniel P. Berrange 提交于
      The event loop implementation is used by more than just the
      daemon, so move it into the shared area.
      
      * daemon/event.c, src/util/event_poll.c: Renamed
      * daemon/event.h, src/util/event_poll.h: Renamed
      * tools/Makefile.am, tools/console.c, tools/virsh.c: Update
        to use new virEventPoll APIs
      * daemon/mdns.c, daemon/mdns.c, daemon/Makefile.am: Update
        to use new virEventPoll APIs
      343eaa15
    • D
      Convert daemon/virsh over to use primary event APIs, rather than impl · 5d2c045c
      Daniel P. Berrange 提交于
      The daemon code calls virEventAddHandleImpl directly instead
      of calling the wrapper virEventAddHandle.
      
      * tools/console.c, daemon/libvirtd.c, daemon/mdns.c: Convert to
        use primary event APIs
      5d2c045c
  8. 05 3月, 2011 1 次提交
  9. 24 2月, 2011 1 次提交
  10. 23 2月, 2011 1 次提交
    • D
      Fix discard of expected errors · 449b4c87
      Daniel P. Berrange 提交于
      In a couple of commands virsh catches & ignores errors, but fails
      to reset last_error. Thus the error is ignored, but still reported
      to the user.
      
      * tools/virsh.c: Reset last_error if ignoring an error
      449b4c87
  11. 22 2月, 2011 4 次提交
    • O
      virsh: replace vshPrint with vshPrintExtra for snapshot list · 8fcc76a6
      Osier Yang 提交于
      Otherwise extra information will be printed even if "--quiet"
      is specified.
      
      * tools/virsh.c
      8fcc76a6
    • D
      virt-*-validate.in: quote all variable references · b3ff07a0
      Dan Kenigsberg 提交于
      Alas, the shell is not a real programming language.
      
      Patch generated by manual confirmation of vim's
      s/[^"]\@<=\$\S\+\s\@=/"&"/gc
      and
      s/\(echo \)\@<=[^"].*\$.*$/"&"/c matches.
      
      This patch generate a lot of noise and carries little benefits, as
      I do not really expect $PKI to contain spaces or backticks. I'm just
      fuming, and would not really mind if this patch is ignored
      b3ff07a0
    • D
      virt-pki-validate: behave when CERTTOOL is missing · 9b479159
      Dan Kenigsberg 提交于
      9b479159
    • E
      build: don't require pod2man for tarball builds · 6db98a2d
      Eric Blake 提交于
      Right now, 'man libvirtd' includes information that depends on
      configure results, so it must be generated on the fly and live
      in $(builddir); however, requiring pod2man on all end user
      machines is overkill.  Meanwhile, 'man virsh' doesn't mention
      any configure results, so it can be built at 'make dist' time.
      If that situation changes in the future, we can generate virsh.1
      in the same way that we generate libvirtd.8.
      
      * daemon/Makefile.am (libvirtd.8.in): New rule, to run pod2man in
      advance of distribution.
      (libvirtd.8): Use only sed from tarball.
      (EXTRA_DIST): Ship new file.
      (libvirtd.pod): Delete unused rule.
      (man8_MANS): Let automake know which section to use.
      (CLEANFILES, MAINTAINERCLEANFILES): Adjust to new files.
      * tools/Makefile.am (dist_man1_MANS): Distribute pre-built man
      pages, fine since they don't require any substitution.
      (virt-xml-validate.1, virt-pki-validate.1): Change input source.
      (virsh.1): Build into srcdir.
      (CLEANFILES, MAINTAINERCLEANFILES): Adjust to new build style.
      * daemon/.gitignore: Update.
      Reported by Diego Elio Pettenò.
      6db98a2d
  12. 19 2月, 2011 1 次提交
    • M
      virsh: freecell --all getting wrong NUMA nodes count · 595174ae
      Michal Privoznik 提交于
      Virsh freecell --all was not only getting wrong NUMA nodes count, but
      even the NUMA nodes IDs. They doesn't have to be continuous, as I've
      found out during testing this. Therefore a modification of
      nodeGetCellsFreeMemory() error message.
      595174ae
  13. 16 2月, 2011 1 次提交
  14. 12 2月, 2011 1 次提交
    • E
      virsh: avoid mingw compiler warnings · 92f0ed03
      Eric Blake 提交于
      Compilation on mingw was warning about %lld use in fprintf, and
      in the gnulib strptime module about dead labels.
      
      * tools/virsh.c (vshPrint): Change redirect.
      (vshPrintExtra): Allow use within vshPrint.  Avoid fprintf on
      arbitrary formats, since we aren't using gnulib module; instead,
      use virVasprintf to pre-format.
      (vshError): Likewise.
      * .gnulib: Update to latest, for mingw strptime warning fix.
      Reported by Matthias Bolte.
      92f0ed03
  15. 10 2月, 2011 1 次提交
    • D
      Avoid pthread_sigmask on Win32 platforms · 100f4a63
      Daniel P. Berrange 提交于
      Win32 doesn't have a concept of signal masks so disable that
      code. It is unclear how SIGINT is delivered (if at all) on
      Win32, so this might further work to provide an alternative
      to pthread_sigmask
      
      * tools/virsh.c: Avoid pthread_sigmask on Win32
      100f4a63
  16. 09 2月, 2011 1 次提交
  17. 04 2月, 2011 1 次提交
    • J
      qemu: Add shortcut for HMP pass through · 2169472a
      Jiri Denemark 提交于
      Currently users who want to use virDomainQemuMonitorCommand() API or
      it's virsh equivalent has to use the same protocol as libvirt uses for
      communication to qemu. Since the protocol is QMP with current qemu and
      HMP much more usable for humans, one ends up typing something like the
      following:
      
          virsh qemu-monitor-command DOM \
      '{"execute":"human-monitor-command","arguments":{"command-line":"info kvm"}}'
      
      which is not a very convenient way of debugging qemu.
      
      This patch introduces --hmp option to qemu-monitor-command, which says
      that the provided command is in HMP. If libvirt uses QMP to talk with
      qemu, the command will automatically be converted into QMP. So the
      example above is simplified to just
      
          virsh qemu-monitor-command --hmp DOM "info kvm"
      
      Also the result is converted from
      
          {"return":"kvm support: enabled\r\n"}
      
      to just plain HMP:
      
          kvm support: enabled
      
      If libvirt talks to qemu in HMP, --hmp flag is obviously a noop.
      2169472a
  18. 01 2月, 2011 1 次提交
  19. 30 1月, 2011 1 次提交
    • E
      build: avoid close, system · e67ae619
      Eric Blake 提交于
      * src/fdstream.c (virFDStreamOpenFile, virFDStreamCreateFile):
      Use VIR_FORCE_CLOSE instead of close.
      * tests/commandtest.c (mymain): Likewise.
      * tools/virsh.c (editFile): Use virCommand instead of system.
      * src/util/util.c (__virExec): Special case preservation of std
      file descriptors to child.
      e67ae619
  20. 29 1月, 2011 2 次提交
    • M
      Add VIR_DIV_UP to divide memory or storage request sizes with round up · d9ad8ac3
      Matthias Bolte 提交于
      Use it in all places where a memory or storage request size is converted
      to a larger granularity. This avoids requesting too small memory or storage
      sizes that could result from the truncation done by a simple division.
      
      This extends the round up fix in 6002e040
      to the whole codebase.
      
      Instead of reporting errors for odd values in the VMX code round them up.
      
      Update the QEMU Argv tests accordingly as the original memory size 219200
      isn't a even multiple of 1024 and is rounded up to 215 megabyte now. Change
      it to 219100 and 219136. Use two different values intentionally to make
      sure that rounding up works.
      
      Update virsh.pod accordingly, as rounding down and rejecting are replaced
      by rounding up.
      d9ad8ac3
    • M
      virsh: added --all flag to freecell command · 30e21374
      Michal Privoznik 提交于
      This will iterate over all NUMA nodes, showing
      free memory for each and sum at the end.
      Existing default behavior is not changed.
      30e21374
  21. 28 1月, 2011 4 次提交
    • W
      Force guest suspend at timeout · f15cad29
      Wen Congyang 提交于
      If the memory of guest OS is changed constantly, the live migration
      can not be ended ever for ever.
      
      We can use the command 'virsh migrate-setmaxdowntime' to control the
      live migration. But the value of maxdowntime is diffcult to calculate
      because it depends on the transfer speed of network and constantly
      changing memroy size. We need a easy way to control the live migration.
      
      This patch adds the support of forcing guest to suspend at timeout.
      With this patch, when we migrate the guest OS, we can specify a
      timeout. If the live migration timeouts, auto-suspend the guest OS,
      where the migration will complete offline.
      f15cad29
    • W
      Show migration progress. · d183e9d1
      Wen Congyang 提交于
      Show migration progress if `migrate --verbose'.
      d183e9d1
    • H
      Cancel migration if user presses Ctrl-C when migration is in progress · 8e6d9860
      Hu Tao 提交于
      While migration is in progress and virsh is waiting for its
      completion, user may want to terminate the progress by pressing
      Ctrl-C. But virsh just exits on user's Ctrl-C leaving migration
      in background that user isn't even aware of. It's not reasonable.
      
      This patch changes the behaviour for migration. For other
      commands Ctrl-C still terminates virsh itself.
      8e6d9860
    • J
      4282efcc
  22. 27 1月, 2011 1 次提交
  23. 26 1月, 2011 1 次提交
  24. 19 1月, 2011 1 次提交
    • E
      build: use more gnulib modules for simpler code · c5b11b3c
      Eric Blake 提交于
      * .gnulib: Update to latest, for sigpipe and sigaction modules.
      * bootstrap.conf (gnulib_modules): Add siaction, sigpipe, strerror_r.
      * tools/virsh.c (vshSetupSignals) [!SIGPIPE]: Delete, now that
      gnulib guarantees it.
      (SA_SIGINFO): Define for mingw fallback.
      * src/util/virterror.c (virStrerror): Simplify, now that gnulib
      guarantees the POSIX interface.
      * configure.ac (AC_CHECK_FUNCS_ONCE): Drop redundant check.
      (AM_PROG_CC_STDC): Move earlier, to keep autoconf happy.
      c5b11b3c
  25. 17 1月, 2011 1 次提交
    • E
      build: let xgettext see strings in libvirt-guests · 7f193757
      Eric Blake 提交于
      * tools/libvirt-guests.init.in: Rename...
      * tools/libvirt-guests.init.sh: ...so that xgettext's language
      detection via suffix will work.
      * po/POTFILES.in: Update all references.
      * tools/Makefile.am (EXTRA_DIST, libvirt-guests.init): Likewise.
      7f193757