File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed
src/azure-cli/azure/cli/command_modules/vm Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -360,6 +360,8 @@ def _build_os_profile():
360360 os_profile ['secrets' ] = secrets
361361
362362 if enable_auto_update is not None and custom_image_os_type .lower () == 'windows' :
363+ if 'windowsConfiguration' not in os_profile :
364+ os_profile ['windowsConfiguration' ] = {}
363365 os_profile ['windowsConfiguration' ]['enableAutomaticUpdates' ] = enable_auto_update
364366
365367 # Windows patch settings
@@ -368,6 +370,9 @@ def _build_os_profile():
368370 raise ValidationError (
369371 'Invalid value of --patch-mode for Windows VM. Valid values are AutomaticByOS, '
370372 'AutomaticByPlatform, Manual.' )
373+
374+ if 'windowsConfiguration' not in os_profile :
375+ os_profile ['windowsConfiguration' ] = {}
371376 os_profile ['windowsConfiguration' ]['patchSettings' ] = {
372377 'patchMode' : patch_mode ,
373378 'enableHotpatching' : enable_hotpatching
You can’t perform that action at this time.
0 commit comments