Quantcast
Channel: Azure Virtual Machines forum
Viewing all articles
Browse latest Browse all 12545

Issue - Deployment of Virtual Machine via PowerShell to Secondary Storage Account

$
0
0
Issue - We have 2 Storage accounts in subscription.  Both in the same affinity group and region.  Cannot allocate VMs to 2nd storage account via PowerShell..

1. Have an Azure Subscription.
2. Create Affinity Group (AGEAST)
3. Create VNET in Affinity Group
4. Create Storage Account in Affinity Group (storageaccount1)

5. Using PowerShell
Set the default Subscription and StorageAccount
$subscription = "Our subscription Name"
$storageaccount = 'storageacount1'
Set-AzureSubscription -SubscriptionName $subscription -CurrentStorageAccount $storageaccount
Select-AzureSubscription -Default -SubscriptionName $subscription

Allocate VMs via PowerShell to new Cloud Service - VMs go to storageaccount1  (No Issues....)

6. Create a second Storage Account in Affinity Group (storageacount2) Same region etc. as the first storage account..

7. Using PowerShell
Set the default Subscription and StorageAccount
$subscription = "Our subscription Name"
$storageaccount = 'storageacount2'
Set-AzureSubscription -SubscriptionName $subscription -CurrentStorageAccount $storageaccount
Select-AzureSubscription -Default -SubscriptionName $subscription

Allocate VMs via PowerShell to new Cloud Service - VMs go to storageaccount1  (ISSUE - should go to storageaccount2)

8.  However when we allocate the VMs via the Azure Console we can select the storage account and it get placed there properly.

Viewing all articles
Browse latest Browse all 12545

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>