Skip to content
This repository was archived by the owner on Jan 22, 2026. It is now read-only.

Commit dbfd812

Browse files
committed
Default to vcpus=1 on Guest init.
1 parent eb6d70c commit dbfd812

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

virtinst/Guest.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def __init__(self, type=None, connection=None, hypervisorURI=None,
6767
self._uuid = None
6868
self._memory = None
6969
self._maxmemory = None
70-
self._vcpus = None
70+
self._vcpus = 1
7171
self._cpuset = None
7272
self._graphics_dev = None
7373
self._consolechild = None
@@ -706,8 +706,6 @@ def _set_defaults(self):
706706
if _util.vm_uuid_collision(self.conn, self.uuid):
707707
raise RuntimeError, _("The UUID you entered is already in "
708708
"use by another guest!")
709-
if self.vcpus is None:
710-
self.vcpus = 1
711709
if self.name is None or self.memory is None:
712710
raise RuntimeError, _("Name and memory must be specified for all guests!")
713711

0 commit comments

Comments
 (0)