Score:2

Attaching VHD Set or VHDX as Shared Disk in Hyper V 2019 "Storage where the virtual hard disk is located does not support virtual hard disk sharing"

it flag

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?

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.