Reputation: 71
I am trying to create VM using existing VHD which I have on the storage blob. I ran the below command
Add-AzureDisk -DiskName "Keldc1" -MediaLocation "https://*****.blob.core.windows.net/essrestore/Kel-DC01201611012647.vhd" -Label "Bootdisk" -OS "Windows"
the error i reeived is
Add-AzureDisk : BadRequest: The storage account with the name ***** as specified in the VHD URI https://*****.blob.core.windows.net/essrestore/Kel-DC01201611012647.vhd does not exists in the current subscription
I verified I have the subscription is correct and the Storage account is in the same subscription.
Help Please.
Upvotes: 4
Views: 947
Reputation: 11
You probably created Your resources in the new portal, however You could be executing commands on the classic one. Try this,
azure login
azure config mode arm
This will execute the commands on the new portal.
Upvotes: 1
Reputation: 4062
Check with the
Get-AzureSubscription -Current
the current subscription. If that is different from the subscription you are going to use for your disk, use
Select-AzureSubscription -SubscriptionId "id"
and execute the commandlet again. Basically, it checks if there is the storage account specified in your string in the currently used Azure account, and if not, throws the error. Just checked - it should work if the right subscription is selected and there is the storage account in that.
Upvotes: 0