Skip to content

Commit 01fd003

Browse files
committed
kvm: fix vm deployment with direct-download iso
Fixes #11521 Signed-off-by: Abhishek Kumar <[email protected]>
1 parent 8756be5 commit 01fd003

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/storage/KVMStorageProcessor.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,8 @@
8484
import org.apache.commons.lang3.StringUtils;
8585
import org.apache.commons.lang3.builder.ToStringBuilder;
8686
import org.apache.commons.lang3.builder.ToStringStyle;
87-
import org.apache.logging.log4j.Logger;
8887
import org.apache.logging.log4j.LogManager;
89-
88+
import org.apache.logging.log4j.Logger;
9089
import org.libvirt.Connect;
9190
import org.libvirt.Domain;
9291
import org.libvirt.DomainInfo;
@@ -143,7 +142,6 @@
143142
import com.cloud.utils.storage.S3.S3Utils;
144143
import com.cloud.vm.VmDetailConstants;
145144

146-
147145
public class KVMStorageProcessor implements StorageProcessor {
148146
protected Logger logger = LogManager.getLogger(getClass());
149147
private final KVMStoragePoolManager storagePoolMgr;
@@ -2480,6 +2478,8 @@ public Answer handleDownloadTemplateToPrimaryStorage(DirectDownloadCommand cmd)
24802478
logger.warn("Skipped validation whether downloaded file is QCOW2 for template {}, due to downloaded template path is empty", template.getName());
24812479
} else if (!new File(templatePath).exists()) {
24822480
logger.warn("Skipped validation whether downloaded file is QCOW2 for template {}, due to downloaded template path is not valid: {}", template.getName(), templatePath);
2481+
} else if (ImageFormat.ISO.equals(cmd.getFormat())) {
2482+
logger.debug("Skipping template validations as image format is {}", cmd.getFormat());
24832483
} else {
24842484
try {
24852485
Qcow2Inspector.validateQcow2File(templatePath);

0 commit comments

Comments
 (0)