diff --git a/qubes/tests/api_admin.py b/qubes/tests/api_admin.py index 1e05692d..67ca3a3a 100644 --- a/qubes/tests/api_admin.py +++ b/qubes/tests/api_admin.py @@ -124,7 +124,7 @@ class TC_00_VMs(AdminAPITestCase): def test_021_vm_property_get_int(self): value = self.call_mgmt_func(b'admin.vm.property.Get', b'test-vm1', b'vcpus') - self.assertEqual(value, 'default=True type=int 42') + self.assertEqual(value, 'default=True type=int 2') def test_022_vm_property_get_bool(self): value = self.call_mgmt_func(b'admin.vm.property.Get', b'test-vm1', diff --git a/qubes/tests/vm/qubesvm.py b/qubes/tests/vm/qubesvm.py index a7b2171e..08b37db9 100644 --- a/qubes/tests/vm/qubesvm.py +++ b/qubes/tests/vm/qubesvm.py @@ -281,10 +281,10 @@ class TC_90_QubesVM(QubesVMTestsMixin, qubes.tests.QubesTestCase): def test_190_vcpus(self): vm = self.get_vm() - self.assertPropertyDefaultValue(vm, 'vcpus', self.app.host.no_cpus) + self.assertPropertyDefaultValue(vm, 'vcpus', 2) self.assertPropertyValue(vm, 'vcpus', 3, 3, '3') del vm.vcpus - self.assertPropertyDefaultValue(vm, 'vcpus', self.app.host.no_cpus) + self.assertPropertyDefaultValue(vm, 'vcpus', 2) self.assertPropertyValue(vm, 'vcpus', '3', 3, '3') def test_191_vcpus_invalid(self): @@ -508,7 +508,7 @@ class TC_90_QubesVM(QubesVMTestsMixin, qubes.tests.QubesTestCase): 7db78950-c467-4863-94d1-af59806384ea 500 400 - 4 + 2 linux /tmp/kernel/vmlinuz @@ -559,7 +559,7 @@ class TC_90_QubesVM(QubesVMTestsMixin, qubes.tests.QubesTestCase): 7db78950-c467-4863-94d1-af59806384ea 500 400 - 4 + 2 diff --git a/qubes/vm/qubesvm.py b/qubes/vm/qubesvm.py index 9828ad04..69febe4a 100644 --- a/qubes/vm/qubesvm.py +++ b/qubes/vm/qubesvm.py @@ -416,8 +416,8 @@ class QubesVM(qubes.vm.mix.net.NetVMMixin, qubes.vm.BaseVM): vcpus = qubes.property('vcpus', type=int, setter=_setter_positive_int, - default=(lambda self: self.app.host.no_cpus), - doc='FIXME') + default=2, + doc='Number of virtual CPUs for a qube') # CORE2: swallowed uses_default_kernel kernel = qubes.property('kernel', type=str,