diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 30c27db1f0ba30311287357df8e18be2853676e4..606ee50d9f5396122b2d07297fcad5ecbc2e6739 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -8230,6 +8230,10 @@ int virDomainDiskDefForeachPath(virDomainDiskDefPtr disk, if (format == VIR_STORAGE_FILE_AUTO && !allowProbing) format = VIR_STORAGE_FILE_RAW; /* Stops further recursion */ + + /* Allow probing for image formats that are safe */ + if (format == VIR_STORAGE_FILE_AUTO_SAFE) + format = VIR_STORAGE_FILE_AUTO; } while (nextpath); ret = 0; diff --git a/src/util/storage_file.c b/src/util/storage_file.c index c011544b290b04a5466fd6592335b44cb7c4478c..b82da0a73bc16e05d9f07277ee13c8edada916dc 100644 --- a/src/util/storage_file.c +++ b/src/util/storage_file.c @@ -42,7 +42,7 @@ VIR_ENUM_IMPL(virStorageFileFormat, VIR_STORAGE_FILE_LAST, - "raw", "dir", "bochs", + "raw", "probe", "dir", "bochs", "cloop", "cow", "dmg", "iso", "qcow", "qcow2", "qed", "vmdk", "vpc") diff --git a/src/util/storage_file.h b/src/util/storage_file.h index 37d52b44eda79022d4533663a74bd6557e1cbc84..1b918301fb1539aac930b5bb5dae11994f2099f7 100644 --- a/src/util/storage_file.h +++ b/src/util/storage_file.h @@ -30,6 +30,7 @@ enum virStorageFileFormat { VIR_STORAGE_FILE_AUTO = -1, VIR_STORAGE_FILE_RAW = 0, + VIR_STORAGE_FILE_AUTO_SAFE, VIR_STORAGE_FILE_DIR, VIR_STORAGE_FILE_BOCHS, VIR_STORAGE_FILE_CLOOP,