Skip to content
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

Trusted Launch for VM/VMSS #27260

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

Conversation

grizzlytheodore
Copy link
Member

@grizzlytheodore grizzlytheodore commented Mar 3, 2025

Description

addressing: https://github.com/Azure/azure-powershell-cmdlet-review-pr/issues/1477

Mandatory Checklist

  • SHOULD update ChangeLog.md file(s) appropriately
    • For SDK-based development mode, update src/{{SERVICE}}/{{SERVICE}}/ChangeLog.md.
      • A snippet outlining the change(s) made in the PR should be written under the ## Upcoming Release header in the past tense.
    • For autorest-based development mode, include the changelog in the PR description.
    • Should not change ChangeLog.md if no new release is required, such as fixing test case only.
  • SHOULD regenerate markdown help files if there is cmdlet API change. Instruction
  • SHOULD have proper test coverage for changes in pull request.
  • SHOULD NOT adjust version of module manually in pull request

Copy link

Thanks for your contribution! The pull request validation has started. Please revisit this comment for updated status.

@@ -20,6 +20,7 @@
-->
## Upcoming Release
* Updated `New-AzVM`, `New-AzVmss`, `Update-AzVM`, and `Update-AzVmss` to pass `Standard` as an input of `-SecurityType` parameter.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where are the vmss tests? Those are needed.

Start-AzVM -ResourceGroupName $rgname -Name $vmname2
$updated_vm = Get-AzVM -ResourceGroupName $rgname -Name $vmname2;

Assert-Null $updated_vm.SecurityProfile.SecurityType;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't this be Standard now?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

part of Trusted launch headache - they want Standard to be passed in for security type, because it is a valid input now and SecurityType:null will default to TL now.
But passing in SecurityType:Standard will return with SecurityProfile: null

@@ -108,7 +108,7 @@ internal static ResourceConfig<VirtualMachineScaleSet> CreateVirtualMachineScale
PlatformFaultDomainCount = platformFaultDomainCount,
VirtualMachineProfile = new VirtualMachineScaleSetVMProfile
{
SecurityProfile = ((encryptionAtHost == true || enableVtpm != null || enableSecureBoot != null || securityType != null) && (securityType?.ToLower() != ConstantValues.StandardSecurityType))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so now Standard can have a security profile?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah. Standard HAS to have security profile to pass SecurityProfile.SecurityType as Standard

@@ -6895,7 +6905,7 @@ function Test-VirtualMachineSecurityTypeStandard
{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also re-record
Test-VirtualMachineSecurityType
Test-VMDefaultsToTrustedLaunch
Test-VMDefaultsToTrustedLaunchWithManagedDisk
Test-VMDefaultsToTrustedLaunchWithNullEncryptionAtHost

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

VirtualMachineScaleSetDefaultImgWhenStandard
VirtualMachineScaleSetConfidentialVMSSSecurityType

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like Test-VMDefaultsToTrustedLaunchWithManagedDisk was never a working test and there is no recording for it. I am not sure how it exists without causing CI failure

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fails with " ErrorMessage: VM 'vmcrptestps4346' has not reported status for VM agent or extensions. Verify that the OS is up and healthy, the VM has a running VM agent, and that it can establish outbound connections to Azure storage. Please refer to https://aka.ms/vmextensionwindowstroubleshoot for additional VM agent troubleshooting information.
"

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reproducable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants