Detach a disk storage from an expired subscription

Joykirat Singh 0 Reputation points
2026-07-02T18:18:57.4833333+00:00

Hi,

My subscription (MURGe-Lab-v3_Joykirat_Singh) expired on 30th June, and most of my virtual machines' status changed to Stopped (deallocated). However, two of the running virtual machines are still in a stopped condition, due to which the Disk storage is attached to the machine. And without the disk storage detached and I cannot export the data from the storage.

There is also no way to hard-stop the virtual machine because the subscription has ended.

Virtual machine I am referring:

  1. joy-4-a100_644e2da0 | subscription: MURGe-Lab-v3_Joykirat_Singh
  2. joy-a100-pland-2 | subscription: MURGe-Lab-v3_Joykirat_Singh

I get the error while trying to export the data from the storage: Exporting disks is allowed only when the VM is deallocated or the disk is unattached, or when the disk is not in ReadyToUpload or ActiveUpload state.

Thanks,

Joykirat Singh

Azure Disk Storage
Azure Disk Storage

A high-performance, durable block storage designed to be used with Azure Virtual Machines and Azure VMware Solution.

0 comments No comments

1 answer

Sort by: Newest
  1. Jerald Felix 18,760 Reputation points Volunteer Moderator
    2026-07-03T00:52:00.7733333+00:00

    Hello Joykirat Singh,

    Greetings! Thanks for raising this question in the Q&A forum.

    The core issue here is that once a subscription expires or is disabled, Azure marks it as read only. In this state you cannot perform any write actions on the subscription, including stopping, deallocating, or exporting disks, even if the VM shows a Stopped status. Only a VM that has been properly deallocated (Stopped (deallocated)) allows its disk to be exported, and a disabled subscription blocks that deallocation action entirely. This is why you are seeing the error about the disk not being unattached or the VM not being deallocated, the underlying cause is really the subscription state rather than the disk or VM configuration.

    Here is how to resolve this:

    Check the exact subscription status Go to the Azure Portal, search for Subscriptions, and open MURGe-Lab-v3_Joykirat_Singh. Confirm whether it shows as Disabled or Expired. If you attempt a write action you will typically see an error similar to:

    The subscription 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' is disabled and therefore marked as read only. You cannot perform any write actions on this subscription until it is re-enabled. (Code: ReadOnlyDisabledSubscription)
    

    Reactivate the subscription if it is a Pay As You Go or standard offer If this is a normal subscription that lapsed due to non payment, go to Cost Management + Billing and check if a Reactivate option is available. Once reactivated, there is usually a delay of about 10 to 30 minutes before write actions such as Stop, Deallocate, and Disk export become available again.

    If this is a sponsored, lab, or grant based subscription Since the name MURGe-Lab-v3 suggests this is a lab or research sponsorship type subscription rather than a Pay As You Go account, self service reactivation is often not available once the sponsorship period ends. In that case:

    • Check with the subscription owner or lab administrator who provisioned the sponsorship, as only they may be able to renew or extend it.
      • If no extension is possible, you will need to contact Azure Support directly, since expired sponsorship subscriptions usually go through a limited data retention window before resources are permanently deleted.
      Open an Azure Support request for a data export exception From the Azure Support page, open a Billing support request and explain that you need temporary write access, or a data export exception, to retrieve disk data from an expired subscription. Support engineers can sometimes grant a short reactivation window or coordinate a supported export path even when self service reactivation is not shown in the portal. Include your subscription ID and the VM names you listed so the request can be routed correctly. Once write access is restored, deallocate and export After the subscription is reactivated:
            az vm deallocate --resource-group <YourResourceGroup> --name joy-4-a100_644e2da0
      

    az vm deallocate --resource-group <YourResourceGroup> --name joy-a100-pland-2 ```

      Once each VM shows **Stopped (deallocated)**, you can generate a SAS URL for the disk and export it using Storage Explorer or AzCopy, as described in [Download a Windows or Linux VHD from Azure](https://learn.microsoft.com/en-us/azure/virtual-machines/disks-download-vhd).
      
    

    Please be aware that if the subscription has passed its final retention period, resources including disks may already be scheduled for deletion, so it is worth raising the support request as soon as possible rather than waiting.

    If this answer helps you kindly accept the answer which will help others who have similar questions.

    Best Regards,

    Jerald Felix.

    Was this answer helpful?

    0 comments No comments

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.