1. 03 Nov, 2014 4 commits
  2. 22 Aug, 2014 2 commits
    • Max Reitz's avatar
      qemu-img: Allow cache mode specification for amend · bd39e6ed
      Max Reitz authored
      qemu-img amend may extensively modify the target image, depending on the
      options to be amended (e.g. conversion to qcow2 compat level 0.10 from
      1.1 for an image with many unallocated zero clusters). Therefore it
      makes sense to allow the user to specify the cache mode to be used.
      Signed-off-by: default avatarMax Reitz <mreitz@redhat.com>
      Reviewed-by: default avatarEric Blake <eblake@redhat.com>
      Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
      bd39e6ed
    • Max Reitz's avatar
      qemu-img: Allow source cache mode specification · 40055951
      Max Reitz authored
      Many qemu-img subcommands only read the source file(s) once. For these
      use cases, a full write-back cache is unnecessary and mainly clutters
      host cache memory. Though this is generally no concern as cache memory
      is freely available and can be scaled by the host OS, it may become a
      concern with thin provisioning.
      
      For these cases, it makes sense to allow users to freely specify the
      source cache mode (e.g. use no cache at all).
      
      This commit adds a new switch (-T) for the qemu-img subcommands check,
      compare, convert and rebase to specify the cache to be used for source
      images (the backing file in case of rebase).
      Signed-off-by: default avatarMax Reitz <mreitz@redhat.com>
      Reviewed-by: default avatarEric Blake <eblake@redhat.com>
      Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
      40055951
  3. 04 Dec, 2013 1 commit
  4. 12 Sep, 2013 1 commit
  5. 06 Sep, 2013 2 commits
  6. 22 Feb, 2013 3 commits
  7. 24 Oct, 2012 1 commit
  8. 12 Sep, 2012 1 commit
    • Benoît Canet's avatar
      qemu-img: Add json output option to the info command. · c054b3fd
      Benoît Canet authored
      This option --output=[human|json] make qemu-img info output on
      human or JSON representation at the choice of the user.
      
      example:
      {
          "snapshots": [
              {
                  "vm-clock-nsec": 637102488,
                  "name": "vm-20120821145509",
                  "date-sec": 1345553709,
                  "date-nsec": 220289000,
                  "vm-clock-sec": 20,
                  "id": "1",
                  "vm-state-size": 96522745
              },
              {
                  "vm-clock-nsec": 28210866,
                  "name": "vm-20120821154059",
                  "date-sec": 1345556459,
                  "date-nsec": 171392000,
                  "vm-clock-sec": 46,
                  "id": "2",
                  "vm-state-size": 101208714
              }
          ],
          "virtual-size": 1073741824,
          "filename": "snap.qcow2",
          "cluster-size": 65536,
          "format": "qcow2",
          "actual-size": 985587712,
          "dirty-flag": false
      }
      Signed-off-by: default avatarBenoit Canet <benoit@irqsave.net>
      Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
      c054b3fd
  9. 15 Jun, 2012 1 commit
    • Kevin Wolf's avatar
      qemu-img check -r for repairing images · 4534ff54
      Kevin Wolf authored
      The QED block driver already provides the functionality to not only
      detect inconsistencies in images, but also fix them. However, this
      functionality cannot be manually invoked with qemu-img, but the
      check happens only automatically during bdrv_open().
      
      This adds a -r switch to qemu-img check that allows manual invocation
      of an image repair.
      Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
      4534ff54
  10. 15 Dec, 2011 1 commit
  11. 29 Aug, 2011 1 commit
    • Kevin Wolf's avatar
      qemu-img: Require larger zero areas for sparse handling · a22f123c
      Kevin Wolf authored
      By default, require 4k of consecutive zero bytes for qemu-img to make the
      output file sparse by not issuing a write request for the zeroed parts. Add an
      -S option to allow users to tune this setting.
      
      This helps to avoid situations where a lot of zero sectors and data sectors are
      mixed and qemu-img tended to issue many tiny 512 byte writes.
      Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
      a22f123c
  12. 20 Jul, 2011 1 commit
  13. 05 Jul, 2011 1 commit
    • Federico Simoncelli's avatar
      qemu-img: Add cache command line option · 661a0f71
      Federico Simoncelli authored
      qemu-img currently writes disk images using writeback and filling
      up the cache buffers which are then flushed by the kernel preventing
      other processes from accessing the storage.
      This is particularly bad in cluster environments where time-based
      algorithms might be in place and accessing the storage within
      certain timeouts is critical.
      This patch adds the option to choose a cache method when writing
      disk images.
      Signed-off-by: default avatarFederico Simoncelli <fsimonce@redhat.com>
      Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
      661a0f71
  14. 07 Apr, 2011 1 commit
  15. 22 Oct, 2010 1 commit
    • edison's avatar
      Copy snapshots out of QCOW2 disk · 51ef6727
      edison authored
      In order to backup snapshots, created from QCOW2 iamge, we want to copy snapshots out of QCOW2 disk to a seperate storage.
      The following patch adds a new option in "qemu-img": qemu-img convert -f qcow2 -O qcow2 -s snapshot_name src_img bck_img.
      Right now, it only supports to copy the full snapshot, delta snapshot is on the way.
      
      Changes from V1: all the comments from Kevin are addressed:
      Add read-only checking
      Fix coding style
      Change the name from bdrv_snapshot_load to bdrv_snapshot_load_tmp
      Signed-off-by: default avatarDisheng Su <edison@cloud.com>
      Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
      51ef6727
  16. 13 Jul, 2010 1 commit
  17. 22 May, 2010 1 commit
  18. 03 May, 2010 1 commit
  19. 14 Mar, 2010 1 commit
  20. 13 Jan, 2010 1 commit
    • Kevin Wolf's avatar
      qemu-img rebase · 3e85c6fd
      Kevin Wolf authored
      This adds a rebase subcommand to qemu-img which allows to change the backing
      file of an image.
      
      In default mode, both the current and the new backing file need to exist, and
      after the rebase, the COW image is guaranteed to have the same guest visible
      content as before. To achieve this, old and new backing file are compared and,
      if necessary, data is copied from the old backing file into the COW image.
      
      With -u an unsafe mode is enabled that doesn't require the backing files to
      exist. It merely changes the backing file reference in the COW image. This is
      useful for renaming or moving the backing file. The user is responsible to make
      sure that the new backing file has no changes compared to the old one, or
      corruption may occur.
      Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
      Signed-off-by: default avatarAnthony Liguori <aliguori@us.ibm.com>
      3e85c6fd
  21. 09 Nov, 2009 1 commit
  22. 07 Jun, 2009 1 commit