]> xenbits.xensource.com Git - libvirt.git/commit
qemu: Add TLS support for Veritas HyperScale (VxHS)
authorAshish Mittal <Ashish.Mittal@veritas.com>
Wed, 30 Aug 2017 15:06:00 +0000 (11:06 -0400)
committerJohn Ferlan <jferlan@redhat.com>
Thu, 28 Sep 2017 13:45:14 +0000 (09:45 -0400)
commit6885b51e5f26f5c78b104c1f57e8e661416aaee8
treeca2c319530f52849c9d72f741f8ef01a86b4082c
parent5c09486c1ea65bc956c651d8a75d4d7fc8abece6
qemu: Add TLS support for Veritas HyperScale (VxHS)

Alter qemu command line generation in order to possibly add TLS for
a suitably configured domain.

Sample TLS args generated by libvirt -

    -object tls-creds-x509,id=objvirtio-disk0_tls0,dir=/etc/pki/qemu,\
    endpoint=client,verify-peer=yes \
    -drive file.driver=vxhs,file.tls-creds=objvirtio-disk0_tls0,\
    file.vdisk-id=eb90327c-8302-4725-9e1b-4e85ed4dc251,\
    file.server.type=tcp,file.server.host=192.168.0.1,\
    file.server.port=9999,format=raw,if=none,\
    id=drive-virtio-disk0,cache=none \
    -device virtio-blk-pci,bus=pci.0,addr=0x4,drive=drive-virtio-disk0,\
    id=virtio-disk0

Update the qemuxml2argvtest with a couple of examples. One for a
simple case and the other a bit more complex where multiple VxHS disks
are added where at least one uses a VxHS that doesn't require TLS
credentials and thus sets the domain disk source attribute "tls = 'no'".

Update the hotplug to be able to handle processing the tlsAlias whether
it's to add the TLS object when hotplugging a disk or to remove the TLS
object when hot unplugging a disk.  The hot plug/unplug code is largely
generic, but the addition code does make the VXHS specific checks only
because it needs to grab the correct config directory and generate the
object as the command line would do.

Signed-off-by: Ashish Mittal <Ashish.Mittal@veritas.com>
Signed-off-by: John Ferlan <jferlan@redhat.com>
src/qemu/qemu_block.c
src/qemu/qemu_command.c
src/qemu/qemu_hotplug.c
tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-tlsx509-vxhs.args [new file with mode: 0644]
tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-tlsx509-vxhs.xml
tests/qemuxml2argvtest.c
tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-drive-network-tlsx509-vxhs.xml