1. 09 3月, 2012 1 次提交
    • O
      virsh: Use option alias for outmoded "--persistent" · 1e31b835
      Osier Yang 提交于
      Since VIR_DOMAIN_AFFECT_{LIVE,CONFIG,CURRENT} was created,
      all new virsh commands use "--config" to represents the
      persistent changing. This patch add "--config" option
      for the old commands which still use "--persistent",
      and "--persistent" is now alias of "--config".
      
      tools/virsh.c: (use "--config", and "--persistent" is
          alias of "--config" now).
          cmdDomIfSetLink, cmdDomIfGetLink, cmdAttachDevice,
          cmdDetachDevice, cmdUpdateDevice, cmdAttachInterface,
          cmdDetachInterface, cmdAttachDisk, cmdDetachDisk
      
      toos/virsh.pod: Update docs of the changed commands, and
          add some missed docs for "--config" (detach-interface,
          detach-disk, and detach-device).
      1e31b835
  2. 08 3月, 2012 5 次提交
    • E
      virsh: improve memory unit parsing · 210ed0e8
      Eric Blake 提交于
      The last vestige of the inaccurate 'kilobytes' when we meant 1024 is
      now gone.  And virsh is now useful for setting memory in units other
      than KiB.
      
      * tools/virsh.c (cmdSetmem, cmdSetmaxmem): Use new helper routine,
      allow passing bogus arguments on to hypervisor to test driver
      sanity checking, and fix leak on parse error.
      (vshMemtuneGetSize): New helper.
      (cmdMemtune): Use it.
      * tools/virsh.pod (setmem, setmaxmem, memtune): Document this.
      210ed0e8
    • E
      virsh: improve storage unit parsing · ab95da40
      Eric Blake 提交于
      Now can now do:
      
      virsh vol-resize $vol 10M
      virsh blockresize $dom $vol 10M
      
      to get both interfaces to resize to 10MiB.  The remaining wart
      is that vol-resize defaults to bytes, but blockresize defaults
      to KiB, but we can't break existing scripts; oh well, it's no
      worse than the same wart of the underlying virDomainBlockResize.
      
      The API for virStorageVolResize states that capacity must always
      be positive, and that the presence of shrink and delta flags is
      what implies a negative change.
      
      * tools/virsh.c (vshCommandOptScaledInt): New function.
      (cmdVolResize): Don't pass negative size.
      (cmdVolSize): Rename...
      (vshVolSize): ...and use new helper routine.
      (cmdBlockResize): Use new helper routine, and support new bytes
      flag.
      * tools/virsh.pod (NOTES): Document suffixes.
      (blockresize, vol-create-as, vol-resize): Point to notes.
      ab95da40
    • E
      virsh: add command aliases, and rename nodedev-detach · af3f9aab
      Eric Blake 提交于
      Just because our public API has a typo doesn't mean that virsh
      has to keep the typo.
      
      * tools/virsh.c (VSH_CMD_FLAG_ALIAS): New flag.
      (nodedevCmds): Use it.
      (cmdHelp): Omit alias commands.
      (cmdNodeDeviceDettach): Rename...
      (cmdNodeDeviceDetach): ...to this.
      * tools/virsh.pod (nodedev-detach): Document it.
      af3f9aab
    • E
      virsh: use option aliases · 3d150d32
      Eric Blake 提交于
      Command line interfaces should use dash, not underscore, as many
      keyboard layouts allow that to be typed with fewer shift key presses.
      
      Also, the US spelling of --tunneled gets more google hits than the
      UK spelling of --tunnelled.
      
      * tools/virsh.c (opts_migrate): Allow US variant.
      (opts_blkdeviotune): Prefer - over _.
      * tools/virsh.pod (blkdeviotune): Fix spelling.
      3d150d32
    • E
      virsh: add option aliases · 1c56b9fe
      Eric Blake 提交于
      In the past, we have created some virsh options with less-than-stellar
      names.  For back-compat reasons, those names must continue to parse,
      but we don't want to document them in help output.  This introduces
      a new option type, an alias, which points to a canonical option name
      later in the option list.
      
      I'm actually quite impressed that our code has already been factored
      to do all option parsing through common entry points, such that I
      got this added in relatively few lines of code!
      
      * tools/virsh.c (VSH_OT_ALIAS): New option type.
      (opts_echo): Hook up an alias, for easy testing.
      (vshCmddefOptParse, vshCmddefHelp, vshCmddefGetOption): Allow for
      aliases.
      * tools/virsh.pod (NOTES): Document promise of back-compat.
      * tests/virshtest.c (mymain): Test new feature.
      1c56b9fe
  3. 07 3月, 2012 1 次提交
  4. 01 3月, 2012 1 次提交
    • E
      virsh: expose partial pull · ff4c25ba
      Eric Blake 提交于
      Now virsh can call virDomainBlockRebase.
      
      * tools/virsh.c (cmdBlockPull): Add --base parameter.
      (blockJobImpl): Use it to expose BlockRebase API.
      * tools/virsh.pod (blockpull): Document it.
      ff4c25ba
  5. 29 2月, 2012 1 次提交
  6. 28 2月, 2012 2 次提交
  7. 27 2月, 2012 2 次提交
    • P
      virsh: add support for VIR_DOMAIN_CONSOLE_* flags · afa4336e
      Peter Krempa 提交于
      This patch adds support for the newly introduced
      VIR_DOMAIN_CONSOLE_FORCE and VIR_DOMAIN_CONSOLE_SAFE flags. The console
      command now has an optional parameter --force that specifies that the
      user wants to forcibly interrupt an ongoing console session and create
      a new one. Flag --safe requests that the console should be opened only
      if the hypervisor driver supports safe console handling.
      
      The behaviour to this point was that the daemon opened two streams to
      the console, that competed for data from the pipe, and the result was
      that both of the consoles ended up scrambled.
      
      This patch doesn't modify operation of other commands dealing with
      console connections (start, create) as those open connections to newly
      started domains making it virtually impossible for another client to race
      for the console and steal it.
      
      * tools/console.c:
              - add support for flag passthrough
      * tools/console.h:
              - modify function prototypes to match impl.
      * tools/virsh.c:
              - add flag --force for the console command
      afa4336e
    • M
      virsh: Expose virDomainPMWakeup · a04d10f7
      Michal Privoznik 提交于
      a04d10f7
  8. 23 2月, 2012 1 次提交
  9. 22 2月, 2012 1 次提交
    • P
      virsh: Enhance list command to ease creation of shell scripts · 419e5fb3
      Peter Krempa 提交于
      This patch adds new options to the "virsh list" command enabling
      filtering of persistent and transient domains along with the option to
      print only UUIDs or names of domains instead of printing the table.
      
      Option --name prints domain names (one per line) instead of the default
      table. Similarly --uuid prints domain's UUID. The option --table is
      an alias for the default behavior.
      
      Aditionally --persistent and/or --transient may be specified to filter
      the output of domains.
      419e5fb3
  10. 21 2月, 2012 1 次提交
    • P
      virsh: Fix docs for list command · c4c68b00
      Peter Krempa 提交于
      Commit fad5cd21 introduced option to
      display domain's title in the list command output. There was a mistake
      in the virsh man page example for this command stating --note instead of
      --title.
      c4c68b00
  11. 14 2月, 2012 1 次提交
    • E
      qemu: make block io tuning smarter · 172d3429
      Eric Blake 提交于
      When blkdeviotune was first committed in 0.9.8, we had the limitation
      that setting one value reset all others.  But bytes and iops should
      be relatively independent.  Furthermore, setting tuning values on
      a live domain followed by dumpxml did not output the new settings.
      
      * src/qemu/qemu_driver.c (qemuDiskPathToAlias): Add parameter, and
      update callers.
      (qemuDomainSetBlockIoTune): Don't lose previous unrelated
      settings.  Make live changes reflect to dumpxml output.
      * tools/virsh.pod (blkdeviotune): Update documentation.
      172d3429
  12. 13 2月, 2012 1 次提交
  13. 08 2月, 2012 1 次提交
  14. 04 2月, 2012 2 次提交
  15. 02 2月, 2012 1 次提交
    • P
      virsh: Add support for modifying domain description and titles · fad5cd21
      Peter Krempa 提交于
      This patch adds a new command "desc" to show and modify titles and
      description for the domains using the new API.
      
      This patch also adds a new flag for the "list" command to show titles in
      the domain list, to allow easy identification of VMs by storing a short
      description.
      
      Example:
      virsh # list --title
       Id Name                 State      Title
       -----------------------------------------------
         0 Domain-0             running    Mailserver 1
         2 fedora               paused
      fad5cd21
  16. 01 2月, 2012 1 次提交
  17. 28 1月, 2012 2 次提交
  18. 26 1月, 2012 2 次提交
    • M
      storage: Support different wiping algorithms · adb99a05
      Michal Privoznik 提交于
      Currently, we support only filling a volume with zeroes on wiping.
      However, it is not enough as data might still be readable by
      experienced and equipped attacker. Many technical papers have been
      written, therefore we should support other wiping algorithms.
      adb99a05
    • E
      docs: fix virsh man page · 7fb22418
      Eric Blake 提交于
      Typo introduced in commit 4e9953a4, and remained in 6fba577e.
      
      * tools/virsh.pod (snapshot-create): Fix pod error.
      7fb22418
  19. 25 1月, 2012 1 次提交
  20. 24 1月, 2012 1 次提交
  21. 21 1月, 2012 1 次提交
  22. 13 1月, 2012 1 次提交
    • O
      virsh: Two new fields for command domblklist · 5b407133
      Osier Yang 提交于
      Disk "type" and "device" are generally interesting stuff the
      user may want to known, too. To not break any scripts which
      parsed the output field, a new option "--details" is introduced
      to output the two introduced fields.
      5b407133
  23. 12 1月, 2012 2 次提交
  24. 11 1月, 2012 1 次提交
    • E
      snapshot: allow reuse of existing files in disk snapshot · 4e9953a4
      Eric Blake 提交于
      When disk snapshots were first implemented, libvirt blindly refused
      to allow an external snapshot destination that already exists, since
      qemu will blindly overwrite the contents of that file during the
      snapshot_blkdev monitor command, and we don't like a default of
      data loss by default.  But VDSM has a scenario where NFS permissions
      are intentionally set so that the destination file can only be
      created by the management machine, and not the machine where the
      guest is running, so that libvirt will necessarily see the destination
      file already existing; adding a flag will allow VDSM to force the file
      reuse without libvirt complaining of possible data loss.
      
      https://bugzilla.redhat.com/show_bug.cgi?id=767104
      
      * include/libvirt/libvirt.h.in (virDomainSnapshotCreateFlags): Add
      VIR_DOMAIN_SNAPSHOT_CREATE_REUSE_EXT.
      * src/libvirt.c (virDomainSnapshotCreateXML): Document it.  Add
      note about partial failure.
      * tools/virsh.c (cmdSnapshotCreate, cmdSnapshotCreateAs): Add new
      flag.
      * tools/virsh.pod (snapshot-create, snapshot-create-as): Document
      it.
      * src/qemu/qemu_driver.c (qemuDomainSnapshotDiskPrepare)
      (qemuDomainSnapshotCreateXML): Implement the new flag.
      4e9953a4
  25. 29 12月, 2011 1 次提交
  26. 26 12月, 2011 2 次提交
  27. 22 12月, 2011 3 次提交