1. 20 6月, 2011 2 次提交
    • 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
  2. 17 6月, 2011 1 次提交
  3. 15 6月, 2011 6 次提交
  4. 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
  5. 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
  6. 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
  7. 04 6月, 2011 2 次提交
    • 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
    • J
      virsh: Document nodeinfo output · 4e3a1c30
      Jiri Denemark 提交于
      4e3a1c30
  8. 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
  9. 02 6月, 2011 1 次提交
  10. 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
  11. 29 5月, 2011 2 次提交
    • 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
    • E
      maint: prefer newer API names internally · 163e5f04
      Eric Blake 提交于
      Rather mechanical in nature.
      
      * src/driver.h: Use newer virTypedParameter API names.
      * src/libvirt.c: Likewise.
      * daemon/remote.c: Likewise.
      * src/esx/esx_driver.c: Likewise.
      * src/libxl/libxl_driver.c: Likewise.
      * src/lxc/lxc_driver.c: Likewise.
      * src/qemu/qemu_driver.c: Likewise.
      * src/remote/remote_driver.c: Likewise.
      * src/test/test_driver.c: Likewise.
      * src/xen/xen_driver.c: Likewise.
      * src/xen/xen_hypervisor.c: Likewise.
      * src/xen/xen_hypervisor.h: Likewise.
      * src/xen/xend_internal.c: Likewise.
      * tools/virsh.c: Likewise.
      163e5f04
  12. 28 5月, 2011 1 次提交
  13. 27 5月, 2011 1 次提交
    • H
      Add new flags for setting memory parameters · 118eac37
      Hu Tao 提交于
      The new flags allow to pick current state, config or the live
      parameter, with current being the existing API default (0).
      This also hooks this to --config, --live, --current parameters for
      the memtune virsh command
      
      * include/libvirt/libvirt.h.in: defines the new flags
      * tools/virsh.c: adds support at virsh level
      * tools/virsh.pod: updates virsh documentation
      118eac37
  14. 26 5月, 2011 1 次提交
  15. 20 5月, 2011 1 次提交
  16. 19 5月, 2011 1 次提交
    • E
      virsh: optimize creation of default connection · d218344e
      Eric Blake 提交于
      Ramon de Carvalho Valle reported a problem with:
      virsh connect qemu:///system
      as a non-root user.  The real root problem appears to be a regression
      in libvirtd being auto-started on the default qemu:///session URI;
      however, the symptom points to an independent flaw in virsh - we
      shouldn't be wasting efforts on making a connection if we aren't going
      to be using that connection.  Fixing virsh avoids Ramon's issue, while
      I work in the meantime to fix the real libvirtd regression.
      
      This patch looks big, but that's because 'gcc -Wmissing-field-initializers'
      gets triggered by './autobuild.sh --enable-compile-warnings=error', so I
      had to add 0 initialization to everyone (rather than my preference of
      just adding the non-zero flags to virshCmds and to cmdConnect).
      
      Meanwhile, if you use 'virsh -c URI', the connection must succeed; this
      patch _only_ optimizes the default connection to be deferred to a later
      point where we know if a particular command to be run needs a connection.
      
      * tools/virsh.c (VSH_CMD_FLAG_NOCONNECT): New flag.
      (vshCmdDef): Add new flags field.
      (vshCommandRun): Honor new flag.
      (domManagementCmds, domMonitoringCmds, storagePoolCmds)
      (storageVolCmds, networkCmds, nodedevCmds, ifaceCmds)
      (nwfilterCmds, secretCmds, virshCmds, snapshotCmds)
      (hostAndHypervisorCmds): Populate new field.
      (vshReconnect): Don't warn on initial connection.
      d218344e
  17. 18 5月, 2011 1 次提交
  18. 17 5月, 2011 2 次提交
    • J
      virsh: Correctly initialize libvirt · c256542e
      Jiri Denemark 提交于
      virsh didn't call virInitialize(), which (among other things)
      initializes virLastErr thread local variable. As a result of that, virsh
      could just segfault in virEventRegisterDefaultImpl() since that is the
      first call that touches (resets) virLastErr.
      
      I have no idea what lucky coincidence made this bug visible but I was
      able to reproduce it in 100% cases but only in one specific environment
      which included building in sandbox.
      c256542e
    • M
      virsh: Report an error when virGetUserDirectory fails · 33a5f8ca
      Matthias Bolte 提交于
      Otherwise virsh shows the interactive greeting and then silently exists
      instead of entering interactive mode.
      33a5f8ca
  19. 16 5月, 2011 1 次提交
  20. 14 5月, 2011 1 次提交
  21. 11 5月, 2011 1 次提交
  22. 10 5月, 2011 1 次提交
  23. 07 5月, 2011 1 次提交
    • E
      maint: avoid comparisons to bool constants · f84fe150
      Eric Blake 提交于
      HACKING already mentions that comparisons against literal 'true'
      are unsafe; for consistency, also shorten comparisons against 'false'.
      
      * src/conf/domain_conf.c (virDomainNetDefParseXML): Simplify.
      * src/nwfilter/nwfilter_gentech_driver.c
      (virNWFilterDomainFWUpdateCB): Likewise.
      * tools/virsh.c (cmdVolDownload, vshCommandRun, vshPrintExtra):
      Likewise.
      f84fe150
  24. 06 5月, 2011 2 次提交
    • E
      virsh: use new method for easier log to file · f99e1389
      Eric Blake 提交于
      Easier to maintain, and no longer an arbitrary line length limit.
      
      * tools/virsh.c (vshOutputLogFile): Replace snprintf with
      virBuffer.
      f99e1389
    • E
      maint: rename virBufferVSprintf to virBufferAsprintf · 68ea80cf
      Eric Blake 提交于
      We already have virAsprintf, so picking a similar name helps for
      seeing a similar purpose.  Furthermore, the prefix V before printf
      generally implies 'va_list', even though this variant was '...', and
      the old name got in the way of adding a new va_list version.
      
      global rename performed with:
      
      $ git grep -l virBufferVSprintf \
        | xargs -L1 sed -i 's/virBufferVSprintf/virBufferAsprintf/g'
      
      then revert the changes in ChangeLog-old.
      68ea80cf
  25. 04 5月, 2011 1 次提交
    • E
      virsh: avoid null pointer dereference · 44699b32
      Eric Blake 提交于
      Clang detected that vol-download will call unlink(NULL) if there
      is a parse error during option parsing.  Also, mingw doesn't like
      unlinking an open file.
      
      * tools/virsh.c (cmdVolDownload): Only unlink file if created.
      44699b32
  26. 01 5月, 2011 1 次提交