mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
kvm: fix vm deployment with direct-download iso (#11532)
This commit is contained in:
parent
ca62a7dd50
commit
762f75c041
@ -84,9 +84,8 @@ import org.apache.commons.lang3.BooleanUtils;
|
|||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
import org.apache.logging.log4j.Logger;
|
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.apache.logging.log4j.LogManager;
|
||||||
|
import org.apache.logging.log4j.Logger;
|
||||||
import org.libvirt.Connect;
|
import org.libvirt.Connect;
|
||||||
import org.libvirt.Domain;
|
import org.libvirt.Domain;
|
||||||
import org.libvirt.DomainInfo;
|
import org.libvirt.DomainInfo;
|
||||||
@ -2476,7 +2475,9 @@ public class KVMStorageProcessor implements StorageProcessor {
|
|||||||
if (template != null) {
|
if (template != null) {
|
||||||
templatePath = template.getPath();
|
templatePath = template.getPath();
|
||||||
}
|
}
|
||||||
if (StringUtils.isEmpty(templatePath)) {
|
if (ImageFormat.ISO.equals(cmd.getFormat())) {
|
||||||
|
logger.debug("Skipping template validations as image format is {}", cmd.getFormat());
|
||||||
|
} else if (StringUtils.isEmpty(templatePath)) {
|
||||||
logger.warn("Skipped validation whether downloaded file is QCOW2 for template {}, due to downloaded template path is empty", template.getName());
|
logger.warn("Skipped validation whether downloaded file is QCOW2 for template {}, due to downloaded template path is empty", template.getName());
|
||||||
} else if (!new File(templatePath).exists()) {
|
} else if (!new File(templatePath).exists()) {
|
||||||
logger.warn("Skipped validation whether downloaded file is QCOW2 for template {}, due to downloaded template path is not valid: {}", template.getName(), templatePath);
|
logger.warn("Skipped validation whether downloaded file is QCOW2 for template {}, due to downloaded template path is not valid: {}", template.getName(), templatePath);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user