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.
- Login to the Windows Server 2019 Hyper-V host server.
-
Open Server Manager select File and Storage Services.
-
On the File and Storage Services page, select Storage Pools.
-
on the Storage Pools, select the storage Pool, right-click the virtual disk which detached and click Properties.
-
on the Properties page, expend Details, select IsManualAttach from the virtual disk Property.
-
You will see the Value is True, this is the root cause of virtual disk detached after server reboot.
-
We can use PowerShell cmdlet to change the Value from True to False.
</p><p>Get-VirtualDisk | Where-Object {$_.IsManualAttach –EQ $True} | Set-VirtualDisk –IsManualAttach $False </p><p>
-
The virtual disk attaches atomically. And the virtual disk detached issue won’t happen after server reboot.
-
Open Hyper-V Manager, all VMs are up and running again.
Hope you enjoy this post.
Cary Sun
Twitter: @SifuSun
Thank you for the quick and easy guide.
No longer need to remote in to re-attach now!
Much appreciated.