Not that long ago I have started using Azure to host some Ubuntu VM's. I have begun with a personal account with a free trial to poke around with it. After a month, my trial had run out of credits. I had to setup another account registered for a company (rather than individual). Therefore, now, I have to move all VM's from the old account to the new one.
I had tried a couple of things, but apparently Azure portal does not support it. So, I have ended up spinning a new virtual machine with Windows and PowerShell with a hope that I can download VHD files from the old account and then create actual storage disks from them. However, I am stuck on Save-AzureRmVhd
command as it is just resulting in:
Save-AzureRmVhd : Parameter set cannot be resolved using the specified named parameters.
At line:1 char:1
+ Save-AzureRmVhd -Source $sourceVHD -LocalFilePath $destinationVHD
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [Save-AzureRmVhd], ParameterBindingException
+ FullyQualifiedErrorId : AmbiguousParameterSet,Microsoft.Azure.Commands.Compute.StorageServices.SaveAzureVhdCommand
It's pretty much my first time using PowerShell, but I think I have used the command correctly, following this: https://msdn.microsoft.com/en-us/library/mt622705.aspx.
The exact command I'm using (with paths specified as variables):
Save-AzureRmVhd -Source $sourceVHD -LocalFilePath $destinationVHD
tl;dr How to move VM's storage disks between Azure accounts when the source has a disabled subscription (ended free trial)?
-ResourceGroupName
parameter or-StorageKey
parameter. I don't see that in your command. – Gaurav Mantri