Skip to content

[BUG] Failed to create VirtualMachineScalesetextensionResource with exception Value cannot be null. (Parameter 'id')  #33992

@v-bafa

Description

@v-bafa

Library 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.d__3.MoveNext() at System.Threading.Tasks.ValueTask1.get_Result()
at Azure.Core.OperationInternal1.d__20.MoveNext() at Azure.Core.OperationPoller.d__11.MoveNext() at Azure.Core.OperationInternalBase.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

Metadata

Metadata

Labels

ComputeMgmtThis issue is related to a management package.Service AttentionWorkflow: This issue is responsible by Azure service team.customer-reportedIssues that are reported by GitHub users external to the Azure organization.issue-addressedWorkflow: The Azure SDK team believes it to be addressed and ready to close.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions