[PATCH] vmx: Remove check that numvcpus has to be an even number.

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

 



https://bugzilla.redhat.com/show_bug.cgi?id=1584091

It is possible to create a VMware guest with an odd number of vCPUs,
but such guests cannot be accessed by libvirt because of this
unnecessary check.

I retained the sanity-check that numvcpus must be >= 1.

Signed-off-by: Richard W.M. Jones <rjones@xxxxxxxxxx>
---
 src/vmx/vmx.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/vmx/vmx.c b/src/vmx/vmx.c
index bdc27b15b0..456bbaf190 100644
--- a/src/vmx/vmx.c
+++ b/src/vmx/vmx.c
@@ -1506,10 +1506,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);
+                       _("Expecting VMX entry 'numvcpus' to be a positive "
+                         "integer >= 1, but found %lld"), numvcpus);
         goto cleanup;
     }
 
-- 
2.16.2

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux