5bba61f introduce a issue : when start a vm with <numa> settings and
restart libvirtd, numa settings will disappear. Because when parse the
vm states file, there is no node in "/domain/cpu/numa" this place.
Change to use ./cpu/numa instead of /domain/cpu/numa.
Signed-off-by: Luyao Huang <lhuang(a)redhat.com>
---
src/conf/numa_conf.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/conf/numa_conf.c b/src/conf/numa_conf.c
index b92cb44..c34ba5f 100644
--- a/src/conf/numa_conf.c
+++ b/src/conf/numa_conf.c
@@ -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;
--
1.8.3.1