1. 23 9月, 2016 4 次提交
  2. 13 9月, 2016 4 次提交
  3. 06 9月, 2016 11 次提交
  4. 05 8月, 2016 1 次提交
  5. 27 7月, 2016 1 次提交
  6. 26 7月, 2016 1 次提交
    • D
      block: export LUKS specific data to qemu-img info · c7c4cf49
      Daniel P. Berrange 提交于
      The qemu-img info command has the ability to expose format
      specific metadata about volumes. Wire up this facility for
      the LUKS driver to report on cipher configuration and key
      slot usage.
      
          $ qemu-img info ~/VirtualMachines/demo.luks
          image: /home/berrange/VirtualMachines/demo.luks
          file format: luks
          virtual size: 98M (102760448 bytes)
          disk size: 100M
          encrypted: yes
          Format specific information:
              ivgen alg: plain64
              hash alg: sha1
              cipher alg: aes-128
              uuid: 6ddee74b-3a22-408c-8909-6789d4fa2594
              cipher mode: xts
              slots:
                  [0]:
                      active: true
                      iters: 572706
                      key offset: 4096
                      stripes: 4000
                  [1]:
                      active: false
                      key offset: 135168
                  [2]:
                      active: false
                      key offset: 266240
                  [3]:
                      active: false
                      key offset: 397312
                  [4]:
                      active: false
                      key offset: 528384
                  [5]:
                      active: false
                      key offset: 659456
                  [6]:
                      active: false
                      key offset: 790528
                  [7]:
                      active: false
                      key offset: 921600
              payload offset: 2097152
              master key iters: 142375
      
      One somewhat undesirable artifact is that the data fields are
      printed out in (apparently) random order. This will be addressed
      later by changing the way the block layer pretty-prints the
      image specific data.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      Message-id: 1469192015-16487-3-git-send-email-berrange@redhat.com
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Signed-off-by: NMax Reitz <mreitz@redhat.com>
      c7c4cf49
  7. 20 7月, 2016 2 次提交
    • P
      block/gluster: add support for multiple gluster servers · 6c7189bb
      Prasanna Kumar Kalever 提交于
      This patch adds a way to specify multiple volfile servers to the gluster
      block backend of QEMU with tcp|rdma transport types and their port numbers.
      
      Problem:
      
      Currently VM Image on gluster volume is specified like this:
      
      file=gluster[+tcp]://host[:port]/testvol/a.img
      
      Say we have three hosts in a trusted pool with replica 3 volume in action.
      When the host mentioned in the command above goes down for some reason,
      the other two hosts are still available. But there's currently no way
      to tell QEMU about them.
      
      Solution:
      
      New way of specifying VM Image on gluster volume with volfile servers:
      (We still support old syntax to maintain backward compatibility)
      
      Basic command line syntax looks like:
      
      Pattern I:
       -drive driver=gluster,
              volume=testvol,path=/path/a.raw,[debug=N,]
              server.0.type=tcp,
              server.0.host=1.2.3.4,
              server.0.port=24007,
              server.1.type=unix,
              server.1.socket=/path/socketfile
      
      Pattern II:
       'json:{"driver":"qcow2","file":{"driver":"gluster",
             "volume":"testvol","path":"/path/a.qcow2",["debug":N,]
             "server":[{hostinfo_1}, ...{hostinfo_N}]}}'
      
         driver      => 'gluster' (protocol name)
         volume      => name of gluster volume where our VM image resides
         path        => absolute path of image in gluster volume
        [debug]      => libgfapi loglevel [(0 - 9) default 4 -> Error]
      
        {hostinfo}   => {{type:"tcp",host:"1.2.3.4"[,port=24007]},
                         {type:"unix",socket:"/path/sockfile"}}
      
         type        => transport type used to connect to gluster management daemon,
                        it can be tcp|unix
         host        => host address (hostname/ipv4/ipv6 addresses/socket path)
         port        => port number on which glusterd is listening.
         socket      => path to socket file
      
      Examples:
      1.
       -drive driver=qcow2,file.driver=gluster,
              file.volume=testvol,file.path=/path/a.qcow2,file.debug=9,
              file.server.0.type=tcp,
              file.server.0.host=1.2.3.4,
              file.server.0.port=24007,
              file.server.1.type=unix,
              file.server.1.socket=/var/run/glusterd.socket
      2.
        'json:{"driver":"qcow2","file":{"driver":"gluster","volume":"testvol",
               "path":"/path/a.qcow2","debug":9,"server":
               [{"type":"tcp","host":"1.2.3.4","port":"24007"},
                {"type":"unix","socket":"/var/run/glusterd.socket"}
               ]}}'
      
      This patch gives a mechanism to provide all the server addresses, which are in
      replica set, so in case host1 is down VM can still boot from any of the
      active hosts.
      
      This is equivalent to the backup-volfile-servers option supported by
      mount.glusterfs (FUSE way of mounting gluster volume)
      
      credits: sincere thanks to all the supporters
      Signed-off-by: NPrasanna Kumar Kalever <prasanna.kalever@redhat.com>
      Reviewed-by: NMarkus Armbruster <armbru@redhat.com>
      Message-id: 1468947453-5433-6-git-send-email-prasanna.kalever@redhat.com
      Signed-off-by: NJeff Cody <jcody@redhat.com>
      6c7189bb
    • P
      block/gluster: using new qapi schema · 7edac2dd
      Prasanna Kumar Kalever 提交于
      this patch adds 'GlusterServer' related schema in qapi/block-core.json
      
      [Jeff: minor fix-ups of comments and formatting, per patch reviews]
      Signed-off-by: NPrasanna Kumar Kalever <prasanna.kalever@redhat.com>
      Reviewed-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Message-id: 1468947453-5433-5-git-send-email-prasanna.kalever@redhat.com
      Signed-off-by: NJeff Cody <jcody@redhat.com>
      7edac2dd
  8. 19 7月, 2016 2 次提交
  9. 13 7月, 2016 7 次提交
  10. 05 7月, 2016 1 次提交
    • E
      blkdebug: Set request_alignment during .bdrv_refresh_limits() · 835db3ee
      Eric Blake 提交于
      We want to eventually stick request_alignment alongside other
      BlockLimits, but first, we must ensure it is populated at the
      same time as all other limits, rather than being a special case
      that is set only when a block is first opened.
      
      Note that when the user does not provide "align", then we were
      defaulting to bs->request_alignment - but at this stage in the
      initialization, that was always 512.  We were also rejecting an
      explicit "align":0 from the user; this patch now allows that,
      as an explicit request for the default alignment (which may not
      always be 512 in the future).
      
      qemu-iotests 77 is particularly sensitive to the fact that we
      can specify an artificial alignment override in blkdebug, and
      that override must continue to work even when limits are
      refreshed on an already open device.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Reviewed-by: NFam Zheng <famz@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      835db3ee
  11. 12 5月, 2016 1 次提交
  12. 30 3月, 2016 2 次提交
    • D
      block: add generic full disk encryption driver · 78368575
      Daniel P. Berrange 提交于
      Add a block driver that is capable of supporting any full disk
      encryption format. This utilizes the previously added block
      encryption code, and at this time supports the LUKS format.
      
      The driver code is capable of supporting any format supported
      by the QCryptoBlock module, so it registers one block driver
      for each format. This patch only registers the "luks" driver
      since the "qcow" driver is there only for back-compatibility
      with existing qcow built-in encryption.
      
      New LUKS compatible volumes can be formatted using qemu-img
      with defaults for all settings.
      
      $ qemu-img create --object secret,data=123456,id=sec0 \
            -f luks -o key-secret=sec0 demo.luks 10G
      
      Alternatively the cryptographic settings can be explicitly
      set
      
      $ qemu-img create --object secret,data=123456,id=sec0 \
            -f luks -o key-secret=sec0,cipher-alg=aes-256,\
                       cipher-mode=cbc,ivgen-alg=plain64,hash-alg=sha256 \
            demo.luks 10G
      
      And query its size
      
      $ qemu-img info demo.img
      image: demo.img
      file format: luks
      virtual size: 10G (10737418240 bytes)
      disk size: 132K
      encrypted: yes
      
      Note that it was not necessary to provide the password
      when querying info for the volume. The password is only
      required when performing I/O on the volume
      
      All volumes created by this new 'luks' driver should be
      capable of being opened by the kernel dm-crypt driver.
      
      The only algorithms listed in the LUKS spec that are
      not currently supported by this impl are sha512 and
      ripemd160 hashes and cast6 cipher.
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      [ kwolf - Added #include to resolve conflict with da34e65c ]
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      78368575
    • K
      block: Remove cache.writeback from blockdev-add · aaa436f9
      Kevin Wolf 提交于
      The WCE bit is a frontend property and should not be part of the backend
      configuration. This is especially important because the same BDS can be
      used by different users with different WCE requirements.
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      aaa436f9
  13. 18 3月, 2016 1 次提交
    • E
      qapi: Use anonymous bases in QMP flat unions · 3666a97f
      Eric Blake 提交于
      Now that the generator supports it, we might as well use an
      anonymous base rather than breaking out a single-use Base
      structure, for all three of our current QMP flat unions.
      
      Oddly enough, this change does not affect the resulting
      introspection output (because we already inline the members of
      a base type into an object, and had no independent use of the
      base type reachable from a command).
      
      The case_whitelist now has to list the name of an implicit
      type; which is not too bad (consider it a feature if it makes
      it harder for developers to make the whitelist grow :)
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Message-Id: <1458254921-17042-16-git-send-email-eblake@redhat.com>
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      3666a97f
  14. 22 2月, 2016 2 次提交