[BUG] Failed to create VirtualMachineScalesetextensionResource with exception Value cannot be null. (Parameter 'id')
See original GitHub issueLibrary name and version
Azure.ResourceManager.Compute 1.0.1
Describe the bug
Try to add extension to the scale set with sdk but failed.
Expected behavior
The extension should be created successfully.
Actual behavior
Got exception above. However, the extension is shown in the extension tab of the scale set.
Reproduction Steps
Execute the following code and got exception.
VirtualMachineScaleSetExtensionData vmssExtensionData = new VirtualMachineScaleSetExtensionData("ExtensionName")
{
xxxx
};
await scaleset.GetVirtualMachineScaleSetExtensions()
.CreateOrUpdateAsync(Azure.WaitUntil.Completed, vmssExtensionData.Name, vmssExtensionData);
Exception: Value cannot be null. (Parameter ‘id’)
at Azure.ResourceManager.ArmResource…ctor(ArmClient client, ResourceIdentifier id) at Azure.ResourceManager.Compute.VirtualMachineScaleSetExtensionResource…ctor(ArmClient client, ResourceIdentifier id) at Azure.ResourceManager.Compute.VirtualMachineScaleSetExtensionOperationSource.Azure.Core.IOperationSource<Azure.ResourceManager.Compute.VirtualMachineScaleSetExtensionResource>.CreateResult(Response response, CancellationToken cancellationToken) at Azure.Core.NextLinkOperationImplementation.OperationToOperationOfT1.<UpdateStateAsync>d__3.MoveNext() at System.Threading.Tasks.ValueTask1.get_Result() at Azure.Core.OperationInternal1.<UpdateStatusAsync>d__20.MoveNext() at Azure.Core.OperationPoller.<WaitForCompletionAsync>d__11.MoveNext() at Azure.Core.OperationInternalBase.<WaitForCompletionResponseAsync>d__19.MoveNext() at Azure.Core.OperationInternal1.d__19.MoveNext() at Azure.ResourceManager.Compute.VirtualMachineScaleSetExtensionCollection.CreateOrUpdate(WaitUntil waitUntil, String vmssExtensionName, VirtualMachineScaleSetExtensionData data, CancellationToken cancellationToken)
Environment
.NET SDK: Version: 7.0.102 Commit: 4bbdd14480
Runtime Environment: OS Name: Windows OS Version: 10.0.19044 OS Platform: Windows RID: win10-x64 Base Path: C:\Program Files\dotnet\sdk\7.0.102\
Host: Version: 7.0.2 Architecture: x64 Commit: d037e070eb
.NET SDKs installed: 6.0.308 [C:\Program Files\dotnet\sdk] 7.0.102 [C:\Program Files\dotnet\sdk]
.NET runtimes installed: Microsoft.AspNetCore.App 5.0.17 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 6.0.13 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 7.0.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.NETCore.App 5.0.17 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 6.0.13 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 7.0.2 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.WindowsDesktop.App 5.0.17 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 6.0.13 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 7.0.2 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Other architectures found: x86 [C:\Program Files (x86)\dotnet] registered at [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x86\InstallLocation]
Environment variables: Not set
global.json file: Not found
Learn more: https://aka.ms/dotnet/info
Download .NET: https://aka.ms/dotnet/download
IDE: Visual Studio 2022
Issue Analytics
- State:
- Created 7 months ago
- Comments:13 (7 by maintainers)
Top GitHub Comments
Hi @fengzhou-msft ,
Here is what I got in the log. Let me know if you need more information.
Hi @v-bafa, since you haven’t asked that we
/unresolve
the issue, we’ll close this out. If you believe further discussion is needed, please add a comment/unresolve
to reopen the issue.