diff --git a/src/vmx/vmx.c b/src/vmx/vmx.c index 35b4807d22..fe24b060d7 100644 --- a/src/vmx/vmx.c +++ b/src/vmx/vmx.c @@ -59,7 +59,7 @@ def->name = <=> displayName = "" def->mem.max_balloon = <=> memsize = "" # must be a multiple of 4, defaults to 32 def->mem.cur_balloon = <=> sched.mem.max = "" # defaults to "unlimited" -> def->mem.cur_balloon = def->mem.max_balloon def->mem.min_guarantee = <=> sched.mem.minsize = "" # defaults to 0 -def->maxvcpus = <=> numvcpus = "" # must be 1 or a multiple of 2, defaults to 1 +def->maxvcpus = <=> numvcpus = "" # must be greater than 0, defaults to 1 def->cpumask = <=> sched.cpu.affinity = "" def->cputune.shares = <=> sched.cpu.shares = "" # with handling for special values # "high", "normal", "low" @@ -1452,10 +1452,10 @@ virVMXParseConfig(virVMXContext *ctx, if (virVMXGetConfigLong(conf, "numvcpus", &numvcpus, 1, true) < 0) goto cleanup; - if (numvcpus <= 0 || (numvcpus % 2 != 0 && numvcpus != 1)) { + if (numvcpus <= 0) { virReportError(VIR_ERR_INTERNAL_ERROR, _("Expecting VMX entry 'numvcpus' to be an unsigned " - "integer (1 or a multiple of 2) but found %lld"), numvcpus); + "integer greater than 0 but found %lld"), numvcpus); goto cleanup; } @@ -3183,11 +3183,10 @@ virVMXFormatConfig(virVMXContext *ctx, virDomainXMLOptionPtr xmlopt, virDomainDe goto cleanup; } maxvcpus = virDomainDefGetVcpusMax(def); - if (maxvcpus == 0 || (maxvcpus % 2 != 0 && maxvcpus != 1)) { - virReportError(VIR_ERR_INTERNAL_ERROR, - _("Expecting domain XML entry 'vcpu' to be 1 or a " - "multiple of 2 but found %d"), - maxvcpus); + if (maxvcpus == 0) { + virReportError(VIR_ERR_INTERNAL_ERROR, "%s", + _("Expecting domain XML entry 'vcpu' to be greater " + "than 0")); goto cleanup; }