EDIT: @rr-4098 Please find the summary of our discussion below.
Summary: Azure Site Recovery Change Azure VM Properties
My question is will updating the VM properties via PowerShell let me get around the target network requirement?
VM name is the internal property, and you should be able to do it at source VM only and that will replicate to the target VM. For network, both portal and PowerShell should work.
I have a number of on Prem VM's in VM with a VMware display name that lists one name, but the guest OS is something else. I need to make sure the replicated VM's, when restored, that the guest OS name does not take on the VMware display name.
ASR will pick the same name as it read when it was enabled for DR, we don't allow changing display name. Display name can be anything. You will see the same name as that of the OS name in the target machine. Because there is no relation between OS name and display name.
Just to confirm ASR will use the same display name as VMware and match the guest OS name even if it is different from the VM display name correct?
Yes, that is correct. Azure Site Recovery (ASR) will use the guest operating system (OS) name as the name of the replicated virtual machine (VM) in the target location, even if it is different from the display name of the VM in VMware.
ASR does not allow changing the display name of the VM during the replication process, so the name of the replicated VM in the target location will always match the guest OS name of the source VM.
We want to restrict VM sizes to either A or D and the smallest VM size possible for cost reasons. So far I have not be able to find a way to change the VM size in ASR via powershell.
Restricting it to a particular VM size is not possible. Because the VM size selection depends on the amount of data replication to Azure.
My problem is I know how to change the VM size on a existing \ running VM in Azure. The problem is how to I change the selected VM size ASR chooses for an on Prem VMware VM.
This states using the portal which I cannot since I do not have the target network setup. This is why I was asking if it can be done via Powershell.
Here are the steps to do so:
Open Azure PowerShell and connect to your Azure account.
Run the following command to get the replication protected item.
Get-AzRecoveryServicesAsrReplicationProtectedItem -FriendlyName <VM name> -ProtectionContainer <Protection container>
Replace <VM name>
with the name of the replicated VM and <Protection container>
with the name of the protection container.
Run the following command to get the replication protected item properties:
$replicatedVMProperties = replicatedVM.ReplicationProtectedItemProperties
Run the following command to set the new VM size or type:
$replicatedVMProperties.TargetVmSize = <new VM size or type>
Replace <new VM size or type>
with the new VM size or type that you want to use.
Run the following command to update the replication protected item:
Set-AzRecoveryServicesAsrReplicationProtectedItem -InputObject $replicatedVM
Once you have changed the VM size or type, the replicated VM will use the new settings after failover. Note that changing the VM size or type may affect the performance and functionality of the replicated VM, so you should test the changes before failover to ensure that they meet your requirements.
Hope this answers your questions. Feel free to reply if you have any questions!
If the response helped, do "Accept Answer" and up-vote it