-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Add-AzureRmVirtualNetworkPeering "The object reference was not set to an object instance." #7406
Comments
@avijitgupta @chandrasekarsrinivasan would you mind taking a look at this issue? |
I am not sure if this is the same issue. I am running the lab of 20533 Lab2 and got this message. PS C:\WINDOWS\System32> $rg = New-AzureRMResourceGroup -Name '20533E0204-LabRG' -Location 'West US' PS C:\WINDOWS\System32> $vnet = New-AzureRmVirtualNetwork -ResourceGroupName $rg.ResourceGroupName -Name '20533E0204-vnet' -AddressPrefix '10.11.0.0/16' -Location $rg.Location WARNING: Breaking changes in the cmdlet 'New-AzureRmVirtualNetwork' :
|
Same behavior after updating to
|
I am also seeing this issue. |
Same issue peering across AAD Tenants. If I wait a day after the network is created, then retry peering, it works. So sounds like something is delayed on Microsoft's end. |
Assigning to Amol. @Am018 |
I just tried running all the commands and I couldn't repro the issue. However my AzureRM.Network module version is 6.9.1 instead of 6.8.0 as reported here. Can you try upgrading the AzureRM.Network module and see if you continue to face this issue? |
I have version 6.9.1 installed and receive the same error trying to peer two vnet's. Mine are in separate subscriptions, but it's the same error. I am able to perform peering via the portal (didn't try az cli yet). |
I just tried this again today on multiple separate subscriptions and it worked, has someone fixed something? Otherwise the issue may be intermittent. |
I just tried again and it's not working for me still. So it may be intermittent. |
The AzureRM module has still the same issue also in version 6.13. As AzureRM will not get any new features in the future, I switched to Az module and as expected it works perfectly. https://docs.microsoft.com/en-us/powershell/azure/new-azureps-module-az?view=azps-1.0.0 |
Confirmed the issue is intermittent. I'm getting roughly a 50% success rate depending on the day. |
I am using Az.Network 1.0.0 module and get the same error "The object reference was not set to an instance of the object". However the error message from the api is slightly different.
|
@tobias-geiser, @marknettle, @asmith984, @aconn21, @Woodrum, would you mind updating to the latest Az and checking the repro, so we could get some stats and close issue/continue investigation depending on the results.
|
@kutluomeroglu, could you please try updating to the latest Az version and re-check repro? |
@EvgenyAgafonchikov, I have updated the Az modules, Az.Network is now 1.1.0 and add-azvirtualnetworkpeering worked for me for the first time. Seems like it might be fixed. |
@kutluomeroglu, thanks for checking this. |
Description
Add-AzureRmVirtualNetworkPeering does not work and gives an error. The object reference was not set to an object instance.
Script/Steps for Reproduction
Module Version
Environment Data
Debug Output
The text was updated successfully, but these errors were encountered: