https://learn.microsoft.com/en-us/azure/virtual-machines/linux/attach-disk-portal
Please check mention below link it may help you thanks
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I've got a requirement to mount a data disk into my filesystem immediately at first boot, with no human intervention. Since device names are unreliable- I figured I would try and create a .vhd file with a labeled empty disk as my data disk's image- so that I can refer to the disk by it's label.
I'm attempting to mount this disk like so-
"storageProfile": {
"imageReference": {
"id": "[resourceId('Microsoft.Compute/images', variables('imageName'))]"
},
"osDisk": {
"name": "[concat(variables('vmName'),'_OSDisk')]",
"osType": "Linux",
"createOption": "FromImage",
"managedDisk": {
"storageAccountType": "Premium_LRS"
},
"diskSizeGB": 32
},
"dataDisks" : [
{
"lun": 0,
"name": "[concat(variables('vmName'),'_ContainerDisk')]",
"createOption": "empty",
"vhd": { "uri": "https://airgapwmsa.blob.core.windows.net/files/containerdisk.vhd" }
},
{
"lun": 1,
"name": "[concat(variables('vmName'),'_CephDisk')]",
"createOption": "empty",
"diskSizeGB": 1024
}
]
},
but running into this error-
Deployment failed. Correlation ID: 72545299-4710-46b6-a89b-baada39badc7. {
"error": {
"code": "OperationNotAllowed",
"message": "Addition of a blob based disk to VM with managed disks is not supported.",
"target": "dataDisk"
}
}
Since this approach isn't working- I'd like to either fix this somehow, or find an alternate approach. Any ideas?
https://learn.microsoft.com/en-us/azure/virtual-machines/linux/attach-disk-portal
Please check mention below link it may help you thanks