@@ -6815,9 +6815,6 @@ static int
virDomainDefOSValidate(const virDomainDef *def,
virDomainXMLOptionPtr xmlopt)
{
- if (!def->os.loader)
- return 0;
-
if (def->os.firmware &&
!(xmlopt->config.features & VIR_DOMAIN_DEF_FEATURE_FW_AUTOSELECT)) {
virReportError(VIR_ERR_XML_DETAIL, "%s",
@@ -6825,7 +6822,8 @@ virDomainDefOSValidate(const virDomainDef *def,
return -1;
}
- if (!def->os.loader->path &&
+ if (def->os.loader &&
+ !def->os.loader->path &&
def->os.firmware == VIR_DOMAIN_OS_DEF_FIRMWARE_NONE) {
virReportError(VIR_ERR_XML_DETAIL, "%s",
_("no loader path specified and firmware auto selection disabled"));
@@ -555,7 +555,8 @@ static virDomainDefParserConfig virVMXDomainDefParserConfig = {
.domainPostParseCallback = virVMXDomainDefPostParse,
.features = (VIR_DOMAIN_DEF_FEATURE_WIDE_SCSI |
VIR_DOMAIN_DEF_FEATURE_NAME_SLASH |
- VIR_DOMAIN_DEF_FEATURE_NO_BOOT_ORDER),
+ VIR_DOMAIN_DEF_FEATURE_NO_BOOT_ORDER |
+ VIR_DOMAIN_DEF_FEATURE_FW_AUTOSELECT),
};
struct virVMXDomainDefNamespaceData {
The check shouldn't be dependent on whether os->loader is set. Fix it, and add the XML feature to vmx.c which would start failing Signed-off-by: Cole Robinson <crobinso@redhat.com> --- src/conf/domain_conf.c | 6 ++---- src/vmx/vmx.c | 3 ++- 2 files changed, 4 insertions(+), 5 deletions(-) -- 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list