mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-26 23:55:23 +00:00
conf: fix parsing of NUMA settings in VM status XML
Commit5bba61f
changed the XPath strings to be absolute when parsing the VM NUMA configuration. Unfortunately the <domain> element is not a top level element when parsing the domain status XML thus the absolute XPath string doesn't match. Use the relative string so that the <numa> settings are not lost. Signed-off-by: Luyao Huang <lhuang@redhat.com> (cherry picked from commitd75e23bbfb
)
This commit is contained in:
parent
a883fb9c75
commit
28575e750f
@ -663,10 +663,10 @@ virDomainNumaDefCPUParseXML(virDomainNumaPtr def,
|
||||
int ret = -1;
|
||||
|
||||
/* check if NUMA definition is present */
|
||||
if (!virXPathNode("/domain/cpu/numa[1]", ctxt))
|
||||
if (!virXPathNode("./cpu/numa[1]", ctxt))
|
||||
return 0;
|
||||
|
||||
if ((n = virXPathNodeSet("/domain/cpu/numa[1]/cell", ctxt, &nodes)) <= 0) {
|
||||
if ((n = virXPathNodeSet("./cpu/numa[1]/cell", ctxt, &nodes)) <= 0) {
|
||||
virReportError(VIR_ERR_XML_ERROR, "%s",
|
||||
_("NUMA topology defined without NUMA cells"));
|
||||
goto cleanup;
|
||||
|
Loading…
Reference in New Issue
Block a user