-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Compute] BREAKING CHANGE: az vm/vmss create: New VM from existing disk or image #27700
Conversation
❌AzureCLI-FullTest
|
️✔️AzureCLI-BreakingChangeTest
|
Compute |
if namespace.security_type is None: | ||
namespace.security_type = 'TrustedLaunch' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is mentioned in the feature request #23476 Scenario 1:
OS Disk securityProfile has 1-1 mapping with VM, i.e., OS Disk enabled with Trusted Launch can only deploy VM with Trusted Launch.
I think namespace.security_type shoule be set to TrustedLaunch directly without if statement. Hi @AjKundnani could you please help confirm this?
if namespace.security_type is None: | |
namespace.security_type = 'TrustedLaunch' | |
namespace.security_type = 'TrustedLaunch' |
@@ -1404,7 +1404,38 @@ def _validate_generation_version_and_trusted_launch(cmd, namespace): | |||
generation_version = attach_os_disk_info.hyper_v_generation if hasattr(attach_os_disk_info, | |||
'hyper_v_generation') else None | |||
features = attach_os_disk_info.features if hasattr(attach_os_disk_info, 'features') else None | |||
disk_security_profile = attach_os_disk_info.security_profile if hasattr(attach_os_disk_info, | |||
'security_profile') else None | |||
trusted_launch_warning_log(namespace, generation_version, features) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This warning message may should be removed
trusted_launch_warning_log(namespace, generation_version, features) |
if disk_security_profile is None: | ||
return | ||
|
||
from ._constants import UPGRADE_SECURITY_HINT |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The warning message mentioned in the feature request is:
Consider upgrading security for your workloads using Azure Trusted Launch VMs. To know more about Trusted Launch, please visit https://aka.ms/TrustedLaunch
Hence the link in the UPGRADE_SECURITY_HINT field should be changed from "https://learn.microsoft.com/en-us/azure/virtual-machines/trusted-launch" to "https://aka.ms/TrustedLaunch".
For creating VM from existing shared image (Azure Compute Gallery) or managed image using az vm create --image (Scenario 2), corresponding logic should be changed. You can refer to a similar logic with the feature #23614 Scenario 2. |
Scenario 3 is similar with Scenario 2. |
Related command
Description
Close: #23476
Testing Guide
History Notes
[Component Name 1] BREAKING CHANGE:
az command a
: Make some customer-facing breaking change[Component Name 2]
az command b
: Add some customer-facing featureThis checklist is used to make sure that common guidelines for a pull request are followed.
The PR title and description has followed the guideline in Submitting Pull Requests.
I adhere to the Command Guidelines.
I adhere to the Error Handling Guidelines.