diff --git a/src/phyp/phyp_driver.c b/src/phyp/phyp_driver.c index 8eeba73fb2..ab12392f27 100644 --- a/src/phyp/phyp_driver.c +++ b/src/phyp/phyp_driver.c @@ -3701,6 +3701,29 @@ phypBuildLpar(virConnectPtr conn, virDomainDefPtr def) int exit_status = 0; virBuffer buf = VIR_BUFFER_INITIALIZER; + if (!def->memory) { + PHYP_ERROR(VIR_ERR_XML_ERROR,"%s", + _("Field \"\" on the domain XML file is missing or has " + "invalid value.")); + goto err; + } + + if (!def->maxmem) { + PHYP_ERROR(VIR_ERR_XML_ERROR,"%s", + _("Field \"\" on the domain XML file is missing or" + " has invalid value.")); + goto err; + } + + if (def->ndisks > 0) { + if (!def->disks[0]->src) { + PHYP_ERROR(VIR_ERR_XML_ERROR,"%s", + _("Field \"\" under \"\" on the domain XML file is " + "missing.")); + goto err; + } + } + virBufferAddLit(&buf, "mksyscfg"); if (system_type == HMC) virBufferVSprintf(&buf, " -m %s", managed_system);