kvm: consider provisioning type for local data volumes (#9141)

Fixes #8644

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
This commit is contained in:
Abhishek Kumar 2024-06-10 14:08:31 +05:30 committed by GitHub
parent c779b1c616
commit 10f4de0318
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -842,7 +842,7 @@ public class LibvirtStorageAdaptor implements StorageAdaptor {
destFile.setFormat(format);
destFile.setSize(size);
Map<String, String> options = new HashMap<String, String>();
if (pool.getType() == StoragePoolType.NetworkFilesystem){
if (List.of(StoragePoolType.NetworkFilesystem, StoragePoolType.Filesystem).contains(pool.getType())) {
options.put("preallocation", QemuImg.PreallocationType.getPreallocationType(provisioningType).toString());
}