From: Boris Fiuczynski Date: Thu, 24 Nov 2016 12:28:00 +0000 (+0100) Subject: qemu: fix internal error: NUMA isn't available on this host X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=b178fa8ecb70e0ecbc4cc2e142515a34d90ee059;p=libvirt.git qemu: fix internal error: NUMA isn't available on this host If libvirt is compiled without NUMACTL support starting libvirtd reports a libvirt internal error "NUMA isn't available on this host" without checking if NUMA support is compiled into the libvirt binaries. This patch adds the missing NUMA support check to prevent the internal error. It also includes a check if the cgroup controller cpuset is available before using it. The error was noticed when libvirtd was restarted with running domains and on libvirtd start the qemuConnectCgroup gets called during qemuProcessReconnect. Signed-off-by: Boris Fiuczynski Reviewed-by: Bjoern Walk --- diff --git a/src/qemu/qemu_cgroup.c b/src/qemu/qemu_cgroup.c index 999f7a314c..9a9e9a3fb5 100644 --- a/src/qemu/qemu_cgroup.c +++ b/src/qemu/qemu_cgroup.c @@ -978,6 +978,10 @@ qemuRestoreCgroupState(virDomainObjPtr vm) virBitmapPtr all_nodes; virCgroupPtr cgroup_temp = NULL; + if (!virNumaIsAvailable() || + !virCgroupHasController(priv->cgroup, VIR_CGROUP_CONTROLLER_CPUSET)) + return; + if (!(all_nodes = virNumaGetHostMemoryNodeset())) goto error;