1. 17 2月, 2010 1 次提交
    • 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
  2. 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
  3. 04 2月, 2010 1 次提交
  4. 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
  5. 20 1月, 2010 2 次提交
  6. 18 1月, 2010 1 次提交
  7. 12 1月, 2010 2 次提交
  8. 07 1月, 2010 2 次提交
  9. 21 12月, 2009 2 次提交
  10. 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
  11. 18 12月, 2009 1 次提交
  12. 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
  13. 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
  14. 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
  15. 20 11月, 2009 1 次提交
  16. 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
  17. 11 11月, 2009 1 次提交
  18. 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
  19. 21 10月, 2009 1 次提交
  20. 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
  21. 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
  22. 02 10月, 2009 1 次提交
  23. 01 10月, 2009 1 次提交
    • J
      Fix build in separate build directory · 3bd4c7ba
      Jiri Denemark 提交于
      * cfg.mk: use $(srcdir)/ prefix for Makefile.nonreentrant include
      * examples/domain-events/events-c/Makefile.am tools/Makefile.am
        examples/hellolibvirt/Makefile.am: extend the include paths to
        use $(top_srcdir)/include too.
      3bd4c7ba
  24. 30 9月, 2009 1 次提交
  25. 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
  26. 21 9月, 2009 3 次提交
    • D
      Move all shared utility files to src/util/ · 1355e055
      Daniel P. Berrange 提交于
      * src/bridge.c, src/bridge.h, src/buf.c, src/buf.h, src/cgroup.c,
        src/cgroup.h, src/conf.c, src/conf.h, src/event.c, src/event.h,
        src/hash.c, src/hash.h, src/hostusb.c, src/hostusb.h,
        src/iptables.c, src/iptables.h, src/logging.c, src/logging.h,
        src/memory.c, src/memory.h, src/pci.c, src/pci.h, src/qparams.c,
        src/qparams.h, src/stats_linux.c, src/stats_linux.h,
        src/threads-pthread.c, src/threads-pthread.h, src/threads-win32.c,
        src/threads-win32.h, src/threads.c, src/threads.h, src/util.c,
        src/util.h, src/uuid.c, src/uuid.h, src/virterror.c,
        src/virterror_internal.h, src/xml.c, src/xml.h: Move all files
        into src/util/
      * daemon/Makefile.am: Add -Isrc/util/ to build flags
      * src/Makefile.am: Add -Isrc/util/ to build flags and update for
        moved files
      * src/libvirt_private.syms: Export cgroup APIs since they're now
        in util rather than linking directly to drivers
      * src/xen/xs_internal.c: Disable bogus virEventRemoveHandle call
        when built under PROXY
      * proxy/Makefile.am: Update for changed file locations. Remove
        bogus build of event.c
      * tools/Makefile.am, tests/Makefile.am: Add -Isrc/util/ to build flags
      1355e055
    • D
      Make pki_check.sh into an installed & supported tool · 3decd4f9
      Daniel P. Berrange 提交于
      * docs/pki_check.sh: Move to tool/virt-pki-validate.in and add
        in POD man page documentation
      * tools/.gitignore: Ignore generated virt-pki-validate file
      * tools/Makefile.am: Install & build virt-pki-validate and
        virt-pki-validate.1
      * docs/remote.html, docs/remote.html.in: Refer to new tool
        name virt-pki-validate
      * libvirt.spec.in, mingw32-libvirt.spec.in: Add virt-pki-validate
        and virt-pki-validate.1 to files list
      3decd4f9
    • D
      Move virsh into tools/ directory · 7ff256ec
      Daniel P. Berrange 提交于
      Move the virsh tool and its man page into the tools directory
      
      * Makefile.am: Remove rules for virsh.1 man page
      * virsh.1: Remove auto-generated file
      * docs/Makefile.am: Remove rules for virsh.pod man page
      * docs/virsh.pod: Move to tools/ directory
      * src/Makefile.am, src/.gitignore: Remove rules for virsh
      * src/console.c, src/console.h, src/*.ico, src/virsh_win_icon.rc,
        src/virsh.c: Move into tools/ directory
      * tools/Makefile.am: Add rules for building virsh
      * tools/.gitignore: Ignore virsh built files
      * tests/virshtest.c, tests/int-overflow: Update for new
        virsh location
      7ff256ec
  27. 08 7月, 2009 1 次提交
  28. 19 4月, 2009 1 次提交