Azure CLI to enable replication for newly added disk to VM in Azure Site Recovery

Azure 0 Reputation points
2024-08-16T09:53:02.81+00:00

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.
Azure Site Recovery
Azure Site Recovery
An Azure native disaster recovery service. Previously known as Microsoft Azure Hyper-V Recovery Manager.
697 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.