Skip to content

Commit

Permalink
Win2022 azure edition core alias (#18331)
Browse files Browse the repository at this point in the history
* Update Images.json

* Update New-AzVM.md

* Update NewAzureVMCommand.cs

* Update ChangeLog.md

* Update ChangeLog.md

* Update ChangeLog.md

Co-authored-by: Yabo Hu <yabhu@microsoft.com>
  • Loading branch information
mgreenegit and VeryEarly committed Jun 23, 2022
1 parent 822bfbc commit 5b20840
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 6 deletions.
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

0 comments on commit 5b20840

Please sign in to comment.