How to Fix Storage Space Direct Virtual Disk Detached after Server Reboot #Storage Space Redirect #S2D #Microsoft #Hyper-V #PowerShell

Today, my customer is call me and said their VMs are disappear at Windows Server 2019 Hyper-V host after reboot, I noticed the virtual disk detached, the VMs are up and running after I re-attach the virtual disk, but the issue was not be fixed because when I try to reboot the Windows Server 2019 Hyper-V host and the virtual disk detached again.

I am going to show you how to fix this issue by following steps.

  1. Login to the Windows Server 2019 Hyper-V host server.
  2. Open Server Manager select File and Storage Services.

  3. On the File and Storage Services page, select Storage Pools.

  4. on the Storage Pools, select the storage Pool, right-click the virtual disk which detached and click Properties.

  5. on the Properties page, expend Details, select IsManualAttach from the virtual disk Property.

  6. You will see the Value is True, this is the root cause of virtual disk detached after server reboot.

  7. We can use PowerShell cmdlet to change the Value from True to False.
    
    Get-VirtualDisk | Where-Object {$_.IsManualAttach –EQ  $True} | Set-VirtualDisk –IsManualAttach $False
    
    

  8. The virtual disk attaches atomically. And the virtual disk detached issue won’t happen after server reboot.

  9. Open Hyper-V Manager, all VMs are up and running again.

Hope you enjoy this post.

Cary Sun

Twitter: @SifuSun

About Post Author

Leave a Reply