diff --git a/src/conf/snapshot_conf.c b/src/conf/snapshot_conf.c index aa2b5268b47ab8ff3d4f776565f08e5671398648..bff045583199ae8d847431eb1abaedee1c9d8b65 100644 --- a/src/conf/snapshot_conf.c +++ b/src/conf/snapshot_conf.c @@ -293,6 +293,12 @@ virDomainSnapshotDefParseString(const char *xmlStr, memoryFile); goto cleanup; } + if (!memoryFile && + def->memory == VIR_DOMAIN_SNAPSHOT_LOCATION_EXTERNAL) { + virReportError(VIR_ERR_XML_ERROR, "%s", + _("external memory snapshots require a filename")); + goto cleanup; + } } else if (memoryFile) { def->memory = VIR_DOMAIN_SNAPSHOT_LOCATION_EXTERNAL; } else if (flags & VIR_DOMAIN_SNAPSHOT_PARSE_REDEFINE) {