Skip to content

Commit 8cbfb9d

Browse files
haaghadingmeng-xue
andauthored
[Compute] Fix deploying Linux SIG image/Linux Community Gallery Image (#20565)
* image ref fix * changelog Co-authored-by: Dingmeng Xue <[email protected]>
1 parent 5805da2 commit 8cbfb9d

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/Compute/Compute/ChangeLog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
-->
2222
## Upcoming Release
2323
* Removed the image `Win2008R2SP1` from the list of available images and documentation. This image is no longer available on the backend so the client tools need to sync to that change.
24+
* Fixed a bug for creating Linux VM's from SIG/Community Gallery Images
2425

2526
## Version 5.2.0
2627
* Fixed issue found for `Set-AzVmssVMRunCommand` [#19985]

src/Compute/Compute/Strategies/ComputeRp/VirtualMachineStrategy.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@ public static ResourceConfig<VirtualMachine> CreateVirtualMachineConfig(
8484
OsProfile = new OSProfile
8585
{
8686
ComputerName = name,
87-
WindowsConfiguration = (imageAndOsType?.OsType != OperatingSystemTypes.Windows) ? null : imageAndOsType.CreateWindowsConfiguration(),
88-
LinuxConfiguration = (imageAndOsType?.OsType != OperatingSystemTypes.Linux) ? null : new LinuxConfiguration
87+
WindowsConfiguration = (imageAndOsType?.OsType != OperatingSystemTypes.Windows || imageReferenceId != null) ? null : imageAndOsType.CreateWindowsConfiguration(),
88+
LinuxConfiguration = (imageAndOsType?.OsType != OperatingSystemTypes.Linux || imageReferenceId != null ) ? null : new LinuxConfiguration
8989
{
9090
Ssh = new SshConfiguration(sshPublicKeys)
9191
},

0 commit comments

Comments
 (0)