mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
libxl: Fix disk format error message
Specifying an unsupported disk format with the tap driver resulted in a less than helpful error message error: Failed to start domain test-hvm error: internal error libxenlight does not support disk driver qed Change the message to state that the qed format is not supported by the tap driver, e.g. error: Failed to start domain test-hvm error: internal error libxenlight does not support disk format qed with disk driver tap While at it, check for unsupported formats in the other driver backends.
This commit is contained in:
parent
684ce8300e
commit
05bcf6f06d
@ -484,14 +484,34 @@ libxlMakeDisk(virDomainDiskDefPtr l_disk, libxl_device_disk *x_disk)
|
||||
break;
|
||||
default:
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
_("libxenlight does not support disk driver %s"),
|
||||
virStorageFileFormatTypeToString(l_disk->format));
|
||||
_("libxenlight does not support disk format %s "
|
||||
"with disk driver %s"),
|
||||
virStorageFileFormatTypeToString(l_disk->format),
|
||||
l_disk->driverName);
|
||||
return -1;
|
||||
}
|
||||
} else if (STREQ(l_disk->driverName, "file")) {
|
||||
if (l_disk->format != VIR_STORAGE_FILE_NONE &&
|
||||
l_disk->format != VIR_STORAGE_FILE_RAW) {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
_("libxenlight does not support disk format %s "
|
||||
"with disk driver %s"),
|
||||
virStorageFileFormatTypeToString(l_disk->format),
|
||||
l_disk->driverName);
|
||||
return -1;
|
||||
}
|
||||
x_disk->format = LIBXL_DISK_FORMAT_RAW;
|
||||
x_disk->backend = LIBXL_DISK_BACKEND_TAP;
|
||||
} else if (STREQ(l_disk->driverName, "phy")) {
|
||||
if (l_disk->format != VIR_STORAGE_FILE_NONE &&
|
||||
l_disk->format != VIR_STORAGE_FILE_RAW) {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
_("libxenlight does not support disk format %s "
|
||||
"with disk driver %s"),
|
||||
virStorageFileFormatTypeToString(l_disk->format),
|
||||
l_disk->driverName);
|
||||
return -1;
|
||||
}
|
||||
x_disk->format = LIBXL_DISK_FORMAT_RAW;
|
||||
x_disk->backend = LIBXL_DISK_BACKEND_PHY;
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user