1. 12 6月, 2014 3 次提交
    • P
      virsh: Reject negative numbers in vshCommandOptUL · 0e2d7305
      Peter Krempa 提交于
      To follow the new semantics of the vshCommandOptToU* functions convert
      this one to reject negative numbers too. To allow using -1 for "maximum"
      semantics for the two bandwidth functions that use this helper introduce
      vshCommandOptULWrap. Although currently the migrate-setspeed function
      for the qemu driver will reject -1 as maximum.
      0e2d7305
    • P
      virsh: Reject negative numbers in vshCommandOptUInt · 37e663ad
      Peter Krempa 提交于
      Use virStrToLong_uip instead of virStrToLong_ui to reject negative
      numbers in the helper. None of the callers expects the wraparound
      "feature" for negative numbers.
      
      Also add a function that allows wrapping of negative numbers as it might
      be used in the future and be explicit about the new semantics in the
      function docs.
      37e663ad
    • R
      virsh: include bhyve in virsh -V output · aec0c6d3
      Roman Bogorodskiy 提交于
      Add 'Bhyve' in hypervisor list reported by 'virsh -V'
      if it's compiled it.
      aec0c6d3
  2. 11 6月, 2014 2 次提交
    • C
      virsh: Add details about specified migration host · c85b09cd
      Chen Fan 提交于
      the 'migration_host' description may be a bit difficult to
      understand for some users, so enhance the manual
      Signed-off-by: NChen Fan <chen.fan.fnst@cn.fujitsu.com>
      Signed-off-by: NEric Blake <eblake@redhat.com>
      c85b09cd
    • E
      blockcommit: document semantics of committing active layer · b2980250
      Eric Blake 提交于
      Now that qemu 2.0 allows commit of the active layer, people are
      attempting to use virsh blockcommit and getting into a stuck
      state, because libvirt is unprepared to handle the two-phase
      commit required by qemu.
      
      Stepping back a bit, there are two valid semantics for a
      commit operation:
      
      1. Maintain a 'golden' base, and a transient overlay. Make
      changes in the overlay, and if everything appears to work,
      commit those changes into the base, but still keep the overlay
      for the next round of changes; repeat the cycle as desired.
      
      2. Create an external snapshot, then back up the stable state
      in the backing file. Once the backup is complete, commit the
      overlay back into the base, and delete the temporary snapshot.
      
      Since qemu doesn't know up front which of the two styles is
      preferred, a block commit of the active layer merely gets
      the job into a synchronized state, and sends an event; then
      the user must either cancel (case 1) or complete (case 2),
      where qemu then sends a second event that actually ends the
      job.  However, until commit e6bcbcd3, libvirt was blindly
      assuming the semantics that apply to a commit of an
      intermediate image, where there is only one sane conclusion
      (the job automatically ends with fewer elements in the chain);
      and getting stuck because it wasn't prepared for qemu to enter
      a second phase of the job.
      
      This patch adds a flag to the libvirt API that a user MUST
      supply in order to acknowledge that they will be using two-phase
      semantics.  It might be possible to have a mode where if the
      flag is omitted, we automatically do the case 2 semantics on
      the user's behalf; but before that happens, I must do additional
      patches to track the fact that we are doing an active commit
      in the domain XML.  Later patches will add support of the flag,
      and once 2-phase semantics are working, we can then decide
      whether to relax things to allow an omitted flag to cause an
      automatic pivot.
      
      * include/libvirt/libvirt.h.in (VIR_DOMAIN_BLOCK_COMMIT_ACTIVE)
      (VIR_DOMAIN_BLOCK_JOB_TYPE_ACTIVE_COMMIT): New enums.
      * src/libvirt.c (virDomainBlockCommit): Document two-phase job
      when committing active layer, through new flag.
      (virDomainBlockJobAbort): Document that pivot also occurs after
      active commit.
      * tools/virsh-domain.c (vshDomainBlockJob): Cover new job.
      * src/qemu/qemu_driver.c (qemuDomainBlockCommit): Explicitly
      reject active copy; later patches will add it in.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      b2980250
  3. 06 6月, 2014 3 次提交
  4. 03 6月, 2014 1 次提交
    • M
      virsh-nodedev: Avoid spurious errors · 289a3163
      Michal Privoznik 提交于
      Our public free functions explicitly don't accept NULL pointers
      (sigh). Therefore, callers must do something like this:
      
          if (dev)
              virNodeDeviceFree(dev);
      
      And we are not doing that on two places I've found. This leads to
      dummy error message thrown by virsh:
      
          virsh # nodedev-dumpxml nonexistent-device
          error: Could not find matching device 'nonexistent-device'
          error: invalid node device pointer in virNodeDeviceFree
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      289a3163
  5. 02 6月, 2014 1 次提交
    • P
      virsh: Check whether found volume is member of the specified storage pool · 6ef0b034
      Peter Krempa 提交于
      When looking up storage volumes virsh uses multiple lookup steps. Some
      of the steps don't require a pool name specified. This resulted into a
      possibility that a volume would be part of a different pool than the
      user specified:
      
      Let's have a /var/lib/libvirt/images/test.qcow image in the 'default'
      pool and a second pool 'emptypool':
      
      Currently we'd return:
        $ virsh vol-info --pool emptypool /var/lib/libvirt/images/test.qcow
        Name:           test.qcow
        Type:           file
        Capacity:       100.00 MiB
        Allocation:     212.00 KiB
      
      After the fix:
       $ tools/virsh vol-info --pool emptypool /var/lib/libvirt/images/test.qcow
       error: Requested volume '/var/lib/libvirt/images/test.qcow' is not in pool 'emptypool'
      
      Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1088667
      6ef0b034
  6. 29 5月, 2014 1 次提交
  7. 20 5月, 2014 1 次提交
  8. 16 5月, 2014 1 次提交
    • E
      maint: shorten 'TypeType' function names · ab517818
      Eric Blake 提交于
      The VIR_ENUM_DECL/VIR_ENUM_IMPL helper macros already append 'Type'
      to the enum name being converted; it looks silly to have functions
      with 'TypeType' in their name.  Even though some of our enums have
      to have a 'Type' suffix, the corresponding string conversion
      functions do not.
      
      * src/conf/secret_conf.h (VIR_ENUM_DECL): Rename virSecretUsageType.
      * src/conf/storage_conf.h (VIR_ENUM_DECL): Rename
      virStoragePoolAuthType, virStoragePoolSourceAdapterType,
      virStoragePartedFsType.
      * src/conf/domain_conf.c (virDomainDiskDefParseXML)
      (virDomainFSDefParseXML, virDomainFSDefFormat): Update callers.
      * src/conf/secret_conf.c (virSecretDefParseUsage)
      (virSecretDefFormatUsage): Likewise.
      * src/conf/storage_conf.c (virStoragePoolDefParseAuth)
      (virStoragePoolDefParseSource, virStoragePoolSourceFormat):
      Likewise.
      * src/lxc/lxc_controller.c (virLXCControllerSetupLoopDevices):
      Likewise.
      * src/storage/storage_backend_disk.c
      (virStorageBackendDiskPartFormat): Likewise.
      * src/util/virstorageencryption.c (virStorageEncryptionSecretParse)
      (virStorageEncryptionSecretFormat): Likewise.
      * tools/virsh-secret.c (cmdSecretList): Likewise.
      * src/libvirt_private.syms (secret_conf.h, storage_conf.h): Export
      corrected names.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      ab517818
  9. 15 5月, 2014 3 次提交
  10. 13 5月, 2014 2 次提交
  11. 06 5月, 2014 2 次提交
  12. 25 4月, 2014 1 次提交
  13. 23 4月, 2014 1 次提交
  14. 22 4月, 2014 1 次提交
  15. 09 4月, 2014 1 次提交
  16. 07 4月, 2014 1 次提交
  17. 03 4月, 2014 1 次提交
    • L
      virsh: Make 'exit' action same as 'quit' · cc7e1503
      Li Yang 提交于
      For now 'virsh quit' action like this:
      --------------------------------
      [root@localhost /]# virsh quit
      [root@localhost /]#
      --------------------------------
      And 'virsh exit' action:
      --------------------------------
      [root@localhost /]# virsh exit
      
      [root@localhost /]#
      --------------------------------
      There is a small difference('/n') between them.
      According to manual said:
             quit, exit
                 quit this interactive terminal
      
      And in the code they all called cmdQuit func,
      They should get same actions.
      Signed-off-by: NLi Yang <liyang.fnst@cn.fujitsu.com>
      cc7e1503
  18. 02 4月, 2014 2 次提交
    • S
      34a43163
    • E
      conf: move storage source type to util/ · 8a20e227
      Eric Blake 提交于
      With this patch, all information related to a host resource in
      a storage file backing chain now lives in util/virstoragefile.h.
      The next step will be to consolidate various places that have
      been tracking backing chain details to all use a common struct.
      
      The changes to tools/Makefile.am were made necessary by the
      fact that virstorageencryption includes uses of libxml, and is
      now pulled in by inclusion from virstoragefile.h.  No
      additional libraries are linked into the final image, and in
      comparison, the build of the setuid library in src/Makefile.am
      already was using LIBXML_CFLAGS via AM_CFLAGS.
      
      * src/conf/domain_conf.h (virDomainDiskSourceDef): Move...
      * src/util/virstoragefile.h (virStorageSource): ...and rename.
      * src/conf/domain_conf.c (virDomainDiskSourceDefClear)
      (virDomainDiskAuthClear): Adjust clients.
      * tools/Makefile.am (virt_login_shell_CFLAGS)
      (virt_host_validate_CFLAGS): Add libxml headers.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      8a20e227
  19. 31 3月, 2014 2 次提交
  20. 27 3月, 2014 1 次提交
  21. 25 3月, 2014 2 次提交
  22. 21 3月, 2014 3 次提交
    • C
      libvirt support to force convergence of live guest migration · 05e1b06a
      Chegu Vinod 提交于
      Busy enterprise workloads hosted on large sized VM's tend to dirty
      memory faster than the transfer rate achieved via live guest migration.
      Despite some good recent improvements (& using dedicated 10Gig NICs
      between hosts) the live migration may NOT converge.
      
      Recently support was added in qemu (version 1.6) to allow a user to
      choose if they wish to force convergence of their migration via a
      new migration capability : "auto-converge". This feature allows for qemu
      to auto-detect lack of convergence and trigger a throttle-down of the
      VCPUs.
      
      This patch includes the libvirt support needed to trigger this
      feature. (Testing is in progress)
      Signed-off-by: NChegu Vinod <chegu_vinod@hp.com>
      Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      05e1b06a
    • E
      qemu: allow filtering events by regex · 43b17dd4
      Eric Blake 提交于
      When listening for a subset of monitor events, it can be tedious
      to register for each event name in series; nicer is to register
      for multiple events in one go.  Implement a flag to use regex
      interpretation of the event filter.
      
      While at it, prove how much I hate the shift key, by adding a
      way to filter for 'shutdown' instead of 'SHUTDOWN'. :)
      
      * include/libvirt/libvirt-qemu.h
      (virConnectDomainQemuMonitorEventRegisterFlags): New enum.
      * src/libvirt-qemu.c (virConnectDomainQemuMonitorEventRegister):
      Document flags.
      * tools/virsh-domain.c (cmdQemuMonitorEvent): Expose them.
      * tools/virsh.pod (qemu-monitor-event): Document this.
      * src/conf/domain_event.c
      (virDomainQemuMonitorEventStateRegisterID): Add flags.
      (virDomainQemuMonitorEventFilter): Handle regex, and optimize
      client side.
      (virDomainQemuMonitorEventCleanup): Clean up regex.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      43b17dd4
    • E
      qemu: virsh wrapper for qemu events · 88996de1
      Eric Blake 提交于
      Any new API deserves a good virsh wrapper :)
      
          qemu-monitor-event [<domain>] [<event>] [--pretty] [--loop] [--timeout <number>]
      
      Very similar to the previous work on 'virsh event'.  For an
      example session:
      
      $ virsh -c qemu:///system qemu-monitor-event --event SHUTDOWN&
      $ virsh -c qemu:///system start f18-live
      Domain f18-live started
      
      $ virsh -c qemu:///system destroy f18-live
      Domain f18-live destroyed
      
      event SHUTDOWN at 1391212552.026544 for domain f18-live: (null)
      events received: 1
      
      [1]+  Done                    virsh -c qemu:///system qemu-monitor-event --event SHUTDOWN
      $
      
      * tools/virsh-domain.c (cmdQemuMonitorEvent): New command.
      * tools/virsh.pod (qemu-monitor-event): Document it.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      88996de1
  23. 19 3月, 2014 1 次提交
  24. 18 3月, 2014 3 次提交