From 92b49fe9a49281b216ff890a4736c79c93ee9c34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Sun, 15 May 2016 14:00:37 +0200 Subject: [PATCH] core: Change default vCPUS to 2 This behaves better when running multiple VMs. If one need full CPU power in some VM, it is always possible to increase vCPUs for this particular VM. Fixes QubesOS/qubes-issues#1891 --- core-modules/000QubesVm.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/core-modules/000QubesVm.py b/core-modules/000QubesVm.py index 2755a90a..fec8a7b7 100644 --- a/core-modules/000QubesVm.py +++ b/core-modules/000QubesVm.py @@ -136,7 +136,7 @@ class QubesVm(object): "pci_strictreset": {"default": True}, # Internal VM (not shown in qubes-manager, doesn't create appmenus entries "internal": { "default": False, 'attr': '_internal' }, - "vcpus": { "default": None }, + "vcpus": { "default": 2 }, "uses_default_kernel": { "default": True, 'order': 30 }, "uses_default_kernelopts": { "default": True, 'order': 30 }, "kernel": { @@ -327,11 +327,6 @@ class QubesVm(object): if self.maxmem > self.memory * 10: self.maxmem = self.memory * 10 - # By default allow use all VCPUs - if self.vcpus is None and not vmm.offline_mode: - qubes_host = QubesHost() - self.vcpus = qubes_host.no_cpus - # Always set if meminfo-writer should be active or not if 'meminfo-writer' not in self.services: self.services['meminfo-writer'] = not (len(self.pcidevs) > 0)