The request content was invalid and could not be deserialized
Cmdlet(s)
PowerShell Version
PSVersion 5.1.15063.483
Module Version
ModuleType Version Name ExportedCommands
Manifest 4.2.0 Azure
Script 3.2.0 Azure.Storage
Script 3.2.0 AzureRM.Compute
Script 3.2.0 AzureRM.profile
Script 1.0.0.0 ISE
Manifest 3.1.0.0 Microsoft.PowerShell.Management
Manifest 3.1.0.0 Microsoft.PowerShell.Utility
OS Version
BuildVersion 10.0.15063.483
Description
The Azure PS script below was working before (don't know exact PS module version) but now it is broken with the latest Azure RM module :
Debug Output
New-AzureRmDisk : The request content was invalid and could not be deserialized: 'Could not find member 'AccountType' on object of type 'ResourceDefinition'. Path 'AccountType', line 2, position 17.'. ErrorCode: InvalidRequestContent ErrorMessage: The request content was invalid and could not be deserialized: 'Could not find member 'AccountType' on object of type 'ResourceDefinition'. Path 'AccountType', line 2, position 17.'. StatusCode: 400 ReasonPhrase: Bad Request OperationID : cf65427a-d34f-4d84-b63d-3f2e3a12dcf2 At E:\My Documents\Onedrive\VirtualMachines\CreateVMfromVHD.ps1:40 char:11
- $osDisk = New-AzureRmDisk -DiskName "WebVMDEV1OSDisk1" `
-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~- CategoryInfo : NotSpecified: (:) [New-AzureRmDisk], ComputeCloudException
- FullyQualifiedErrorId : Microsoft.Azure.Commands.Compute.Common.ComputeCloudException,Microsoft.Azure.Commands.Compute.Automation.NewAzureRmDisk
Script/Steps for Reproduction
$location = "West Europe" $rgName = "RGMES"
$osDiskConfig = New-AzureRmDiskConfig -AccountType StandardLRS -Location $location -CreateOption Import -SourceUri "https://xxx.blob.core.windows.net/vmdisks/VM-GEN1-WIN10.vhd" $osDisk = New-AzureRmDisk -DiskName "WebVMDEV1OSDisk1" -Disk $osDiskConfig -ResourceGroupName $rgName
Any workaround?
Br,
Kris
@navimondo Hey Kris, we are currently tracking this issue here: https://github.com/Azure/azure-powershell/issues/4309
We plan on getting a hot fix out for this early next week. Please let us know if you have any questions!
@cormacpayne Would switching to a previous release solve the problem?
@navimondo using Azure PowerShell 4.1.0 (AzureRM.Compute 3.1.0) should continue to work until the hot fix is available on ~~Monday~~ Tuesday.
Edit: Updated date of release to Tuesday.
Any news?
@ShaharZuberi we are looking to get version 4.2.1 of Azure PowerShell out tomorrow (Tuesday) that will contain the fix for this bug.
Same issue here as well. waiting for the fix. Is the new version out yet?
same here, still an issue, I have 3.2.0
@navimondo @ShaharZuberi @binubk @ericcsinger Hey everyone, we just released version 4.2.1 of Azure PowerShell which includes a fix for this issue. You can find the different installation platforms, as well as information about the changes made, in the GitHub release: https://github.com/Azure/azure-powershell/releases/tag/v4.2.1-July2017
Please let us know if you have any other questions!
Tested... Its working. Awesome !!!
Tested as well and working, thanks!