diff --git a/src/storage/storage_driver.c b/src/storage/storage_driver.c index 9130a40f5c..66811ce24c 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; }