[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] [PATCH] Fix the initialization of the number of sockets



When starting a VM 3 times, on the 3rd time the number of sockets is
completely out of control. Initialize the socket numbers to zero so the
cpu affinity does not occur due to max cpus being completely out of
range and the VM can start.

Signed-off-by: Stefan Berger <stefanb us ibm com>


diff --git a/src/nodeinfo.c b/src/nodeinfo.c
index 2dab5b2..7c04a47 100644
--- a/src/nodeinfo.c
+++ b/src/nodeinfo.c
@@ -155,6 +155,7 @@ int linuxNodeInfoCPUPopulate(virConnectPtr conn, FILE *cpuinfo,
     nodeinfo->cpus = 0;
     nodeinfo->mhz = 0;
     nodeinfo->nodes = nodeinfo->cores = 1;
+    nodeinfo->sockets = 0;
 
     /* NB: It is impossible to fill our nodes, since cpuinfo
      * has not knowledge of NUMA nodes */

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]