From 82ba41108acd0f3fc99f62effc7422a1e1e7c944 Mon Sep 17 00:00:00 2001 From: Peter Krempa Date: Mon, 2 May 2016 14:47:18 +0200 Subject: [PATCH] qemu: Support for iSCSI direct mapped volumes Commit c820fbff9fbfe1f2549a5b60967496587f8d8bfc added support for iSCSI disk as backing for . We would not use it for a disk type="volume" with direct access mode which basically maps to direct iSCSI usage. Fix it by adding the storage source type accessor that resolves the volume type. --- src/qemu/qemu_command.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 2966b07a1c..b45ee0d4d6 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -971,7 +971,8 @@ qemuCheckDiskConfig(virDomainDiskDefPtr disk) virDomainDiskQEMUBusTypeToString(disk->bus)); goto error; } - if (disk->src->type == VIR_STORAGE_TYPE_NETWORK) { + + if (virStorageSourceGetActualType(disk->src) == VIR_STORAGE_TYPE_NETWORK) { if (disk->src->protocol != VIR_STORAGE_NET_PROTOCOL_ISCSI) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("disk device='lun' is not supported " -- GitLab