提交 70bb34eb 编写于 作者: O Osier Yang

qemu: Allow volume type disk for device 'lun'

This allows one use block type volume as the disk source for device
'lun'.
上级 a9762b73
......@@ -3131,10 +3131,11 @@ qemuBuildDriveDevStr(virDomainDefPtr def,
virDomainDiskProtocolTypeToString(disk->protocol));
goto error;
}
} else if (disk->type != VIR_DOMAIN_DISK_TYPE_BLOCK) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("disk device='lun' is not supported for type='%s'"),
virDomainDiskTypeToString(disk->type));
} else if (disk->type != VIR_DOMAIN_DISK_TYPE_BLOCK &&
!(disk->type == VIR_DOMAIN_DISK_TYPE_VOLUME &&
disk->srcpool->voltype == VIR_STORAGE_VOL_BLOCK)) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("disk device='lun' is only valid for block type disk source"));
goto error;
}
if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_VIRTIO_BLK_SG_IO)) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册