Reputation: 1225
I'm trying to move a virtual machine (ARM) between subscriptions.
With V1 machines the process was straight forward.
I have tried to create a new ARM virtual machine and replace the vhd file, but this does not work as the vhd blob has a lease even when the machine is shut down.
Is there a way using PowerShell to achieve this?
Upvotes: 1
Views: 527
Reputation: 12228
This should work -
Set-AzureRmVMOSDisk -VM $vm -Name "test" -VhdUri $uri -CreateOption attach -Windows
Wrapped into the rest of a VM Create script
Upvotes: 1