Do not run slmgr.vbs on Nano Server
Licensing info and activation do not apply to Nano Server. Co-Authored-By: Cosmin Poieana <cpoieana@cloudbasesolutions.com> Change-Id: Icab01ab3e9d43be5f8be2920af803f6e294095c4 Closes-Bug: #1495306
This commit is contained in:
committed by
Cosmin Poieana
parent
69a18423f4
commit
1117441f32
@@ -60,12 +60,16 @@ class WindowsLicensingPlugin(base.BasePlugin):
|
||||
def execute(self, service, shared_data):
|
||||
osutils = osutils_factory.get_os_utils()
|
||||
|
||||
license_info = self._run_slmgr(osutils, ['/dlv'])
|
||||
LOG.info('Microsoft Windows license info:\n%s' % license_info)
|
||||
if osutils.is_nano_server():
|
||||
LOG.info("Licensing info and activation are not available on "
|
||||
"Nano Server")
|
||||
else:
|
||||
license_info = self._run_slmgr(osutils, ['/dlv'])
|
||||
LOG.info('Microsoft Windows license info:\n%s' % license_info)
|
||||
|
||||
if CONF.activate_windows:
|
||||
LOG.info("Activating Windows")
|
||||
activation_result = self._run_slmgr(osutils, ['/ato'])
|
||||
LOG.debug("Activation result:\n%s" % activation_result)
|
||||
if CONF.activate_windows:
|
||||
LOG.info("Activating Windows")
|
||||
activation_result = self._run_slmgr(osutils, ['/ato'])
|
||||
LOG.debug("Activation result:\n%s" % activation_result)
|
||||
|
||||
return base.PLUGIN_EXECUTION_DONE, False
|
||||
|
||||
Reference in New Issue
Block a user