0

I am tying to create a page blob using the storage API and add it as a disk to the Virtual Machine. Is there a way this can be done ? Currently when I create a blob and add it as the disk , the VM fails with provisioning state failed.

nwarriorch
  • 337
  • 6
  • 16

1 Answers1

0

It sounds like you want to create a data disk using Azure Storage SDK for Java to attach page blob as data disk for Linux VM. However, some concepts you understanded are note accurate.

Firstly, you need to create a VHD file on local environment. As references, you can try to follow the below documents to do it.

  1. On Windows, please refer to the document Create and Use a Virtual Hard Disk on Windows 7 to create a VHD file.
  2. On Linux or MacOS, you can install & configure QEMU/VirtualBox/KVM to create a disk image and convert it. For example, to convert a qemu image via command qemu-image convert.

For more information, please see About disks and VHDs for Azure virtual machines

Secondly, you upload the VHD file created to Azure Blob Storage as a page blob via AzCopy or follow the related section of the tutorial Creating and Uploading a Virtual Hard Disk that Contains the Linux Operating System.

Then, you can refer to the document Add a disk to a Linux VM to attach the data disk on Azure Storage.

Meanwhile, based on my understanding, I think you just want to extend the filesystem of your Linux VM. So the other solution may be suitable for your needs, which mount Azure File Storage on Linux VMs using SMB protocol. More details, please refer to How to use Azure File Storage with Linux.

Hope it helps. Any concern, please feel free to let me know.

jelmer
  • 2,405
  • 14
  • 27
Peter Pan
  • 23,476
  • 4
  • 25
  • 43