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

Win2022 azure edition core alias #18331

Merged
merged 8 commits into from
Jun 23, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/Compute/Compute/ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

-->
## Upcoming Release
* Added image alias 'Win2022AzureEditionCore'
* For `Add-AzVhd` upon upload failure using DirectUploadToManagedDisk parameter set, the SAS will be revoked and the created managed disk will be deleted.
* An unresolved path can be passed in for '-LocalFilePath' for `Add-AzVhd`. The cmdlet with unresolve the path itself.
* Added `-DataAccessAuthMode` parameter to Add-AzVhd DirectUploadToManagedDisk parameter set.
Expand Down
6 changes: 6 additions & 0 deletions src/Compute/Compute/Strategies/ComputeRp/Images.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@
}
},
"Windows": {
"Win2022AzureEditionCore": {
"publisher": "MicrosoftWindowsServer",
"offer": "WindowsServer",
"sku": "2022-datacenter-azure-edition-core",
"version": "latest"
},
"Win2019Datacenter": {
"publisher": "MicrosoftWindowsServer",
"offer": "WindowsServer",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,12 +203,13 @@ public class NewAzureVMCommand : VirtualMachineBaseCmdlet
"RHEL",
"SLES",
"UbuntuLTS",
"Win2022AzureEditionCore",
"Win2019Datacenter",
"Win2016Datacenter",
"Win2012R2Datacenter",
"Win2012Datacenter",
"Win2008R2SP1",
"Win10",
"Win2019Datacenter")]
"Win10")]
[Alias("ImageName")]
public string Image { get; set; } = "Win2016Datacenter";

Expand Down Expand Up @@ -1283,4 +1284,4 @@ private void validate()
}
}
}
}
}
6 changes: 3 additions & 3 deletions src/Compute/Compute/help/New-AzVM.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ $Credential = New-Object System.Management.Automation.PSCredential ($VMLocalAdmi
$VirtualMachine = New-AzVMConfig -VMName $VMName -VMSize $VMSize
$VirtualMachine = Set-AzVMOperatingSystem -VM $VirtualMachine -Windows -ComputerName $ComputerName -Credential $Credential -ProvisionVMAgent -EnableAutoUpdate
$VirtualMachine = Add-AzVMNetworkInterface -VM $VirtualMachine -Id $NIC.Id
$VirtualMachine = Set-AzVMSourceImage -VM $VirtualMachine -PublisherName 'MicrosoftWindowsServer' -Offer 'WindowsServer' -Skus '2012-R2-Datacenter' -Version latest
$VirtualMachine = Set-AzVMSourceImage -VM $VirtualMachine -PublisherName 'MicrosoftWindowsServer' -Offer 'WindowsServer' -Skus '2022-datacenter-azure-edition-core' -Version latest

New-AzVM -ResourceGroupName $ResourceGroupName -Location $LocationName -VM $VirtualMachine -Verbose
```
Expand Down Expand Up @@ -218,7 +218,7 @@ $NIC = New-AzNetworkInterface -Name NICname -ResourceGroupName ResourceGroup2 -L
$VirtualMachine = New-AzVMConfig -VMName VirtualMachineName -VMSize Standard_D4s_v3
$VirtualMachine = Set-AzVMOperatingSystem -VM $VirtualMachine -Windows -ComputerName computerName -Credential $psCred -ProvisionVMAgent -EnableAutoUpdate
$VirtualMachine = Add-AzVMNetworkInterface -VM $VirtualMachine -Id $NIC.Id
$VirtualMachine = Set-AzVMSourceImage -VM $VirtualMachine -PublisherName 'MicrosoftWindowsServer' -Offer 'WindowsServer' -Skus '2012-R2-Datacenter' -Version latest
$VirtualMachine = Set-AzVMSourceImage -VM $VirtualMachine -PublisherName 'MicrosoftWindowsServer' -Offer 'WindowsServer' -Skus '2022-datacenter-azure-edition-core' -Version latest
New-AzVm -ResourceGroupName ResourceGroup1 -Location SouthCentralUS -VM $VirtualMachine
```

Expand Down Expand Up @@ -547,7 +547,7 @@ Accept wildcard characters: False
```

### -Image
The friendly image name upon which the VM will be built. These include: Win2019Datacenter, Win2016Datacenter, Win2012R2Datacenter, Win2012Datacenter, Win2008R2SP1, UbuntuLTS, CentOS, CoreOS, Debian, openSUSE-Leap, RHEL, SLES.
The friendly image name upon which the VM will be built. These include: Win2022AzureEditionCore, Win2019Datacenter, Win2016Datacenter, Win2012R2Datacenter, Win2012Datacenter, Win2008R2SP1, UbuntuLTS, CentOS, CoreOS, Debian, openSUSE-Leap, RHEL, SLES.

```yaml
Type: System.String
Expand Down