diff --git a/image_creator/os_type/__init__.py b/image_creator/os_type/__init__.py index 166bb42ef878d5c7dc5a9edea97cfb9b3d76f780..ce8413034d0601f554131f655d0fa45c4a21406d 100644 --- a/image_creator/os_type/__init__.py +++ b/image_creator/os_type/__init__.py @@ -255,7 +255,7 @@ class OSBase(object): return for name, param in self.needed_sysprep_params.items(): - self.out.output("\t%s (%s): %s" % + self.out.output("\t%s [%s]: %s" % (param.description, name, self.sysprep_params[name] if name in self.sysprep_params else "(none)")) diff --git a/image_creator/os_type/windows.py b/image_creator/os_type/windows.py index b758e034e4443d4b74490c5ef3481d13ef279877..2890c62bba3e86e174168ed5c967b8ac457b6e6d 100644 --- a/image_creator/os_type/windows.py +++ b/image_creator/os_type/windows.py @@ -119,6 +119,10 @@ class Windows(OSBase): 'boot_timeout', int, 300, "Boot Timeout (seconds)", _POSINT) @add_sysprep_param( 'connection_retries', int, 5, "Connection Retries", _POSINT) + @add_sysprep_param( + 'smp', int, 1, "Number of CPUs for the helper VM", _POSINT) + @add_sysprep_param( + 'mem', int, 1024, "Virtual RAM size for the helper VM (MiB)", _POSINT) @add_sysprep_param('password', str, None, 'Image Administrator Password') def __init__(self, image, **kargs): super(Windows, self).__init__(image, **kargs) @@ -800,8 +804,8 @@ class _VM(object): args.extend(needed_args) args.extend([ - '-smp', '1', '-m', '1024', '-drive', - 'file=%s,format=raw,cache=unsafe,if=virtio' % self.disk, + '-smp', str(self.params['smp']), '-m', str(self.params['mem']), + '-drive', 'file=%s,format=raw,cache=unsafe,if=virtio' % self.disk, '-netdev', 'type=user,hostfwd=tcp::445-:445,id=netdev0', '-device', 'virtio-net-pci,mac=%s,netdev=netdev0' % random_mac(), '-vnc', ':%d' % self.display, '-serial', 'file:%s' % self.serial,