Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
yanzhudd committed Dec 23, 2024
1 parent 3c540df commit 3347593
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,8 @@ def _build_os_profile():
os_profile['secrets'] = secrets

if enable_auto_update is not None and custom_image_os_type.lower() == 'windows':
if 'windowsConfiguration' not in os_profile:
os_profile['windowsConfiguration'] = {}
os_profile['windowsConfiguration']['enableAutomaticUpdates'] = enable_auto_update

# Windows patch settings
Expand All @@ -368,6 +370,9 @@ def _build_os_profile():
raise ValidationError(
'Invalid value of --patch-mode for Windows VM. Valid values are AutomaticByOS, '
'AutomaticByPlatform, Manual.')

if 'windowsConfiguration' not in os_profile:
os_profile['windowsConfiguration'] = {}
os_profile['windowsConfiguration']['patchSettings'] = {
'patchMode': patch_mode,
'enableHotpatching': enable_hotpatching
Expand Down

0 comments on commit 3347593

Please sign in to comment.