diff --git a/src/util/virstoragefile.c b/src/util/virstoragefile.c index 66cde582fc62a03c60dd6ce32ef8981a52cdd9a7..2a5ae8b1fd256637908d8dafce8bdb76cb323241 100644 --- a/src/util/virstoragefile.c +++ b/src/util/virstoragefile.c @@ -4935,9 +4935,15 @@ virStorageFileGetMetadataRecurse(virStorageSourcePtr src, goto cleanup; if (src->backingStoreRaw) { - if (virStorageSourceNewFromBacking(src, &backingStore) < 0) + if ((rv = virStorageSourceNewFromBacking(src, &backingStore)) < 0) goto cleanup; + if (rv == 1) { + /* the backing file would not be usable for VM usage */ + ret = 0; + goto cleanup; + } + if (backingFormat == VIR_STORAGE_FILE_AUTO) backingStore->format = VIR_STORAGE_FILE_RAW; else if (backingFormat == VIR_STORAGE_FILE_AUTO_SAFE)