mirror of
https://github.com/OpenNebula/one.git
synced 2026-12-02 05:06:14 +09:00
B #5293: Don't allow CPU hotplug and virtual topology.
This commit is contained in:
1 file changed
+7
@@ -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 */
|
||||
|
||||
Reference in new issue
Block a user