@@ -1597,6 +1597,7 @@ def update_vm(cmd, resource_group_name, vm_name, os_disk=None, disk_caching=None
1597
1597
vm .storage_profile .os_disk .managed_disk .id = disk_id
1598
1598
vm .storage_profile .os_disk .name = disk_name
1599
1599
1600
+ from ._constants import COMPATIBLE_SECURITY_TYPE_VALUE
1600
1601
if security_type == "TrustedLaunch" :
1601
1602
from azure .cli .core .azclierror import InvalidArgumentValueError
1602
1603
if vm .security_profile is not None and vm .security_profile .security_type == "ConfidentialVM" :
@@ -1615,6 +1616,11 @@ def update_vm(cmd, resource_group_name, vm_name, os_disk=None, disk_caching=None
1615
1616
if vm .security_profile is None :
1616
1617
vm .security_profile = SecurityProfile ()
1617
1618
vm .security_profile .security_type = security_type
1619
+ elif security_type == COMPATIBLE_SECURITY_TYPE_VALUE :
1620
+ if vm .security_profile is None :
1621
+ vm .security_profile = SecurityProfile ()
1622
+ vm .security_profile .security_type = security_type
1623
+ vm .security_profile .uefi_settings = None
1618
1624
1619
1625
if write_accelerator is not None :
1620
1626
update_write_accelerator_settings (vm .storage_profile , write_accelerator )
@@ -1683,7 +1689,7 @@ def update_vm(cmd, resource_group_name, vm_name, os_disk=None, disk_caching=None
1683
1689
if proximity_placement_group is not None :
1684
1690
vm .proximity_placement_group = {'id' : proximity_placement_group }
1685
1691
1686
- if enable_secure_boot is not None or enable_vtpm is not None :
1692
+ if security_type != COMPATIBLE_SECURITY_TYPE_VALUE and ( enable_secure_boot is not None or enable_vtpm is not None ) :
1687
1693
if vm .security_profile is None :
1688
1694
vm .security_profile = SecurityProfile ()
1689
1695
0 commit comments