1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2024-12-22 17:34:18 +03:00

libxl: add QED disk format support

If libxl has QED disk format support, then pass the feature
over to the user.
This commit is contained in:
Cédric Bosdonnat 2016-11-14 16:00:02 +01:00
parent cb25972fd1
commit 340bb6b7ef
2 changed files with 17 additions and 0 deletions

View File

@ -747,6 +747,12 @@ libxlMakeDisk(virDomainDiskDefPtr l_disk, libxl_device_disk *x_disk)
x_disk->format = LIBXL_DISK_FORMAT_RAW;
x_disk->backend = LIBXL_DISK_BACKEND_TAP;
break;
#ifdef LIBXL_HAVE_QED
case VIR_STORAGE_FILE_QED:
x_disk->format = LIBXL_DISK_FORMAT_QED;
x_disk->backend = LIBXL_DISK_BACKEND_QDISK;
break;
#endif
default:
virReportError(VIR_ERR_INTERNAL_ERROR,
_("libxenlight does not support disk format %s "
@ -764,6 +770,11 @@ libxlMakeDisk(virDomainDiskDefPtr l_disk, libxl_device_disk *x_disk)
case VIR_STORAGE_FILE_QCOW2:
x_disk->format = LIBXL_DISK_FORMAT_QCOW2;
break;
#ifdef LIBXL_HAVE_QED
case VIR_STORAGE_FILE_QED:
x_disk->format = LIBXL_DISK_FORMAT_QED;
break;
#endif
case VIR_STORAGE_FILE_VHD:
x_disk->format = LIBXL_DISK_FORMAT_VHD;
break;

View File

@ -394,6 +394,12 @@ xenParseXLDisk(virConfPtr conf, virDomainDefPtr def)
case LIBXL_DISK_FORMAT_EMPTY:
break;
#ifdef LIBXL_HAVE_QED
case LIBXL_DISK_FORMAT_QED:
disk->src->format = VIR_STORAGE_FILE_QED;
break;
#endif
default:
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("disk image format not supported: %s"),