1. 07 3月, 2011 1 次提交
    • 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
  2. 05 3月, 2011 1 次提交
  3. 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
  4. 22 2月, 2011 1 次提交
  5. 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
  6. 16 2月, 2011 1 次提交
  7. 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
  8. 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
  9. 09 2月, 2011 1 次提交
  10. 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
  11. 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
  12. 29 1月, 2011 1 次提交
  13. 28 1月, 2011 3 次提交
    • 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
  14. 26 1月, 2011 1 次提交
  15. 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
  16. 16 1月, 2011 1 次提交
  17. 15 1月, 2011 1 次提交
  18. 14 1月, 2011 1 次提交
  19. 13 1月, 2011 1 次提交
  20. 23 12月, 2010 1 次提交
  21. 22 12月, 2010 1 次提交
  22. 08 12月, 2010 2 次提交
  23. 07 12月, 2010 1 次提交
  24. 03 12月, 2010 3 次提交
  25. 02 12月, 2010 2 次提交
    • O
      virsh: Remove using phy as default disk driver in cmdAttachDisk · 84f7b286
      Osier Yang 提交于
      * tools/virsh.c (virsh shouldn't use 'phy' as the disk driver if
      user doesn't specify "--driver", it causes bugs, as not all of
      hypervisor driver supports 'phy', and actually hypervisor should
      known the correct default disk driver and subdriver, so remove it)
      84f7b286
    • O
      virsh: update help for "virsh help help" · 33e38e77
      Osier Yang 提交于
      As virsh help supports both command and command group now,
      update "cmdHelp" to print consite help, (this patch is
      increment of "78290527").
      
      And also remove redundant empty line in "vshUsage".
      
      * tools/virsh.c
      33e38e77
  26. 01 12月, 2010 2 次提交
    • J
      virsh: remove a badly placed line break in virsh -h output · 270b0b5f
      Justin Clift 提交于
      The output was previously:
      
          -c | --connect <uri>    hypervisor connection URI
          -r | --readonly         connect readonly
          -d | --debug <num>      debug level [0-5]
          -h | --help             this help
          -q | --quiet            quiet mode
          -t | --timing           print timing information
          -l | --log <file>       output logging to file
          -v | --version[=short]  program version
      
          -V | --version=long     version and full options
      
      (note the blank line between the --version types)
      
      This patch removes the extra blank line.
      270b0b5f
    • O
      virsh: Categorize commands into groups for virsh help · 78290527
      Osier Yang 提交于
      Change the virsh help out. The new output of "virsh help" and
      "virsh --help" will be like:
      
       Secret (help keyword 'secret'):
          secret-define                  define or modify a secret from an XML file
          secret-dumpxml                 secret attributes in XML
          secret-set-value               set a secret value
          secret-get-value               Output a secret value
          secret-undefine                undefine a secret
          secret-list                    list secrets
      
       Snapshot (help keyword 'snapshot'):
          snapshot-create                Create a snapshot
          snapshot-current               Get the current snapshot
          snapshot-delete                Delete a domain snapshot
          snapshot-dumpxml               Dump XML for a domain snapshot
          snapshot-list                  List snapshots for a domain
          snapshot-revert                Revert a domain to a snapshot
      
      Also support output help information of specified command group, e.g.
      
      % ./tools/virsh help "Network Filter"
       Network Filter (help keyword 'filter'):
          nwfilter-define                define or update a network filter from an XML file
          nwfilter-undefine              undefine a network filter
          nwfilter-dumpxml               network filter information in XML
          nwfilter-list                  list network filters
          nwfilter-edit                  edit XML configuration for a network filter
      
      Each group has a help keyword, e.g.
      
      % ./tools/virsh help filter
       Network Filter (help keyword 'filter'):
          nwfilter-define                define or update a network filter from an XML file
          nwfilter-undefine              undefine a network filter
          nwfilter-dumpxml               network filter information in XML
          nwfilter-list                  list network filters
          nwfilter-edit                  edit XML configuration for a network filter
      
      * tools/virsh.c:
        - introduce new struct "vshCmdGrp" and macros to define the groups.
        - split previous array "commands" into small arrays which are orgnized
          by group
        - changed some functions, e.g. "vshCmdDefSearch"
        - Added new functions, e.g. "vshCmdGrpSearch"
        - commands of each group are in "alphabetical order" now.
        - command groups are in "alphabetical order" now.
        - the commands are categorized with reference of
          http://wiki.libvirt.org/page/VirshHelpV2 (by Justin)
        - the modifications doesn't affect tests
      
      * TODO:
        - doc
      78290527
  27. 25 11月, 2010 1 次提交
    • E
      maint: prohibit most uses of xmlGetProp · 416c09bc
      Eric Blake 提交于
      Making this change makes it easier to spot the memory leaks
      that will be fixed in the next patch.
      
      * cfg.mk (sc_prohibit_xmlGetProp): New rule.
      * .x-sc_prohibit_xmlGetProp: New exception.
      * Makefile.am (EXTRA_DIST): Ship exception file.
      * tools/virsh.c (cmdDetachInterface, cmdDetachDisk): Adjust
      offenders.
      * src/conf/storage_conf.c (virStoragePoolDefParseSource):
      Likewise.
      * src/conf/network_conf.c (virNetworkDHCPRangeDefParseXML)
      (virNetworkIPParseXML): Likewise.
      416c09bc
  28. 23 11月, 2010 4 次提交
  29. 18 11月, 2010 2 次提交
    • E
      maint: avoid remaining sprintf uses · e8aba782
      Eric Blake 提交于
      * cfg.mk (sc_prohibit_sprintf): New rule.
      (sc_prohibit_asprintf): Avoid false positives.
      * docs/hacking.html.in (Printf-style functions): Document the
      policy.
      * HACKING: Regenerate.
      * .x-sc_prohibit_sprintf: New exemptions.
      * Makefile.am (syntax_check_exceptions): Ship new file.
      * src/vbox/vbox_tmpl.c (vboxStartMachine, vboxAttachUSB): Use
      virAsprintf instead.
      * src/uml/uml_driver.c (umlOpenMonitor): Use snprintf instead.
      * tools/virsh.c (cmdDetachInterface): Likewise.
      * src/security/security_selinux.c (SELinuxGenSecurityLabel):
      Likewise.
      * src/openvz/openvz_driver.c (openvzDomainDefineCmd): Likewise,
      and ensure large enough buffer.
      e8aba782
    • E
      maint: improve i18n on non-Linux · 981d2cda
      Eric Blake 提交于
      Per the gettext developer:
      http://lists.gnu.org/archive/html/bug-gnu-utils/2010-10/msg00019.html
      http://lists.gnu.org/archive/html/bug-gnu-utils/2010-10/msg00021.html
      
      gettext() doesn't work correctly on all platforms unless you have
      called setlocale().  Furthermore, gnulib's gettext.h has provisions
      for setting up a default locale, which is the preferred method for
      libraries to use gettext without having to call textdomain() and
      override the main program's default domain (virInitialize already
      calls bindtextdomain(), but this is insufficient without the
      setlocale() added in this patch; and a redundant bindtextdomain()
      in this patch doesn't hurt, but serves as a good example for other
      packages that need to bind a second translation domain).
      
      This patch is needed to silence a new gnulib 'make syntax-check'
      rule in the next patch.
      
      * daemon/libvirtd.c (main): Setup locale and gettext.
      * src/lxc/lxc_controller.c (main): Likewise.
      * src/security/virt-aa-helper.c (main): Likewise.
      * src/storage/parthelper.c (main): Likewise.
      * tools/virsh.c (main): Fix exit status.
      * src/internal.h (DEFAULT_TEXT_DOMAIN): Define, for gettext.h.
      (_): Simplify definition accordingly.
      * po/POTFILES.in: Add src/storage/parthelper.c.
      981d2cda