Error while creating Vm with Shared Disk

KJA 26 Reputation points
2022-04-04T18:15:22.123+00:00

Dear All

I am trying to create a Vm with shared disks but I get the following error. Could someone please shed some light?

/providers/Microsoft.Compute/disks/VM1_DataDisk_0' with maxShares 2 supports only Disk CachingType 'None'."}]}

Appreciate your response.

Thank you

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
7,101 questions
Azure Disk Storage
Azure Disk Storage
A high-performance, durable block storage designed to be used with Azure Virtual Machines and Azure VMware Solution.
572 questions
0 comments No comments
{count} vote

Accepted answer
  1. shiva patpi 13,131 Reputation points Microsoft Employee
    2022-04-04T22:13:48.59+00:00

    Hello @KaizadAnklesaria-2991 ,

    Basically , Shared disks can only be attached with Host Caching "None". By default, Premium SSD data disk will have the "Read-Only" host caching set.   
    

    In order to attach the shared disks for the VM, you will need to do the following:

    1. Navigate to the Disks
    2. Click on Attach existing disks
    3. Select the host caching to "NONE"
    4. Continue to select your existing shared disk from the list.
    5. Save it.

    189913-image.png

    https://learn.microsoft.com/en-us/azure/virtual-machines/disks-shared
    https://learn.microsoft.com/en-us/azure/virtual-machines/disks-shared-enable?tabs=azure-portal

    While creating, if you see the failed deployment you can redeploy and before redeploying click on Edit
    If you see the parameter Caching - it will show as "ReadOnly" - Change it to "None"

    [{"lun":0,"createOption":"attach","deleteOption":"Detach","caching":"None","writeAcceleratorEnabled":false,"id":"/subscriptions/subid/resourceGroups/SHAREDDISK/providers/Microsoft.Compute/disks/shareddisk","name":null,"storageAccountType":null,"diskSizeGB":null,"diskEncryptionSet":null}]

    189914-image.png

    2 people found this answer helpful.
    0 comments No comments

4 additional answers

Sort by: Most helpful
  1. DAC Admin 6 Reputation points
    2022-04-19T17:31:00.383+00:00

    Hello,

    First you need to select Host Caching as "None" and then select the shared disk.

    1 person found this answer helpful.
    0 comments No comments

  2. Pradeep Kommaraju 2,546 Reputation points
    2022-04-04T21:43:45.05+00:00

    Hi @KaizadAnklesaria-2991

    Thanks for reaching out to Microsoft Q&A Forum .

    I would like to explain the error and workaround as follows :

    189921-image.png

    Hope this was helpful

    Thanks,
    Pradeep

    --------------------------------------------------------------------

    Please don't forget to 'Accept the answer " or "up-vote" if this solved your issue

    0 comments No comments

  3. KJA 26 Reputation points
    2022-04-06T18:18:43.817+00:00

    Dear All

    Many thanks for taking the time to respond and apologies for the delayed response. I was actually waiting for an email notification that someone has posted an answer for my question. When I logged into the community forum I saw that my post had an answer.

    Although the solution provided by @shiva patpi did work, I have a question.

    190711-image2.jpgWhen I try to create my VM I am unable to select Host Caching as 'None' as the default option is 'Read Only' and greyed out. I have attached a screenshot for your reference.

    0 comments No comments

  4. Jegadheesan Jayavel 41 Reputation points
    2022-06-02T19:46:26.657+00:00

    Thanks. This solution worked to attach the disk.

    After successful attachment, On the shared drive, When we place a file from one VM same file is not shown in another VM.

    Do we need to do any additional steps or permissions? How to show the same files from both the machine on the shared drive?

    0 comments No comments