Azure CLI to enable replication for newly added disk to VM in Azure Site Recovery
I am trying to enable the replication for newly added disk to VM which is part of ASR. I am trying to enable it using Azure CLI but cant do so. Below is the command used to enable replciation but no luck as getting error message, can someone guide or help advise on this.
az site-recovery protected-item update \
-g <vault_RG> \
--fabric-name <fabric_name> \
-n <protected_item_name> \
--protection-container <prtotecion_contaoner_name> \
--vault-name <vault_name> \
--add properties.providerSpecificDetails.protectedManagedDisks '{"diskId":"<disk_id>"}'
Error Message:
(BadRequest) One or more disks to be replicated need to be specified for the virtual machine.
Code: BadRequest
Message: One or more disks to be replicated need to be specified for the virtual machine.
Exception Details: (VMDisksMissing) One or more disks to be replicated need to be specified for the virtual machine.
Code: VMDisksMissing
Message: One or more disks to be replicated need to be specified for the virtual machine.