diff --git a/src/vm/VirtualMachineParser.cc b/src/vm/VirtualMachineParser.cc index 7eb90f4e71..832d760c9b 100644 --- a/src/vm/VirtualMachineParser.cc +++ b/src/vm/VirtualMachineParser.cc @@ -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 */