1. 14 7月, 2011 1 次提交
  2. 12 7月, 2011 2 次提交
  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. 29 6月, 2011 2 次提交
    • E
      build: avoid pod2man on tarball · f1fea71d
      Eric Blake 提交于
      virt-sanlock-cleanup.8 has static contents (no dependency on
      configure), but is generated by pod2man (a perl dependency that
      maintainers must have, but which ordinary tarball users need
      not have).  Therefore, ensure that it is always part of the
      tarball, even though it is only conditionally installed.
      
      This is similar to commit 6db98a2d, but made simpler by the fact
      that the .8 page is static content.
      
      * tools/Makefile.am (EXTRA_DIST): Add virt-sanlock-cleanup.8.
      f1fea71d
    • D
      Support automatic creation of leases for disks in sanlock · 97e4f217
      Daniel P. Berrange 提交于
      The current sanlock plugin requires a central management
      application to manually add <lease> elements to each guest,
      to protect resources that are assigned to it (eg writable
      disks). This makes the sanlock plugin useless for usage
      in more ad hoc deployment environments where there is no
      central authority to associate disks with leases.
      
      This patch adds a mode where the sanlock plugin will
      automatically create leases for each assigned read-write
      disk, using a md5 checksum of the fully qualified disk
      path. This can work pretty well if guests are using
      stable disk paths for block devices eg /dev/disk/by-path/XXXX
      symlinks, or if all hosts have NFS volumes mounted in
      a consistent pattern.
      
      The plugin will create one lockspace for managing disks
      with filename /var/lib/libvirt/sanlock/__LIBVIRT__DISKS__.
      For each VM disks, there will be another file to hold
      a lease /var/lib/libvirt/sanlock/5903e5d25e087e60a20fe4566fab41fd
      Each VM disk lease is usually 1 MB in size. The script
      virt-sanlock-cleanup should be run periodically to remove
      unused lease files from the lockspace directory.
      
      To make use of this capability the admin will need to do
      several tasks:
      
       - Mount an NFS volume (or other shared filesystem)
         on /var/lib/libvirt/sanlock
       - Configure 'host_id' in /etc/libvirt/qemu-sanlock.conf
         with a unique value for each host with the same NFS
         mount
       - Toggle the 'auto_disk_leases' parameter in qemu-sanlock.conf
      
      Technically the first step can be skipped, in which case
      sanlock will only protect against 2 vms on the same host
      using the same disk (or the same VM being started twice
      due to error by libvirt).
      
      * src/locking/libvirt_sanlock.aug,
        src/locking/sanlock.conf,
        src/locking/test_libvirt_sanlock.aug: Add config params
        for configuring auto lease setup
      * libvirt.spec.in: Add virt-sanlock-cleanup program, man
        page
      * tools/virt-sanlock-cleanup.in: Script to purge unused
        disk resource lease files
      97e4f217
  7. 28 6月, 2011 1 次提交
  8. 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
  9. 25 6月, 2011 2 次提交
  10. 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
  11. 23 6月, 2011 1 次提交
    • E
      maint: remove syntax-check exception · 50a6a126
      Eric Blake 提交于
      We weren't using the @FOO@ notation for a Makefile substitution,
      but instead for a sed rule, so using [@]FOO@ instead avoids the
      need to exempt this syntax check.
      
      * cfg.mk (_makefile_at_at_check_exceptions): Delete.
      * tools/Makefile.am (virt-xml-validate, virt-pki-validate): Avoid
      tripping syntax-check.
      Reported by Daniel P. Berrange.
      50a6a126
  12. 22 6月, 2011 1 次提交
  13. 21 6月, 2011 4 次提交
    • C
      Promote virEvent*Handle/Timeout to public API · 6094ad7b
      Cole Robinson 提交于
      Since we virEventRegisterDefaultImpl is now a public API, callers need
      a way to invoke the default registered Handle and Timeout functions. We
      already have general functions for these internally, so promote
      them to the public API.
      
      v2:
          Actually add APIs to libvirt.h
      6094ad7b
    • 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
  14. 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
  15. 17 6月, 2011 1 次提交
  16. 15 6月, 2011 6 次提交
  17. 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
  18. 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
  19. 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
  20. 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