VM Created from custom image should be able to select storage account for VHD
When we try to create a virtual machine from a custom image the VHD's for the new virtual machine are created in the same storage account as the custom image. This is not ideal because most customers have different environments in different subscriptions so they are forced to copy the image into storage account in each subscriptions. It is not easy to copy the images between the storage accounts either.
Support for this feature was enabled through the addition of Managed Disks where the underlying storage for the VM Image and VM disks are managed by Azure. This removes the limit that was previously imposed by using a single storage account.
John Garland commented
This also complicates any use of the "Deploy to Azure" button for using templates to provision VM's based on Custom Images - there's a solution whereby a "Transfer VM" is stood up as an intermediary - (see https://blogs.technet.microsoft.com/paulomarques/2016/04/07/azure-arm-template-to-deploy-a-new-vm-in-a-new-storage-account-deployed-at-same-time-from-a-custom-image However, that's a bit of a (clever/useful) hack around a problem that would be better solved at its core.
It's been about 18 months since the most recent "Under Review" comment was posted. Any update?
The use case is really relevant.
Same resourcegroup(where image is located) with different storage account(different location) got below error. Please resolve.
New-AzureRmVM : Source and destination storage accounts for disk <name> are different.
OperationID : ''
+ CategoryInfo : CloseError: (:) [New-AzureRmVM], ComputeCloudException
+ FullyQualifiedErrorId : Microsoft.Azure.Commands.Compute.NewAzureVMCommand
Tiger Peng commented
What is the status for this request?
Without being able to use image from different storage account/resource group (maybe we can call it image repository), I cannot fully automatize our infrastructure deployment through template. We need it to deploy same image to multiple resource groups (multiple clients).
+1, this would be really helpfull and would avoid additional work
Brian Hartley commented
That would be a great improvement for us !! Thanks.
In the meantime is there a way to mange copying images between storage accounts with powershell (add-azureRmVhd does not seem to have an option to use a azure source for the copy) ?
Any news on this? mass deploying RHAT vms thus annoying that I have to move VHD's around and create new images for each environment!!!
Simon Eastwood commented
Hi I see your comment but when will this feature be available could you be more specific.
Is there any sort of work around for this issue would be nice to know
Samir FARHAT (MVP) commented
We know that there are many other priorities, but all users are asking for this feature, and it's the most supported idea in this category. At least, we want an ETA or the progress of this feature study. It's been 1 year since this feature is under review.
Has there been any update to this? We have to run Azcopy to move images around.
Vijayaraghavan L commented
I am still waiting to hear on this. Has there been any progress?
Wiliam Laaksonen commented
Any update for this improvement? A time frame.
Vijayaraghavan L commented
Any update on this? Wondering if we could have a workaround meanwhile. I have the same situation as described by others below.
Gokul Gopinadhan commented
I am working on Azure migration and set-up . Any thing done on this?. Companies go for golden images not from gallery. We need to deploy on multiple storage account for segregation.
Is there any workaround for this? It is not practical to have the same "golden image" for each storage account and keep them all synchronized plus pay for all of that wasted storage. Please provide a parameter to specify the destination storage location for New-AzureVMConfig cmdlet during VM creation, so we can have a central image repository in one storage account and be able to deploy a VM into another storage account. The MS image gallery obviously has this functionality to deploy their golden image a specified storage account, so a custom image should not be any different.
I can't figure out what the -MediaLocation parameter is used for, according to MSDN it says "Specifies the Azure storage location for the new virtual machine disk" which sounds like what we need, but there are no examples of how to properly use this, if it is indeed a solution please provide documentation.