Every Azure virtual machine comes with a certain amount of storage for it’s root volume, plus a few hundred GigaBytes of instance storage which will get deleted if you reboot the VM. For storing data you can either create a new disk and attach it to your VM, or you can resize the root volume with a little trick I learned.
We’re going to use Cloudxplorer to do the actual resizing of a disk attached to an Ubuntu VM, so you’ll need to install that first.
The first step is to log in to the Azure Portal and stop the VM you want to edit. Wait for the VM to properly stop before doing anything else.
Now have a look at the storage account in which your VHD resides and click “Manage Access Keys”. Take note of the storage account name and primary access key.
In Cloudxplorer choose Accounts > New > Azure Blobs Account and insert your storage account name* and primary access key.
Once your storage account shows up, right-click the VHD you want to resize and choose break lease. This will decouple the VHD from the VM. Right-click the VHD again and choose expand virtual disk.
After the resize operation is done you can right-click the VHD to acquire lease and attach the VHD to the VM again. In the Azure Portal you can then start the VM.