Is it possible to delete the temporary disk that gets created with the VM Size while creating VM Instance?

Prem Jha 140 Reputation points
2025-12-22T06:17:08.8266667+00:00

I have created a New Virtual machine using Azure Python SDK. The VM Size which I picked up comes with a temporary disk with it and that is not required by me. I want to get rid of that temporary disk and want to delete it. How can I make sure to delete this default temporary disk? If by some means this temporary disk is not designed to be deleted then is there a better way to convert this temporary disk to a fully usable managed data disks of some different size (small or larger) than the default temporary disk size with which it comes?

Azure App Configuration
Azure App Configuration
An Azure service that provides hosted, universal storage for Azure app configurations.
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Q&A Assist
    2025-12-22T06:17:19.9233333+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    In Azure, the temporary disk that is created with a virtual machine (VM) is not designed to be deleted. It is a local disk that provides short-term storage for applications and processes, and its data may be lost during maintenance events or if the VM is moved to a different host. The temporary disk is intended for transient data such as page files or swap files.

    Since the temporary disk is not a managed disk and is tied to the VM's lifecycle, you cannot delete it independently. If you do not want to use the temporary disk, you can simply avoid storing any data on it. However, it will still be present as part of the VM configuration.

    If you need to manage storage more effectively, consider using managed data disks for your applications and data instead, as they offer more flexibility and control over deletion and management.


    References:

    0 comments No comments

  2. Siddhesh Desai 740 Reputation points Microsoft External Staff Moderator
    2025-12-22T14:31:41.0733333+00:00

    Hi @Prem Jha

    Thank you for reaching out to Microsoft Q&A

    In Azure, the temporary disk that is created with a virtual machine (VM) cannot be deleted It is a local disk that provides short-term storage for applications and processes, and its data may be lost during maintenance events or if the VM is moved to a different host.

    Reference: https://dori-uw-1.kuma-moon.com/en-us/answers/questions/1324841/remove-temporary-d-drive-from-azue-vm There are specific VM SKUs that have it and others that don't. If you don't want the temp drive, then you have to reprovision the VM to an SKU that doesn't have it.


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.