Closed iaingblack closed 6 years ago
I am seeing the same.
@hyonholee @singhkays would you mind taking a look at this issue?
Just tried it with the latest PS 4.3.0 and it's worked fine. Can you try with the latest bits?
PS C:\Users\kasing> $diskConfig = New-AzureRmDiskConfig -AccountType "StandardLRS" -Location "West US 2" -CreateOption Import -SourceUri "https://abcd9374.blob.core.windows.net/vhds/osdiskforlinuxsimple.vhd" -OsType Linux
New-AzureRmDisk -DiskName osdiskforlinuxsimple -Disk $diskConfig -ResourceGroupName "abcd"
ResourceGroupName : abcd
AccountType : StandardLRS
OwnerId :
ManagedBy :
Sku : Microsoft.Azure.Management.Compute.Models.DiskSku
TimeCreated : 8/11/2017 11:05:01 AM
OsType : Linux
CreationData : Microsoft.Azure.Management.Compute.Models.CreationData
DiskSizeGB :
EncryptionSettings :
ProvisioningState : Succeeded
Id : /subscriptions/***/resourceGroups/abcd/providers/Microsoft.Compute/disks/osdiskforlinuxsimple
Name : osdiskforlinuxsimple
Type : Microsoft.Compute/disks
Location : westus2
Tags : {}
Same issue here with -Location being 'null'. PS ver 4.0 and AzureRM.Profile ver 3.2.1
@j4y-k Please try with the latest version and see if you still run into this
I found that I could call New-AzureRmDisk multiple times successfully until I call Add-AzureRmDataDisk, after which subsequent calls to New-AzureRmDisk fail with the -Location error. To work around it I have to close and restart PowerShell ISE.
My workaround currently is to call New-AzureRMDisk for all the disks I'll need, then call Add-AzureRmDataDisk for each (that works), and then update the VM and close the session.
updated my powershell modules this morning:
ModuleType Version Name
Manifest 3.2.1 AzureRM.Compute
Manifest 4.2.1 AzureRM.Network
Manifest 3.2.1 AzureRM.Profile
Manifest 4.2.1 AzureRM.Resources
Script 1.0.0.0 ISE
Manifest 3.1.0.0 Microsoft.PowerShell.Management
Manifest 3.0.0.0 Microsoft.PowerShell.Security
Manifest 3.1.0.0 Microsoft.PowerShell.Utility
Manifest 3.0.0.0 Microsoft.WSMan.Management
Name Value
PSVersion 5.1.15063.502
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.15063.502
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
still getting the error. New-AzureRmDisk : 'Location' cannot be null. At C:\Users\pierrer\Documents\Github\Igloo-POC\PSFiles\Deploy-VM-template.ps1:124 char:26
+ CategoryInfo : NotSpecified: (:) [New-AzureRmDisk], ValidationException
+ FullyQualifiedErrorId : Microsoft.Rest.ValidationException,Microsoft.Azure.Commands.Compute.Automation.NewAzureRmDisk
where can i find the MSI for the azure modules that where available before azure-powershell.4.2.1.msi was released? that seems to be the build that broke the cmdlets
@pierreroman The latest PS release is now live. Please update through WebPi and try again.
Closing as this issue seems to be fixed. Please feel free to re-open this issue if this is not the case.
Cmdlet(s)
New-AzureRmDiskConfig and New-AzureRmDisk
PowerShell Version
5.0.10586.117
Module Version
4.2.1
OS Version
10.0.10586.117
Description
Adding a disk to a VM works first time, but subsequent calls fail.
Debug Output
Nothing extra interesting happens, simply gets a login token
Script/Steps for Reproduction
Run these commands (assuming existing VM and storage container)
This works. Then run something similar to add a disk to another or same VM fails as it is missing a location. But, location is not a parameter on New-AzureRMDisk and is supplied on the New-AzureRMDiskConfig.
I tried blanking variables etc... But, only solution I found was a new console sessions and doing for each disk required. Not workable really. Thanks!