libvirt/tests/storagevolxml2xmlin
Daniel P. Berrange a48c714115 storage: remove "luks" storage volume type
The current LUKS support has a "luks" volume type which has
a "luks" encryption format.

This partially makes sense if you consider the QEMU shorthand
syntax only requires you to specify a format=luks, and it'll
automagically uses "raw" as the next level driver. QEMU will
however let you override the "raw" with any other driver it
supports (vmdk, qcow, rbd, iscsi, etc, etc)

IOW the intention though is that the "luks" encryption format
is applied to all disk formats (whether raw, qcow2, rbd, gluster
or whatever). As such it doesn't make much sense for libvirt
to say the volume type is "luks" - we should be saying that it
is a "raw" file, but with "luks" encryption applied.

IOW, when creating a storage volume we should use this XML

  <volume>
    <name>demo.raw</name>
    <capacity>5368709120</capacity>
    <target>
      <format type='raw'/>
      <encryption format='luks'>
        <secret type='passphrase' uuid='0a81f5b2-8403-7b23-c8d6-21ccd2f80d6f'/>
      </encryption>
    </target>
  </volume>

and when configuring a guest disk we should use

  <disk type='file' device='disk'>
    <driver name='qemu' type='raw'/>
    <source file='/home/berrange/VirtualMachines/demo.raw'/>
    <target dev='sda' bus='scsi'/>
    <encryption format='luks'>
      <secret type='passphrase' uuid='0a81f5b2-8403-7b23-c8d6-21ccd2f80d6f'/>
    </encryption>
  </disk>

This commit thus removes the "luks" storage volume type added
in

  commit 318ebb36f1
  Author: John Ferlan <jferlan@redhat.com>
  Date:   Tue Jun 21 12:59:54 2016 -0400

    util: Add 'luks' to the FileTypeInfo

The storage file probing code is modified so that it can probe
the actual encryption formats explicitly, rather than merely
probing existance of encryption and letting the storage driver
guess the format.

The rest of the code is then adapted to deal with
VIR_STORAGE_FILE_RAW w/ VIR_STORAGE_ENCRYPTION_FORMAT_LUKS
instead of just VIR_STORAGE_FILE_LUKS.

The commit mentioned above was included in libvirt v2.0.0.
So when querying volume XML this will be a change in behaviour
vs the 2.0.0 release - it'll report 'raw' instead of 'luks'
for the volume format, but still report 'luks' for encryption
format.  I think this change is OK because the storage driver
did not include any support for creating volumes, nor starting
guets with luks volumes in v2.0.0 - that only since then.
Clearly if we change this we must do it before v2.1.0 though.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2016-07-27 18:59:15 +01:00
..
vol-file-backing.xml storage: allow interleave in volume XML 2013-11-25 07:51:14 -07:00
vol-file-naming.xml storage: use valid XML for awkward volume names 2013-11-21 17:29:47 -07:00
vol-file.xml Added timestamps to storage volumes 2012-08-02 17:14:17 -06:00
vol-gluster-dir-neg-uid.xml storage: unify permission formatting 2014-12-16 15:47:56 +01:00
vol-gluster-dir.xml storage: improve directory support in gluster pool 2013-11-25 12:46:19 -07:00
vol-logical-backing.xml storage: expose volume meta-type in XML 2013-11-25 10:55:19 -07:00
vol-logical.xml storage: expose volume meta-type in XML 2013-11-25 10:55:19 -07:00
vol-luks-cipher.xml storage: remove "luks" storage volume type 2016-07-27 18:59:15 +01:00
vol-luks.xml storage: remove "luks" storage volume type 2016-07-27 18:59:15 +01:00
vol-partition.xml storage: expose volume meta-type in XML 2013-11-25 10:55:19 -07:00
vol-qcow2-0.10-lazy.xml Move volume XMLs out of storagevolxml2argvdata 2013-07-25 13:26:41 +02:00
vol-qcow2-1.1.xml Move volume XMLs out of storagevolxml2argvdata 2013-07-25 13:26:41 +02:00
vol-qcow2-lazy.xml Move volume XMLs out of storagevolxml2argvdata 2013-07-25 13:26:41 +02:00
vol-qcow2-nobacking.xml Move volume XMLs out of storagevolxml2argvdata 2013-07-25 13:26:41 +02:00
vol-qcow2-nocapacity-backing.xml Allow creating volumes with a backing store but no capacity 2015-03-02 08:07:11 +01:00
vol-qcow2-nocapacity.xml Allow cloning volumes with no capacity specified 2015-03-02 08:07:11 +01:00
vol-qcow2-nocow.xml add nocow test case 2014-07-16 13:35:26 +02:00
vol-qcow2-zerocapacity.xml tests: add vol-qcow2-zerocapacity test to storagevolxml2argvtest 2015-07-24 11:23:45 -04:00
vol-qcow2.xml Move volume XMLs out of storagevolxml2argvdata 2013-07-25 13:26:41 +02:00
vol-sheepdog.xml storage: expose volume meta-type in XML 2013-11-25 10:55:19 -07:00