1. 10 3月, 2010 2 次提交
    • E
      virsh: use N_ rather than gettext_noop · 0c39adef
      Eric Blake 提交于
      With N_() in place, we can use it for a smaller file.
      
      * doc/api-extension/0008-Step-8-of-8-Add-virsh-support.patch:
      Replace all uses of gettext_noop with N_.
      * tools/virsh.c: Likewise, throughout the file.
      0c39adef
    • E
      virsh: fix existing N_ uses · f6876e10
      Eric Blake 提交于
      It is a bad idea to call gettext on an already-translated
      string.  In cases where a string must be translated separately
      from where it is exposed to xgettext, the gettext manual
      recommends the idiom of N_() wrapping gettext_noop for
      marking the string.
      
      * src/internal.h (N_): Fix definition to match gettext manual.
      * tools/virsh.c: (cmdHelp, cmdList, cmdDomstate, cmdDominfo)
      (cmdVcpuinfo, vshUsage): Replace incorrect use of N_ with _.
      (vshCmddefHelp): Likewise.  Mark C format strings appropriately.
      f6876e10
  2. 03 3月, 2010 3 次提交
    • E
      virsh: silence compiler warning · 2103d87c
      Eric Blake 提交于
      gcc warns:
      virsh.c:1879: warning: '0' flag ignored with '-' flag in gnu_printf format
      
      * tools/virsh.c (cmdDomjobinfo): Delete useless flag.
      2103d87c
    • D
      Support job cancellation in QEMU driver · 04c7abd9
      Daniel P. Berrange 提交于
      This supports cancellation of jobs for the QEMU driver against
      the virDomainMigrate, virDomainSave and virDomainCoreDump APIs.
      It is not yet supported for the virDomainRestore API, although
      it is desirable.
      
      * src/qemu/qemu_driver.c: Issue 'migrate_cancel' command if
        virDomainAbortJob is issued during a migration operation
      * tools/virsh.c: Add a domjobabort command
      04c7abd9
    • D
      Add QEMU driver support for job info on migration ops · 0d3eee7f
      Daniel P. Berrange 提交于
      Introduce support for  virDomainGetJobInfo in the QEMU driver. This
      allows for monitoring of any API that uses the 'info migrate' monitor
      command. ie virDomainMigrate, virDomainSave and virDomainCoreDump
      
      Unfortunately QEMU does not provide a way to monitor incoming migration
      so we can't wire up virDomainRestore yet.
      
      The virsh tool gets a new command 'domjobinfo' to query status
      
      * src/qemu/qemu_driver.c: Record virDomainJobInfo and start time
        in qemuDomainObjPrivatePtr objects. Add generic shared handler
        for calling 'info migrate' with all migration based APIs.
      * src/qemu/qemu_monitor_text.c: Fix parsing of 'info migration' reply
      * tools/virsh.c: add new 'domjobinfo' command to query progress
      0d3eee7f
  3. 01 3月, 2010 1 次提交
  4. 27 2月, 2010 1 次提交
  5. 26 2月, 2010 1 次提交
    • C
      virsh: Show errors reported by nonAPI functions · 48286963
      Cole Robinson 提交于
      Only API calls trigger the error callback, which is required for
      proper virsh error reporting. Since we use non API functions from
      util/, make sure we properly report these errors.
      
      Fixes lack of error message from 'virsh create idontexit.xml'
      48286963
  6. 25 2月, 2010 1 次提交
  7. 23 2月, 2010 1 次提交
  8. 21 2月, 2010 1 次提交
  9. 20 2月, 2010 1 次提交
  10. 19 2月, 2010 1 次提交
  11. 17 2月, 2010 2 次提交
    • J
      Adds a cpu-baseline command for virsh · 73b0b596
      Jiri Denemark 提交于
      * tools/virsh.c: add a command to compute a CPU baseline based on
        multiple CPU definitions in an XML chunk
      * tools/virsh.pod: add it to the man page
      73b0b596
    • J
      vshCommandParse: placate coverity · 7c5735dc
      Jim Meyering 提交于
      There is no real leak here, but Coverity-Prevent thinks there is.
      It does not see that while there are four ways to return from
      vshCommandGetToken with VSH_TK_END, none of them results in allocation
      of a result.
      * tools/virsh.c (vshCommandParse): Add a (currently) useless VIR_FREE,
      to ensure that we never leak when vshCommandGetToken returns VSH_TK_END.
      7c5735dc
  12. 09 2月, 2010 2 次提交
    • M
      Remove conn parameter from util functions · f972dc2d
      Matthias Bolte 提交于
      It was used for error reporting only.
      f972dc2d
    • J
      Modify virsh commands · 3b9027c4
      Jim Fehlig 提交于
      Change all virsh commands that invoke virDomain{Attach,Detach}Device()
      to use virDomain{Attach,Detach}DeviceFlags() instead.
      
      Add a "--persistent" flag to these virsh commands, allowing user to
      specify that the domain persisted config be modified as well.
      
      V2: Only invoke virDomain{Attach,Detach}DeviceFlags() if
      "--persistent" flag is specified.  Otherwise invoke
      virDomain{Attach,Detach}Device() to retain current behavior.
      3b9027c4
  13. 02 2月, 2010 1 次提交
    • J
      avoid format-related warnings · 4cd188d4
      Jim Meyering 提交于
      * src/qemu/qemu_monitor_text.c (qemuMonitorTextGetAllPCIAddresses):
      Use %s.
      * src/storage/storage_backend_iscsi.c (virStorageBackendCreateIfaceIQN):
      Likewise.
      * tools/virsh.c (cmdSecretSetValue): Likewise.
      4cd188d4
  14. 12 1月, 2010 2 次提交
  15. 07 1月, 2010 2 次提交
  16. 21 12月, 2009 1 次提交
  17. 20 12月, 2009 1 次提交
    • A
      Add a new command dommemstats for virDomainMemoryStats · b6798b68
      Adam Litke 提交于
      Define a new command 'dommemstats' to report domain memory statistics.  The
      output format is inspired by 'domblkstat' and 'domifstat' and consists of
      tag/value pairs, one per line.  The command can complete successfully and
      print no output if virDomainMemoryStats is supported by the driver, but not
      the guest operating system.
      
      Sample output:
      swap_in 0
      swap_out 0
      major_fault 54
      minor_fault 58259
      unused 487680
      available 502472
      
      All stats referring to a quantity of memory (eg. all above except major and
      minor faults) represent the quantity in KBytes.
      
      * tools/virsh.c: implements the new command
      b6798b68
  18. 18 12月, 2009 1 次提交
  19. 14 12月, 2009 4 次提交
    • J
      virsh: avoid double-free · 21a2eba4
      Jim Meyering 提交于
      * tools/virsh.c (vshCommandParse): Avoid double-free of "tkdata".
      Set it to NULL immediately after free in the (cmd == NULL) case,
      just as in the other case, in case the final free(tkdata) is
      triggered by a syntax error.
      21a2eba4
    • D
      Implement --pool option for virsh vol-path · 94d599ec
      Dave Allan 提交于
      This patch fixes the problem reported in:
      
      https://bugzilla.redhat.com/show_bug.cgi?id=509306
      
      The bug reporter says that vol-delete does not support the --pool
      option, but that's not the case in the current head.  This patch makes
      vol-path behave the same way as vol-delete
      
      * tools/virsh.c: Modified vol-path to use the same logic as vol-delete,
        allowing the syntax: virsh vol-path --pool testdirpool testvol0
      94d599ec
    • P
      add --live support to "virsh dump" · 1fb7af40
      Paolo Bonzini 提交于
      This is trivial for QEMU since you just have to not stop the vm before
      starting the dump.  And for Xen, you just pass the flag down to xend.
      
      * include/libvirt/libvirt.h.in (virDomainCoreDumpFlags): Add VIR_DUMP_LIVE.
      * src/qemu/qemu_driver.c (qemudDomainCoreDump): Support live dumping.
      * src/xen/xend_internal.c (xenDaemonDomainCoreDump): Support live dumping.
      * tools/virsh.c (opts_dump): Add --live. (cmdDump): Map it to VIR_DUMP_LIVE.
      1fb7af40
    • P
      add --crash support to "virsh dump" · b927aed8
      Paolo Bonzini 提交于
      This patch adds the --crash option (already present in "xm dump-core")
      to "virsh dump".  virDomainCoreDump already has a flags argument, so
      the API/ABI is untouched.
      
      * include/libvirt/libvirt.h.in (virDomainCoreDumpFlags): New flag for
        CoreDump
      * src/test/test_driver.c (testDomainCoreDump): Do not crash
        after dump unless VIR_DUMP_CRASH is given.
      * src/qemu/qemu_driver.c (qemudDomainCoreDump): Shutdown the domain
        instead of restarting it if --crash is passed.
      * src/xen/xend_internal.c (xenDaemonDomainCoreDump): Support --crash.
      * tools/virsh.c (opts_dump): Add --crash.
        (cmdDump): Map it to flags for virDomainCoreDump and pass them.
      b927aed8
  20. 11 12月, 2009 1 次提交
    • P
      add virsh --suspend arg to migrate command · edc9e78b
      Paolo Bonzini 提交于
      This adds a new flag, VIR_MIGRATE_PAUSED, that mandates pausing
      the migrated VM before starting it.
      
      * include/libvirt/libvirt.h.in (virDomainMigrateFlags): Add VIR_MIGRATE_PAUSED.
      * src/qemu/qemu_driver.c (qemudDomainMigrateFinish2): Handle VIR_MIGRATE_PAUSED.
      * tools/virsh.c (opts_migrate): Add --suspend. (cmdMigrate): Handle it.
      * tools/virsh.pod (migrate): Document it.
      edc9e78b
  21. 10 12月, 2009 1 次提交
    • M
      Add virBufferFreeAndReset() and replace free() · 1b9d0744
      Matthias Bolte 提交于
      Replace free(virBufferContentAndReset()) with virBufferFreeAndReset().
      Update documentation and replace all remaining calls to free() with
      calls to VIR_FREE(). Also add missing calls to virBufferFreeAndReset()
      and virReportOOMError() in OOM error cases.
      1b9d0744
  22. 13 11月, 2009 1 次提交
    • D
      Check that domain is running when starting console · c7a8e1bf
      Daniel P. Berrange 提交于
      The 'virsh console' command did not check if the domain was
      already running before attempting to fetch the XML and extract
      the console PTY path. This caused a slightly unhelpful / misleading
      error message for the user. The explicit check ensures the user
      gets an explicit 'domain is not running' message.
      
      * tools/virsh.c: Validate that state != VIR_DOMAIN_SHUTOFF in
        virsh console command
      c7a8e1bf
  23. 11 11月, 2009 1 次提交
  24. 04 11月, 2009 2 次提交
    • C
      Improve error reporting for virConnectGetHostname calls · 517761fd
      Cole Robinson 提交于
      All drivers have copy + pasted inadequate error reporting which wraps
      util.c:virGetHostname. Move all error reporting to this function, and improve
      what we report.
      
      Changes from v1:
        Drop the driver wrappers around virGetHostname. This means we still need
        to keep the new conn argument to virGetHostname, but I think it's worth
        it.
      517761fd
    • L
      Support reporting live interface IP/netmask · 753c6c9c
      Laine Stump 提交于
      This patch adds the flag VIR_INTERFACE_XML_INACTIVE to
      virInterfaceGetXMLDesc's flags. When it is*not* set (the default), the
      live interface info will be returned in the XML (in particular, the IP
      address(es) and netmask(s) will be retrieved by querying the interface
      directly, rather than  reporting what's in the config file). The
      backend of this is in netcf's ncf_if_xml_state() function.
      
      * configure.in libvirt.spec.in: requires netcf >= 0.1.3
      * include/libvirt/libvirt.h.in: adds flag VIR_INTERFACE_XML_INACTIVE
      * src/conf/interface_conf.c src/interface/netcf_driver.c src/libvirt.c:
        update the parsing and backend routines accordingly
      * tools/virsh.c: change interface edit to inactive definition and
        adds the inactive flag for interface dump
      753c6c9c
  25. 21 10月, 2009 1 次提交
  26. 14 10月, 2009 1 次提交
    • C
      Finer grained migration control · 2d8d9b10
      Chris Lalancette 提交于
      Normally, when you migrate a domain from host A to host B,
      the domain on host A remains defined but shutoff and the domain
      on host B remains running but is a "transient".  Add a new
      flag to virDomainMigrate() to allow the original domain to be
      undefined on source host A, and a new flag to virDomainMigrate() to
      allow the new domain to be persisted on the destination host B.
      Signed-off-by: NChris Lalancette <clalance@redhat.com>
      2d8d9b10
  27. 09 10月, 2009 1 次提交
    • D
      Support a new peer-to-peer migration mode & public API · fae0da5c
      Daniel P. Berrange 提交于
      Introduces several new public API options for migration
      
       - VIR_MIGRATE_PEER2PEER: With this flag the client only
         invokes the virDomainMigratePerform method, expecting
         the source host driver to do whatever is required to
         complete the entire migration process.
       - VIR_MIGRATE_TUNNELLED: With this flag the actual data
         for migration will be tunnelled over the libvirtd RPC
         channel. This requires that VIR_MIGRATE_PEER2PEER is
         also set.
       - virDomainMigrateToURI: This is variant of the existing
         virDomainMigrate method which does not require any
         virConnectPtr for the destination host. Given suitable
         driver support, this allows for all the same modes as
         virDomainMigrate()
      
      The URI for VIR_MIGRATE_PEER2PEER must be a valid libvirt
      URI. For non-p2p migration a hypervisor specific migration
      URI is used.
      
      virDomainMigrateToURI without a PEER2PEER flag is only
      support for Xen currently, and it involves XenD talking
      directly to XenD, no libvirtd involved at all.
      
      * include/libvirt/libvirt.h.in: Add VIR_MIGRATE_PEER2PEER
        flag for migration
      * src/libvirt_internal.h: Add feature flags for peer to
        peer migration (VIR_FEATURE_MIGRATE_P2P) and direct
        migration (VIR_MIGRATE_PEER2PEER mode)
      * src/libvirt.c: Implement support for VIR_MIGRATE_PEER2PEER
        and virDomainMigrateToURI APIs.
      * src/xen/xen_driver.c: Advertise support for DIRECT migration
      * src/xen/xend_internal.c: Add TODO item for p2p migration
      * src/libvirt_public.syms: Export virDomainMigrateToURI
        method
      * src/qemu/qemu_driver.c: Add support for PEER2PEER and
        migration, and adapt TUNNELLED migration.
      * tools/virsh.c: Add --p2p and --direct args and use the
        new virDomainMigrateToURI method where possible.
      fae0da5c
  28. 02 10月, 2009 1 次提交
  29. 29 9月, 2009 1 次提交
    • J
      Avoid double free in errors in virsh · 1caa19cb
      Jim Fehlig 提交于
      * tools/virsh.c: it was possible to get vshDeinit to call itself back
        via vshError, remove the doexit parameter of vshError to avoid the
        possibility and make sure to exit directly after in those case.
      1caa19cb