Those parameter can be used to control how many CPUs and how much RAM
the Windows VM should have during the configuration
return
for name, param in self.needed_sysprep_params.items():
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)"))
(param.description, name,
self.sysprep_params[name] if name in
self.sysprep_params else "(none)"))
'boot_timeout', int, 300, "Boot Timeout (seconds)", _POSINT)
@add_sysprep_param(
'connection_retries', int, 5, "Connection Retries", _POSINT)
'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)
@add_sysprep_param('password', str, None, 'Image Administrator Password')
def __init__(self, image, **kargs):
super(Windows, self).__init__(image, **kargs)
args.extend(needed_args)
args.extend([
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,
'-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,