Share via

unallocated disk issue on a Windows Server 2022 Datacenter x64

Bharadia, Chandra 0 Reputation points
2026-03-31T18:22:21.5666667+00:00

Hi

We have a VM in Azure that is periodically having an issue when one of the data disk is showing up as unallocated in disk manager. Restart the VM resolved it previously, but now the same disk is coming up as unallocated. Any suggestions on how to resolve this issue.

Chandra

Azure Virtual Machines
Azure Virtual Machines

An Azure service that is used to provision Windows and Linux virtual machines.

0 comments No comments

4 answers

Sort by: Most helpful
  1. Andriy Bilous 12,096 Reputation points MVP
    2026-03-31T20:27:31.2233333+00:00

    Hello Bharadia, Chandra

    This could be known issue on Azure VMs where data disks (especially Premium SSD or Ultra disks using the NVMe controller) can intermittently lose their partition visibility due to a driver or storage stack hiccup. Steps to harden:

    • Update the Azure VM agent (WindowsAzureGuestAgent) to the latest version
    • Update StorNVMe / disk controller drivers via Device Manager or Windows Update
    • Check Event Viewer → System for errors from sources like disk, storvsc, stornvme, or volmgr around the time the disk went unallocated
    • Check Event Viewer → Application and Services Logs → Microsoft → Windows → Disk as well

    Before attaching anything in the OS, confirm the disk is still properly attached at the Azure layer:

    • Go to VM → Disks in the Azure Portal
    • Verify the data disk shows as Attached (not Detached or in a failed state)
    • Check the disk's Host caching setting and note the LUN number

    Open an Azure Support ticket if the issue persists

    1 person found this answer helpful.

  2. Bharadia, Chandra 0 Reputation points
    2026-04-07T12:24:10.3833333+00:00

    Hi Jilakara

    I have run the diskpart commands from an elevated command prompt. I have attached screen shot for you. The disk is online and shown in red box in the screenshot. I have also attached the disk to another VM and it is showing as being online but unallocated.

    I am currently running TESTDISK and this is taking it's time as it is a slow process. I will update you once it has completed.

    Chandra

    PS Andriy

    I have done the steps you mentioned in your response to my issue. However, this maybe a known issue with Azure VMs especially with Premium SSD disks. Thank you for your response to my original posting of the issue.

    Kind Regards

    Chandra

    0 comments No comments

  3. Jilakara Hemalatha 11,515 Reputation points Microsoft External Staff Moderator
    2026-04-03T01:03:53.75+00:00

    Thanks for checking all the earlier points and sharing the details.

    Since the disk is still showing as attached in Azure and you’re seeing volmgr event ID 46, this usually means the VM is not able to read the partition information on the disk. That’s why it is appearing as unallocated. So this is not a detachment issue, it’s more likely a partition or file system level problem inside the OS.

    Could you please run the below commands once from an elevated command prompt and share the output:

    diskpart
    list disk
    select disk <number>
    detail disk
    list volume
    

    Also try doing a rescan from Disk Management (Action → Rescan Disks) and check if there is any change.

    One important thing — please don’t initialize or format the disk, as that can overwrite the data if it’s still recoverable.

    If the disk still shows as unallocated, then most likely the partition table is corrupted or not readable. In that case, you can try attaching the disk to another VM and check if it shows up there or use a recovery tool if the data is important.

    Also, just recheck once in Azure that the disk is attached to the correct VM and LUN, and if host caching is enabled, try setting it to None and restart the VM.

    If the disk still shows as Unallocated after the above steps:

    The partition table may be corrupted or unreadable by Windows — this is recoverable in most cases. Here are the next options:

    • Try attaching the disk to another VM and check if it shows up there. This helps confirm whether the issue is VM-specific or disk-level.
    • Use TestDisk (free, available at cgsecurity.org) — this is a non-destructive recovery tool that can scan and restore a corrupted partition table without any data loss. It is the recommended first step before trying any paid recovery tool.

    Reference: https://learn.microsoft.com/en-us/azure/virtual-machines/windows/attach-managed-disk-portal

    https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-machines/windows/troubleshoot-recovery-disks-portal-windows


  4. Tyler Koster 0 Reputation points
    2026-03-31T20:45:09.23+00:00

    This sounds like it could be more than just a temporary glitch, especially since it’s happening repeatedly. I’d suggest first checking in Disk Management if the disk is showing as offline or if the partition itself is missing, and also verify in Azure portal that the disk is still properly attached to the VM. It might be worth looking into disk health, recent changes, or any OS/driver updates as well. If the data is important, taking a backup before trying anything like reinitializing the disk would be a safe step.

    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.