1. 14 7月, 2011 1 次提交
  2. 12 7月, 2011 1 次提交
    • D
      Add a new 'virsh qemu-attach' command. · eb7be6a6
      Daniel P. Berrange 提交于
      This command allows libvirt to attach to an existing QEMU
      instance.
      
       $ qemu-kvm -cdrom ~/demo.iso \
           -monitor unix:/tmp/demo,server,nowait \
           -name foo \
           -uuid cece4f9f-dff0-575d-0e8e-01fe380f12ea  &
       $ QEMUPID=$!
       $ virsh qemu-attach $QEMUPID
      eb7be6a6
  3. 08 7月, 2011 2 次提交
    • E
      virsh: make destroy sound less scary · 085d2415
      Eric Blake 提交于
      Destroy has a rather negative English connotation.  Try to reduce
      the impact, so newbies aren't as scared to use it.
      
      * tools/virsh.c: Tweak all destroy documentation.
      * tools/virsh.pod: Likewise.
      085d2415
    • E
      build: use gnulib pthread_sigmask · 8437e738
      Eric Blake 提交于
      Gnulib finally learned how to do pthread_sigmask on mingw.
      
      * .gnulib: Update to latest, for pthread_sigmask.
      * bootstrap.conf (gnulib_modules): Add pthread_sigmask.
      * configure.ac (AC_CHECK_FUNCS): Drop redundant check.
      * src/rpc/virnetclient.c (virNetClientSetTLSSession)
      (virNetClientIOEventLoop): Make code unconditional.
      * src/util/command.c (virFork): Likewise.
      * tools/virsh.c (doMigrate, cmdMigrate): Likewise.
      8437e738
  4. 01 7月, 2011 2 次提交
    • E
      virsh: avoid uninitialized variable · cdb0e0dc
      Eric Blake 提交于
      Detected by Coverity; neither vshCmddefHelp nor vshCmdOptParse
      was initializing opts_required.
      
      * tools/virsh.c (vshCmddefOptParse): Always initialize bitmaps.
      cdb0e0dc
    • E
      virsh: avoid integer overflow · 6f9432fc
      Eric Blake 提交于
      Detected by Coverity.  info.nrVirtCpu is unsigned short, but if
      cpumaplen is int, then the product of the two in vshMalloc risks
      unintended sign extension.  cmdVcpuinfo had already solved this
      by using size_t cpumaplen.
      
      * tools/virsh.c (cmdVcpuPin): Use correct type.
      6f9432fc
  5. 30 6月, 2011 1 次提交
  6. 28 6月, 2011 1 次提交
  7. 27 6月, 2011 1 次提交
    • E
      build: rename Vcpupin to VcpuPin · 28e45afc
      Eric Blake 提交于
      We already have a public virDomainPinVcpu, which implies that
      Pin and Vcpu are treated as separate words.  Unreleased commit
      e261987c introduced virDomainGetVcpupinInfo as the first public
      API that used Vcpupin, although we had prior internal uses of
      that spelling.  For consistency, change the spelling to be two
      words everywhere, regardless of whether pin comes first or last.
      
      * daemon/remote.c: Treat vcpu and pin as separate words.
      * include/libvirt/libvirt.h.in: Likewise.
      * src/conf/domain_conf.c: Likewise.
      * src/conf/domain_conf.h: Likewise.
      * src/driver.h: Likewise.
      * src/libvirt.c: Likewise.
      * src/libvirt_private.syms: Likewise.
      * src/libvirt_public.syms: Likewise.
      * src/libxl/libxl_driver.c: Likewise.
      * src/qemu/qemu_driver.c: Likewise.
      * src/remote/remote_driver.c: Likewise.
      * src/xen/xend_internal.c: Likewise.
      * tools/virsh.c: Likewise.
      * src/remote/remote_protocol.x: Likewise.
      * src/remote_protocol-structs: Likewise.
      Suggested by Matthias Bolte.
      28e45afc
  8. 25 6月, 2011 2 次提交
  9. 24 6月, 2011 2 次提交
    • E
      Revert "Enable the virDomainBlockPull API in virsh" · f7f5e3e8
      Eric Blake 提交于
      This reverts commit 3e2493ce.
      f7f5e3e8
    • D
      Allow automatic kill of guests when a connection is closed · 3ba937da
      Daniel P. Berrange 提交于
      If an application is using libvirt + KVM as a piece of its
      internal infrastructure to perform a specific task, it can
      be desirable to guarentee the VM dies when the virConnectPtr
      disconnects from libvirtd. This ensures the app can't leak
      any VMs it was using. Adding VIR_DOMAIN_START_AUTOKILL as
      a flag when starting guests enables this to be done.
      
      * include/libvirt/libvirt.h.in: All VIR_DOMAIN_START_AUTOKILL
      * src/qemu/qemu_driver.c: Support automatic killing of guests
        upon connection close
      * tools/virsh.c: Add --autokill flag to 'start' and 'create'
        commands
      3ba937da
  10. 22 6月, 2011 1 次提交
  11. 21 6月, 2011 3 次提交
    • E
      virsh: enhance snapshot-create-as · 9256ad84
      Eric Blake 提交于
      Similar to pool-create-as.
      
      * tools/virsh.c (cmdSnapshotCreateAs): Add --print-xml.
      * tools/virsh.pod: Document it.
      9256ad84
    • E
      virsh: add snapshot-create-as command · 1546dcf8
      Eric Blake 提交于
      Producing an xml file just for name and description fields is
      overkill; this makes life easier from virsh.
      
      * tools/virsh.c (cmdSnapshotCreateAs): New command.
      (snapshotCmds): Install it.
      * tools/virsh.pod: Document it.
      1546dcf8
    • E
      virsh: clarify snapshot vs. save · ea71d828
      Eric Blake 提交于
      * tools/virsh.c (info_snapshot_create, info_save): Clarify
      description.
      * tools/virsh.pod (save): Likewise.
      ea71d828
  12. 20 6月, 2011 4 次提交
    • D
      Fix compile warnings in virsh vcpupin · b3257680
      Daniel P. Berrange 提交于
      The 'char *cur' variable was being assigned from a
      'const char *' string, thus discarding constness.
      As well as causing a compile warning, it masked a
      piece of code which attempts to assign to the
      previously const string.
      
      * tools/virsh.c: Fix const-ness of 'cur' variable in vcpupin
      b3257680
    • T
      vcpupin: add reset option to virsh vcpupin command · c4a8ca71
      Taku Izumi 提交于
      When resetting vcpupin setting, we have to specify all host physical
      cpus as a cpulist parameter of virsh vcpupin command. It's a little
      tedious.
      
      This patch changes to allow to receive the special keyword 'r' as a cpulist
      parameter of virsh vcpupin command when resetting vcpupin setting.
      
      If you set the following:
      
       # virsh vcpupin VM 0 r
      
      the vcpu0 will be pinned to all physical cpus.
      Signed-off-by: NTaku Izumi <izumi.taku@jp.fujitsu.com>
      c4a8ca71
    • T
      vcpupin: improve vcpupin definition of virsh vcpupin · 2903534a
      Taku Izumi 提交于
      When using vcpupin command, we have to speficy comma-separated list as cpulist,
      but this is tedious in case the number of phsycal cpus is large.
      This patch improves this by introducing special markup "-" and "^" which are
      similar to XML schema of "cpuset" attribute.
      
      The example:
      
       # virsh vcpupin Guest 0 0-15,^8
      
       is identical to
      
       # virsh vcpupin Guest 0 0,1,2,3,4,5,6,7,9,10,11,12,13,14,15
      
      NOTE: The expression is sequentially evaluated, so "0-15,^8" is not identical
      to "^8,0-15".
      Signed-off-by: NTaku Izumi <izumi.taku@jp.fujitsu.com>
      2903534a
    • H
      Add new parameters for blkiotune · 1bb414af
      Hu Tao 提交于
      Add --config, --live and --current for command blkiotune
      1bb414af
  13. 17 6月, 2011 1 次提交
  14. 15 6月, 2011 6 次提交
  15. 14 6月, 2011 3 次提交
    • M
      virsh: Add daemon version reporting · f67f9650
      Michal Privoznik 提交于
      'virsh version' might report against which version of libvirtd is
      running.
      f67f9650
    • O
      qemu: Parse current balloon value returned by query_balloon · 41514f7b
      Osier Yang 提交于
      Qemu once supported following memory stats which will returned by
      "query_balloon":
      
          stat_put(dict, "actual", actual);
          stat_put(dict, "mem_swapped_in", dev->stats[VIRTIO_BALLOON_S_SWAP_IN]);
          stat_put(dict, "mem_swapped_out", dev->stats[VIRTIO_BALLOON_S_SWAP_OUT]);
          stat_put(dict, "major_page_faults", dev->stats[VIRTIO_BALLOON_S_MAJFLT]);
          stat_put(dict, "minor_page_faults", dev->stats[VIRTIO_BALLOON_S_MINFLT]);
          stat_put(dict, "free_mem", dev->stats[VIRTIO_BALLOON_S_MEMFREE]);
          stat_put(dict, "total_mem", dev->stats[VIRTIO_BALLOON_S_MEMTOT]);
      
      But it later disabled all the stats except "actual" by commit
      07b0403dfc2b2ac179ae5b48105096cc2d03375a.
      
      libvirt doesn't parse "actual", so user will always see a empty result
      with "virsh dommemstat $domain". Even qemu haven't disabled the stats,
      we should support parsing "actual".
      41514f7b
    • H
      Deprecate several CURRENT/LIVE/CONFIG enums · fbd7820b
      Hu Tao 提交于
      This patch deprecates following enums:
      
      VIR_DOMAIN_MEM_CURRENT
      VIR_DOMAIN_MEM_LIVE
      VIR_DOMAIN_MEM_CONFIG
      
      VIR_DOMAIN_VCPU_LIVE
      VIR_DOMAIN_VCPU_CONFIG
      
      VIR_DOMAIN_DEVICE_MODIFY_CURRENT
      VIR_DOMAIN_DEVICE_MODIFY_LIVE
      VIR_DOMAIN_DEVICE_MODIFY_CONFIG
      
      And modify internal codes to use virDomainModificationImpact.
      fbd7820b
  16. 13 6月, 2011 1 次提交
    • T
      vcpupin: add the new option to "virsh vcpupin" command · 9a3404ed
      Taku Izumi 提交于
      This patch adds the new option (--live, --config and --current) to
      "virsh vcpupin" command. The behavior of above aption is the same as
      that of "virsh setmem", "virsh setvcpus", and whatnot.
      When the --config option is specified, the command affects a persistent
      domain, while --live option is specified, it affects a running (live) domain.
      The --current option cannot be used with --config or --live at the same
      time, and when --current is specified, it affects a "current" domain.
      9a3404ed
  17. 08 6月, 2011 2 次提交
    • E
      build: silence coverity false positives · 1eca8c3e
      Eric Blake 提交于
      Coverity complained about these intentional fallthrough cases, but
      not about other cases that were explicitly marked with nice comments.
      
      For some reason, Coverity doesn't seem smart enough to parse the
      up-front English comment in virsh about intentional fallthrough :)
      
      * tools/virsh.c (cmdVolSize): Mark fallthrough in a more typical
      fashion.
      * src/conf/nwfilter_conf.c (virNWFilterRuleDefDetailsFormat)
      (virNWFilterRuleDetailsParse): Mark explicit fallthrough.
      1eca8c3e
    • O
      virsh: Expose virDomainMigrateSetMaxSpeed API to virsh · b73f1f8d
      Osier Yang 提交于
      API virDomainMigrateSetMaxSpeed was introduced since 0.9.0, but
      no command in virsh yet.
      b73f1f8d
  18. 04 6月, 2011 1 次提交
    • E
      API: consolidate common unreleased enums · 33d90baf
      Eric Blake 提交于
      This commit is safe precisely because there has been no release
      for any of the enum values being deleted (they were added post-0.9.1).
      
      After the 0.9.2 release, we can then take advantage of
      virDomainModificationImpact in more places.
      
      * include/libvirt/libvirt.h.in (virDomainModificationImpact): New
      enum.
      (virDomainSchedParameterFlags, virMemoryParamFlags): Delete, since
      these were never released, and the new enum works fine here.
      * src/libvirt.c	(virDomainGetMemoryParameters)
      (virDomainSetMemoryParameters)
      (virDomainGetSchedulerParametersFlags)
      (virDomainSetSchedulerParametersFlags): Update documentation.
      * src/qemu/qemu_driver.c (qemuDomainSetMemoryParameters)
      (qemuDomainGetMemoryParameters, qemuSetSchedulerParametersFlags)
      (qemuSetSchedulerParameters, qemuGetSchedulerParametersFlags)
      (qemuGetSchedulerParameters): Adjust clients.
      * tools/virsh.c (cmdSchedinfo, cmdMemtune): Likewise.
      Based on ideas by Daniel Veillard and Hu Tao.
      33d90baf
  19. 03 6月, 2011 1 次提交
    • E
      docs: document iface-* commands · 72519f73
      Eric Blake 提交于
      I intentionally set things up so 'virsh help interface' lists
      commands in alphabetical order, but 'man virsh' lists them in
      topical order; this matches our practice on some other commands.
      
      * tools/virsh.pod: Document all iface commands.
      * tools/virsh.c (ifaceCmds): Sort.
      72519f73
  20. 02 6月, 2011 1 次提交
  21. 31 5月, 2011 2 次提交
    • D
      Fix sysinfo/virsh build problems on Win32 · ef983dfe
      Daniel P. Berrange 提交于
      The virSysinfoIsEqual method was mistakenly inside a #ifndef WIN32
      conditional.
      
      The existing virSysinfoFormat is also stubbed out on Win32, even
      though the code works without any trouble. This breaks XML output
      on Win32, so the stub is removed.
      
      virsh migrate mistakenly had some variables inside the conditional
      
      * src/util/sysinfo.c: Build virSysinfoIsEqual on Win32 and remove
        Win32 stub for virSysinfoFormat
      * tools/virsh.c: Fix variable declaration on Win32
      ef983dfe
    • D
      Allow virsh to pass in a custom XML document for migration · ec5301cb
      Daniel P. Berrange 提交于
      Switch virsh migrate over to use virDomainMigrate2 and
      virDomainMigrateToURI2. This is still compatible with
      older libvirts, because these methods dynamically choose
      whether to perform v1, v2 or v3 migration based on declared
      RPC support from the libvirtd instances
      
      Add a --xml arg which allows the user to pass in a custom
      XML document. This XML document must be ABI compatible
      with the current *live* XML document for the running guest
      on the source host. ABI compatibility will be enforced by
      any driver supporting this function
      
      * tools/virsh.c: Add '--xml' arg to migrate command
      ec5301cb
  22. 29 5月, 2011 1 次提交
    • E
      virsh: improve schedinfo querying ability · 97f63513
      Eric Blake 提交于
      Since we can now set just --live or --config, we also need to be
      able to query that back.
      
      In the case of setting both --live and --config, it shouldn't matter
      which value we read back; otherwise, since querying treats the two
      flags as mutually exclusive, so does this patch.
      
      * tools/virsh.c (cmdSchedinfo): Use new API where appropriate.
      97f63513