Quick Note: Automount Windows Storage Pools

If you have created a Storage Pool on a machine it will automatically mount during reboots. But if you were to reinstall the Windows Server OS (clean install / upgrade) the storage pools may not be automatically mounted during restarts – something I discovered as my replication node did a restart due to updates and then Hyper-V could not access the pool with the replicated files. The reason was that I had created the Storage Pool during the previous installation and not the recent one. This is no problem per se, except that Windows Server will not automatically mount the pool(s) during reboots unless you tell it to. And if I remember correctly mounting/attaching them via the server manager is not consistent during restarts. The fix is quite simple though; time to use Powershell!

Login to the machine where you have the Storage Pools that are not automatically mounted and then run:

Get-VirtualDisk

And you should see a list with all the Storage Pools available to the machine.

The portion that is of interest here is the “IsManualAttach“. As you can see in the example above it is currently set to “False“, which in this case means that it will automatically mount / attach during restarts. If it has been set to “True” it would mean that you’d have to manually attach the pool after a restart.

To change the behavior and have the pool automatically mount during restarts enter the following PowerShell command (based on the example above):

Set-VirtualDisk -FriendlyName VmPool01_Mirrored -IsManualAttach $False

Note: The “-FrindlyName” should be set to the name of the Storage Pool you wish to edit the setting for. The first column in the example above shows the friendly names for your Storage Pools.

And running “Get-VirtualDisk” again should now show that the “IsManualAttach” is set to “False” for the Storage Pool.

Cheers!

Mastodon