B #5293: Don't allow CPU hotplug and virtual topology.

This commit is contained in:
Ruben S. Montero committed 2021-03-11 18:47:06 +00:00
1 parent ac29645214
commit b5e703f2a7
1 file changed
+7
+7
View File
@@ -789,6 +789,7 @@ int VirtualMachine::parse_topology(Template * tmpl, std::string &error)
/* ---------------------------------------------------------------------- */
long long memory;
unsigned int vcpu = 0;
unsigned int vcpu_max = 0;
if (!tmpl->get("MEMORY", memory))
{
@@ -807,6 +808,12 @@ int VirtualMachine::parse_topology(Template * tmpl, std::string &error)
tmpl->replace("CPU", vcpu);
}
if (tmpl->get("VCPU_MAX", vcpu_max))
{
error = "VM with TOPOLOGY does not support CPU hotplug (VCPU_MAX)";
return -1;
}
/* ---------------------------------------------------------------------- */
/* Check topology for non pinned & pinned VMs */
/* - non-pinned VM needs to set SOCKETS, CORES and THREADS */