diff --git a/src/storage/storage_driver.c b/src/storage/storage_driver.c index 9130a40f5c3138fd664e02b1416083a167085229..66811ce24c30f8519a13bc56b67dc015a2a3c981 100644 --- a/src/storage/storage_driver.c +++ b/src/storage/storage_driver.c @@ -1758,8 +1758,8 @@ storageVolumeResize(virStorageVolPtr obj, goto out; } - if (abs_capacity > vol->allocation + pool->def->available) { - virStorageReportError(VIR_ERR_INVALID_ARG, + if (abs_capacity > vol->capacity + pool->def->available) { + virStorageReportError(VIR_ERR_OPERATION_FAILED, _("Not enough space left on storage pool")); goto out; }