How can I expand the disk storage of an Azure ML Compute Instance?

Rorato Riccardo 25 Reputation points
2025-05-12T14:29:31.1233333+00:00

I am using an Azure Machine Learning Compute Instance to host a GPU-heavy workload, but without using any Azure ML functionalities (I get into the remote terminal, and work from there). I need to expand the default disk storage to download larger models, but I keep hitting the limit. I have a Standard_NC48ads_A100_v4 instance, the biggest available to me, and with the command df -h
I get:
Screenshot from 2025-05-12 16-26-57

I would like to expand this drive (without changing RAM, CPU and GPU configuration if possible). How can I do it? If possible, I would like to avoid mounting a new drive on the instance, but that's ok if it is the only solution.

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
9,035 questions
0 comments No comments
{count} votes

Accepted answer
  1. Manas Mohanty 5,940 Reputation points Microsoft External Staff Moderator
    2025-05-14T11:32:38.3133333+00:00

    Hi @Rorato Riccardo,

    Manas from Azure ML team here. Be default, Azure ML computes are immutable ones and does not have option to attach additional disks.

    But You can attach as external VM through attach compute option or through CLI and add additional disks (either through CLI or UI) as Nikhil Duserla has suggested here.

    Attached relevant GitHub code on computes.

    https://github.com/Azure/azureml-examples/blob/main/sdk/python/resources/compute/compute.ipynb

    Thank you.

    1 person found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. Nikhil Duserla 7,935 Reputation points Microsoft External Staff Moderator
    2025-05-12T16:11:22.4066667+00:00

    Hello @Rorato Riccardo,

    To make a drive bigger in Azure without changing the RAM, CPU, or GPU:

    1. Turn off the virtual machine (VM) to keep your data safe.
    2. In the Azure portal, go to your VM settings and click on “Disks.”
    3. Pick the disk you want to make bigger and change its size.
    4. Turn the VM back on, then increase the file system size inside the operating system so it can use the extra space.

    Please follow the below commands and steps-

    Use command: df -h and lsblk to check the location and type of the disk. User's image

    User's image

    nvme0n2 is the added disk.

    Use command: sudo fdisk /dev/nvme0n2

    and after this you will get a pop up then enter "p", afterwards enter "d", then later enter "n" and default partition (1) and press "enter" two times and finally enter "w". Now the partitions have been altered.

    User's image

    If you have any further queries, do let us know.

    Hope the answer is helpful, please click "Accept Answer" and "Upvote it."


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.