-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
base: main
Are you sure you want to change the base?
Trusted Launch for VM/VMSS #27260
Changes from all commits
011ea63
8b588fd
f3f54c4
0d84fdf
714a144
1296a33
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6820,7 +6820,7 @@ function Test-VirtualMachineSecurityTypeWithoutConfig | |
{ | ||
# Setup | ||
$rgname = Get-ComputeTestResourceName; | ||
$loc = Get-ComputeVMLocation; | ||
$loc = "eastus2euap"; | ||
try | ||
{ | ||
New-AzResourceGroup -Name $rgname -Location $loc -Force; | ||
|
@@ -6864,6 +6864,16 @@ function Test-VirtualMachineSecurityTypeWithoutConfig | |
|
||
Assert-AreEqual $updated_vm.SecurityProfile.UefiSettings.VTpmEnabled $true; | ||
|
||
# Update SecurityType to Standard. Errors - Changing property 'securityProfile.securityType' is not allowed. | ||
Stop-AzVM -ResourceGroupName $rgname -Name $vmname2 -Force | ||
Update-AzVm -ResourceGroupName $rgname -VM $res -SecurityType "Standard" | ||
Start-AzVM -ResourceGroupName $rgname -Name $vmname2 | ||
$updated_vm = Get-AzVM -ResourceGroupName $rgname -Name $vmname2; | ||
|
||
Assert-Null $updated_vm.SecurityProfile.SecurityType; | ||
Assert-Null $updated_vm.SecurityProfile.UefiSettings; | ||
Assert-Null $updated_vm.SecurityProfile.SecurityType; | ||
|
||
# validate GA extension | ||
# We removed this logic as per request fro the feature team. | ||
# Keeping this code here as this may be added back in the future. | ||
|
@@ -6895,7 +6905,7 @@ function Test-VirtualMachineSecurityTypeStandard | |
{ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. also re-record There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. VirtualMachineScaleSetDefaultImgWhenStandard There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. reproducable |
||
# Setup | ||
$rgname = Get-ComputeTestResourceName; | ||
$loc = Get-ComputeVMLocation; | ||
$loc = "Westus2" | ||
try | ||
{ | ||
New-AzResourceGroup -Name $rgname -Location $loc -Force; | ||
|
@@ -6918,7 +6928,10 @@ function Test-VirtualMachineSecurityTypeStandard | |
New-AzVM -ResourceGroupName $rgname -Location $loc -Name $vmname1 -Credential $cred -Size $vmsize -Image $imageName -DomainNameLabel $domainNameLabel1 -SecurityType $securityTypeStnd; | ||
# Verify security value | ||
$vm1 = Get-AzVM -ResourceGroupName $rgname -Name $vmname1; | ||
|
||
# VM Gets created with SecurityType: Standard but response has securityProfile null | ||
Assert-Null $vm1.SecurityProfile; | ||
#Assert-AreEqual $vm1.SecurityProfile.SecurityType "Standard"; | ||
|
||
# validate GA extension is not installed by default. | ||
$extDefaultName = "GuestAttestation"; | ||
|
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Where are the vmss tests? Those are needed. |
||
* Added breaking change message for `Get-AzVMSize`. | ||
|
||
## Version 9.1.0 | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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)) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. so now Standard can have a security profile? There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 |
||
SecurityProfile = (encryptionAtHost == true || enableVtpm != null || enableSecureBoot != null || securityType != null) | ||
? new SecurityProfile | ||
{ | ||
EncryptionAtHost = encryptionAtHost, | ||
|
@@ -278,7 +278,7 @@ internal static ResourceConfig<VirtualMachineScaleSet> CreateVirtualMachineScale | |
PlatformFaultDomainCount = platformFaultDomainCount, | ||
VirtualMachineProfile = new VirtualMachineScaleSetVMProfile | ||
{ | ||
SecurityProfile = ((encryptionAtHost == true || enableVtpm != null || enableSecureBoot != null || securityType != null) && (securityType?.ToLower() != ConstantValues.StandardSecurityType)) | ||
SecurityProfile = (encryptionAtHost == true || enableVtpm != null || enableSecureBoot != null || securityType != null) | ||
? new SecurityProfile | ||
{ | ||
EncryptionAtHost = encryptionAtHost, | ||
|
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.
shouldn't this be Standard now?
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.
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