WS Server 2019 Hyper V
Created a VHD Set (.VHDS) in the same location where VHD are stored for VM usage.
When trying to attach the file (in the GUI or via PowerShell), I get this error:
PS C:\Users\Administrator> Add-VMHardDiskDrive -ComputerName "VM-S01-HV" -VMName "VM-S04-FS1_V0" -ControllerNumber 0 -ControllerLocation 1 -Path G:\A_VHDS\001_VM-USERFILESHARE\VM-USERFILESHARE.vhds -ShareVirtualDisk
Add-VMHardDiskDrive : Failed to add device 'Virtual Hard Disk'.
The storage where the virtual hard disk is located does not support virtual hard disk sharing.
Cannot get information for attachment 'G:\A_VHDS\001_VM-USERFILESHARE\VM-USERFILESHARE.vhds'.
The storage where the virtual hard disk is located does not support virtual hard disk sharing.
'VM-S04-FS1_V0' failed to add device 'Virtual Hard Disk'. (Virtual machine ID -REDACTED-)
The storage where the virtual hard disk is located does not support virtual hard disk sharing.
'VM-S04-FS1_V0': Cannot get information for attachment 'G:\A_VHDS\001_VM-USERFILESHARE\VM-USERFILESHARE.vhds'.
(Virtual machine ID -REDACTED-)
The storage where the virtual hard disk is located does not support virtual hard disk sharing.
At line:1 char:1
+ Add-VMHardDiskDrive -ComputerName "VM-S01-HV" -VMName "VM-S04-FS1_V ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Add-VMHardDiskDrive], VirtualizationException
+ FullyQualifiedErrorId : OperationFailed,Microsoft.HyperV.PowerShell.Commands.AddVMHardDiskDrive
I've tried changing the Hyper V disk to Dynamic, and using a different filesystem (currently ReFS), but there is no change. Also tried to fix permissions using 'icacls (...) /grant (VM)' , which solved a similar issue for VHD, but that didn't make a difference.
The plan would be to use this shared disk as storage for a file server cluster, but in the end I just may end up simply using file shares from the Hyper V server itself.
Could it be that my hardware does not allow this?