Azure-cli: Error when peering two Virtual Networks on Linux OS

Created on 10 Dec 2020  路  12Comments  路  Source: Azure/azure-cli

az network vnet peering create command fails on ubuntu 18.04 when trying to peer two Vnets.

Az cli verison = 2.16

Have tried multiple ways of writing the script from passing resource ID's as variables, hardcoding the VNet names/id's but always receive cli.azure.cli.core.azclierror : BadRequestError: Cannot parse the request.
BadRequestError: Cannot parse the request.

error occurs when peering VNets in same RG or separate.

Error message when run with --debug:
"error": {
"code": "InvalidRequestFormat",
"message": "Cannot parse the request.",
"details": [
{
"code": "InvalidJson",
"message": "Could not find member 'syncRemoteAddressSpace' on object of type 'VirtualNetworkPeeringProperties'. Path 'properties.syncRemoteAddressSpace', line 1, position 489."
}
]
}
}

Network OKR3.2 Candidate feature-request

All 12 comments

network

Hi. I do get the same message in CloudShell.

+1 seeing same error when creating a peering.

+1 and now it's getting really annoying as the hosted Agents in Azure DevOps have just been switched to 2.16 - So no one using Azure DevOps can create any network peerings using the Azure CLI task anylonger.

We are proactively following up with service team about this and will update later.

any update on this one?

@nboeckmann, @djr29578, @runemy , @akshaysngupta, @msyyc - the following commands can be use to downgrade the version and unblock your builds on the hosted agents:

Windows:

choco uninstall azure-cli
choco install azure-cli --version 2.15.1
az version

Ubuntu:

sudo apt-get remove azure-cli
sudo apt-get install azure-cli=2.15.1-1~focal
az version

Please keep us posted on any issues with them. Thanks!

Hey @alepauly,

that works! Thank you!

Nils

Also, for MacOS:

brew uninstall azure-cli
brew tap-new $USER/old-azure-cli
brew extract --version=2.15.1 azure-cli $USER/old-azure-cli
brew install [email protected]
az version

Thanks for comment. We have found the problem and it will be fixed in new version(will be released at about 2020/12/31). The problem could be avoided temporarily through downgrading version to 2.15.1.

image

Was this page helpful?
0 / 5 - 0 ratings